Quick and dirty way to read a single channel of audio from a
multichannel file. If the channel is not specified, either as an
argument or as info['Channel'], then it will pick whatever channel has
the largest amplitude. Needless to say, this is not entirely reliable
unless you know that the other channel is silent.
- Parameters:
channel (string , int , or None .) - which channel to use? It can be a string name, an integer column
number or None.
info (dict .) - a dictionary with miscellaneous metadata.
info['Channel'] is inspected.
- Returns: gpkimgclass.gpk_img
- audio data with header information A gpk_img data structure
holding the audio and header information.
hdr['AudioChannel'] , hdr['Trouble'] and
hdr['WhyAudioChannel'] are set.
- Raises:
BadChannel - when you ask for a channel that isn't there.
Note:
Channel numbers start with zero!
|