taped.util

taped.util.bytes_to_waveform(b: bytes, sr: int, n_channels: int, sample_width: int, dtype='int16') → numpy.array[source]

Convert raw bytes to a numpy array cast to dtype

Parameters
  • b – bytes

  • sr – sample rate

  • n_channels – number of channels

  • sample_width – sample byte width [2, 3, 4]

  • dtype – data type used by numpy, i.e. dtype=np.int16 is the same as dtype=’int16’

Returns

numpy.array

taped.util.list_recording_device_index_names()[source]

List (index, name) of available recording devices