rt400 / ReversoTTS-HA

ReversoTTS component for HomeAssistant
39 stars 10 forks source link

can't pass bitrate or pitch to service #6

Closed khalidk7 closed 3 years ago

khalidk7 commented 3 years ago

Hi, When I try to pass the following to the reversotts service:

var newMsg = { message: "this is a test" ,language: "Karen-US-English" ,pitch: "70" };

I get the following error:

Error Message: extra keys not allowed @ data['pitch']"

Is there a way to pass it? I don't want to set this in configuration.yaml, since I want to change the pitch using a variable. I get the same error with bitrate.

Thanks in advance,

rt400 commented 3 years ago

@khalidk7 How did you pass it to the HA service ? I do not think it is at all possible ...

khalidk7 commented 3 years ago

@rt400 So when I call the service successfully from the "developer tools" tab in HA, this simple syntax works:

entity_id: media_player.speaker_1 message: "hi"

However, if I try passing pitch, it results in the error of "Error Message: extra keys not allowed @ data['pitch']"":

entity_id: media_player.speaker_1 message: "hi" pitch: "70"

Any other ideas or is it simply not supported?

Thanks in advance,

rt400 commented 3 years ago

@khalidk7 Unfortunately this is not supported. The TTS engine is produced when HA is turned on and other than a message can not be changed without restarting.

andersmoldin commented 3 years ago

Since we can pass the language (which is also set at configuration), would it be possible to add the possibility to set the pitch in a message as well, @rt400 ?