local_tts_service¶
Module Contents¶
Classes¶
Local TTS service using the TTS repository |
Functions¶
|
Main function for starting local TTS service |
- class local_tts_service.LocalTtsService(name, param)¶
Bases:
harmoni_common_lib.service_manager.HarmoniServiceManagerLocal TTS service using the TTS repository
- sample_rate¶
Initialize the local TTS client
- speaker_action_client¶
Setup the TTS service as server
- request(self, input_text)¶
Request to local TTS client: requests a synthesized audio of an input string from TTS and writes it to an audio file :param input_text: Input string to synthesize :type input_text: str
- Returns
- Object containing information about the response received (bool) and response message (str):
response: bool message: str (path to audio file)
- Return type
object
- _save_audio_to_file(self, audio_data)¶
This function writes the audio data from TTS into a .wav file :param audio_data: response from TTS for getting audio data :type audio_data: obj
- Returns
saved audio file
- Return type
file_path
- publish_file_path(self, file_path)¶
- local_tts_service.main()¶
Main function for starting local TTS service