pepper.framework.abstract.microphone module¶
-
class
pepper.framework.abstract.microphone.AbstractMicrophone(rate, channels, callbacks)[source]¶ Bases:
objectAbstract Microphone
Parameters: - rate (int) – Samples per Second
- channels (int) – Number of Channels
- callbacks (list of callable) – Functions to call each time some audio samples are captured
-
callbacks¶ Get/Set
on_audio()CallbacksReturns: callbacks Return type: list of callable
-
channels¶ Audio channels
Returns: channels – Audio channels Return type: int
-
on_audio(audio)[source]¶ On Audio Event, Called for every frame of audio captured by Microphone
Microphone Modules should call this function for every frame of audio acquired by Microphone
Parameters: audio (np.ndarray) –
-
rate¶ Audio bit rate
Returns: rate – Audio bit rate Return type: int
-
running¶ Returns whether Microphone is Running
Returns: running Return type: bool
-
true_rate¶ Actual Audio bit rate
Audio bit rate after accounting for latency & performance realities
Returns: Actual Audio bit rate Return type: true_rate