Definition at line 163 of file mic.py.
def mycroft.client.speech.mic.ResponsiveRecognizer.__init__ |
( |
|
self, |
|
|
|
wake_word_recognizer |
|
) |
| |
def mycroft.client.speech.mic.ResponsiveRecognizer._adjust_threshold |
( |
|
self, |
|
|
|
energy, |
|
|
|
seconds_per_buffer |
|
) |
| |
|
private |
def mycroft.client.speech.mic.ResponsiveRecognizer._compile_metadata |
( |
|
self | ) |
|
|
private |
def mycroft.client.speech.mic.ResponsiveRecognizer._create_audio_data |
( |
|
raw_data, |
|
|
|
source |
|
) |
| |
|
staticprivate |
Constructs an AudioData instance with the same parameters
as the source and the specified frame_data
Definition at line 505 of file mic.py.
def mycroft.client.speech.mic.ResponsiveRecognizer._record_phrase |
( |
|
self, |
|
|
|
source, |
|
|
|
sec_per_buffer, |
|
|
|
stream = None |
|
) |
| |
|
private |
Record an entire spoken phrase.
Essentially, this code waits for a period of silence and then returns
the audio. If silence isn't detected, it will terminate and return
a buffer of RECORDING_TIMEOUT duration.
Args:
source (AudioSource): Source producing the audio chunks
sec_per_buffer (float): Fractional number of seconds in each chunk
stream (AudioStreamHandler): Stream target that will receive chunks
of the utterance audio while it is
being recorded
Returns:
bytearray: complete audio buffer recorded, including any
silence at the end of the user's utterance
Definition at line 237 of file mic.py.
def mycroft.client.speech.mic.ResponsiveRecognizer._skip_wake_word |
( |
|
self | ) |
|
|
private |
def mycroft.client.speech.mic.ResponsiveRecognizer._upload_wake_word |
( |
|
self, |
|
|
|
audio, |
|
|
|
metadata |
|
) |
| |
|
private |
def mycroft.client.speech.mic.ResponsiveRecognizer._wait_until_wake_word |
( |
|
self, |
|
|
|
source, |
|
|
|
sec_per_buffer |
|
) |
| |
|
private |
Listen continuously on source until a wake word is spoken
Args:
source (AudioSource): Source producing the audio chunks
sec_per_buffer (float): Fractional number of seconds in each chunk
Definition at line 391 of file mic.py.
def mycroft.client.speech.mic.ResponsiveRecognizer.calc_energy |
( |
|
sound_chunk, |
|
|
|
sample_width |
|
) |
| |
|
static |
def mycroft.client.speech.mic.ResponsiveRecognizer.listen |
( |
|
self, |
|
|
|
source, |
|
|
|
emitter, |
|
|
|
stream = None |
|
) |
| |
Listens for chunks of audio that Mycroft should perform STT on.
This will listen continuously for a wake-up-word, then return the
audio chunk containing the spoken phrase that comes immediately
afterwards.
Args:
source (AudioSource): Source producing the audio chunks
emitter (EventEmitter): Emitter for notifications of when recording
begins and ends.
stream (AudioStreamHandler): Stream target that will receive chunks
of the utterance audio while it is
being recorded
Returns:
AudioData: audio with the user's utterance, minus the wake-up-word
Definition at line 512 of file mic.py.
def mycroft.client.speech.mic.ResponsiveRecognizer.record_sound_chunk |
( |
|
self, |
|
|
|
source |
|
) |
| |
def mycroft.client.speech.mic.ResponsiveRecognizer.sec_to_bytes |
( |
|
sec, |
|
|
|
source |
|
) |
| |
|
static |
def mycroft.client.speech.mic.ResponsiveRecognizer.stop |
( |
|
self | ) |
|
Signal stop and exit waiting state.
Definition at line 359 of file mic.py.
mycroft.client.speech.mic.ResponsiveRecognizer._stop_signaled |
|
private |
mycroft.client.speech.mic.ResponsiveRecognizer.account_id |
mycroft.client.speech.mic.ResponsiveRecognizer.audio |
mycroft.client.speech.mic.ResponsiveRecognizer.config |
mycroft.client.speech.mic.ResponsiveRecognizer.energy_ratio |
mycroft.client.speech.mic.ResponsiveRecognizer.energy_threshold |
mycroft.client.speech.mic.ResponsiveRecognizer.filenames_to_upload |
mycroft.client.speech.mic.ResponsiveRecognizer.mic_level_file |
float mycroft.client.speech.mic.ResponsiveRecognizer.MIN_LOUD_SEC_PER_PHRASE = 0.5 |
|
static |
float mycroft.client.speech.mic.ResponsiveRecognizer.MIN_SILENCE_AT_END = 0.25 |
|
static |
mycroft.client.speech.mic.ResponsiveRecognizer.multiplier |
mycroft.client.speech.mic.ResponsiveRecognizer.overflow_exc |
float mycroft.client.speech.mic.ResponsiveRecognizer.RECORDING_TIMEOUT = 10.0 |
|
static |
float mycroft.client.speech.mic.ResponsiveRecognizer.RECORDING_TIMEOUT_WITH_SILENCE = 3.0 |
|
static |
mycroft.client.speech.mic.ResponsiveRecognizer.save_utterances |
mycroft.client.speech.mic.ResponsiveRecognizer.save_wake_words |
mycroft.client.speech.mic.ResponsiveRecognizer.saved_wake_words_dir |
mycroft.client.speech.mic.ResponsiveRecognizer.SAVED_WW_SEC |
float mycroft.client.speech.mic.ResponsiveRecognizer.SEC_BETWEEN_WW_CHECKS = 0.2 |
|
static |
float mycroft.client.speech.mic.ResponsiveRecognizer.SILENCE_SEC = 0.01 |
|
static |
mycroft.client.speech.mic.ResponsiveRecognizer.TEST_WW_SEC |
mycroft.client.speech.mic.ResponsiveRecognizer.upload_disabled |
mycroft.client.speech.mic.ResponsiveRecognizer.upload_lock |
mycroft.client.speech.mic.ResponsiveRecognizer.upload_url |
mycroft.client.speech.mic.ResponsiveRecognizer.wake_word_name |
mycroft.client.speech.mic.ResponsiveRecognizer.wake_word_recognizer |
The documentation for this class was generated from the following file: