rcute_cozmars.microphone

class rcute_cozmars.microphone.Microphone(robot, q_size=1)
block_duration

The duration (seconds) of each sound clip in the stream, the default is 0.1

Cannot be set when device is running, otherwise an exception will be thrown

channels

Number of channels, which is 1 and read only

closed

Is the data stream closed

dtype

Sampling data type, the default is ‘int16’(str).

Cannot be set when device is running, otherwise an exception will be thrown

gain

Volume gain (dBFS)

get_buffer()

Get output data stream

sample_rate

Cannot be set when device is running, otherwise an exception will be thrown

sample_width

How many bytes does a sample contains, corresponding to dtype, read only

volume

Volume level, 0~100, in percentage.

It’s recommanded to set 100 for microphone volume, and 50 for speaker.

Dynamic volume modification should be done via gain