harmoni_speaker.speaker_service
Module Contents
Classes
Takes sound and publishes it to the default audio topic for the audio_play package |
Functions
|
Set names, collect params, and give service to server |
Attributes
- harmoni_speaker.speaker_service.AUDIO_DELAY = 0.5
- class harmoni_speaker.speaker_service.SpeakerService(name)
Bases:
harmoni_common_lib.service_manager.HarmoniServiceManagerTakes sound and publishes it to the default audio topic for the audio_play package
- Parameters:
HarmoniServiceManager ([type]) – [description]
- stop()
- do(data)
Publishes audio to the “/audio/audio” topic for the audio_play module
Converts input audio from bytes or a local/network path to an audio msg.
- Parameters:
data (str) – This could be a string of: - audio data - path of local wav file - link of wav audio file you want to download and heard from
- file_path_to_audio_data(path)
Returns audio data from a local path or internet link TODO: Add wget to docker image
- Parameters:
path (string) – string of: - local folder path - link of audio file you want to listen to
- Returns:
- return an object with two fields:
audio_data: string
duration: int (duration of the file)
- Return type:
json
- harmoni_speaker.speaker_service.main()
Set names, collect params, and give service to server