deepspeech_service
Module Contents
Classes
Speech to text service using DeepSpeech |
Functions
|
Set names, collect params, and give service to server |
- class deepspeech_service.SpeechToTextService(name, param)
Bases:
harmoni_common_lib.service_manager.HarmoniServiceManagerSpeech to text service using DeepSpeech
- ds_client
Set up publishers and subscribers
- reset_init()
Resets variables such that if start is called will start from beginning
- Raises:
NotImplementedError – To be used, this function should be overwritten by the child class.
- start()
Start the DeepSpeech stream
- stop()
Stop the DeepSpeech stream
- pause()
Pause the DeepSpeech stream
- sound_data_callback(data)
Callback function subscribing to the microphone topic. Passes audio data to the DeepSpeech client.
- transcribe_stream(data, is_transcribe_once=False)
Continuously passes chunks of audio to the DeepSpeech client. Final text, as determined by the DeepSpeech client, is published.
- request(data)
Request to DeepSpeech client: requests to transcribe one instance of speech. Text is considered final based on the duration of the t_wait parameter.
- _transcribe_chunk(data)
Passes one chunk of audio to the DeepSpeech client
- playing_sound_pause_callback(data)
Sleeps when data is being published to the speaker
- deepspeech_service.main()
Set names, collect params, and give service to server