Piper (Text-to-Speech) is speaking too fast

Good day all,

I have installed the Add-on Piper (Text-to-Speech) on the openHAB 5.0.1 running on a windows 10 laptop using java version “21.0.8” because that laptop does not have access to the Internet.

I am using a DSL rule to create phases and the instruction say() to convert them from text to speech.

It is working fine. The only issue is the speaking rate which is a bit too fast for my taste.

Is there a way to modify the speaking rate with Piper?

Thank you in advance.

Bruno

Hi,
Although I do not use piper I did find this on the github site it may be what you are asking to do.

try piper --length_scale .67 --noise_w .2 --sentence_silence=0.1 but the main flag you are looking for is --length_scale

Thank you Justan for your suggestion.

I looked everywhere to find where the parm “length_scale” would be used related to Piper.

I found it in that file: “C:\openHAB5\userdata\piper\fr_FR-siwis-medium.onnx.json” related to the voice I am using with Piper.

This file starts with the following:

{
“audio”: {
“sample_rate”: 22050,
“quality”: “medium”
},
“espeak”: {
“voice”: “fr”
},
“inference”: {
“noise_scale”: 0.667,
“length_scale”: 1,
“noise_w”: 0.8
},
“phoneme_type”: “espeak”,
“phoneme_map”: {},

I modified “length_scale”: 1 to “length_scale”: 0.67; restart openhab and did my test with the DSL instruction “say()”:

The speech rate did not change at all.

Any help on this would be appreciated.

Thank you

Bruno

tried restarting openHAB to reload the config?

Greets

Yes, I did restart openHAB several times. I even restart the computer.

:slightly_frowning_face: still no change in the Piper speaking rate.

It seems that whatever number I put in the parm “length_scale” is not being picked up by openHAB and/or Piper. :face_with_raised_eyebrow:

I keep on searching within openHAB, where I could add or change a parm to slow down Piper speaking rate.

In this file “C:\openHAB5\userdata\etc\org.openhab.voice.cfg”, I found the following:
defaultHLI = rulehli
defaultVoice = pipertts:siwis-fr_FR
defaultTTS = pipertts

Since I do not know how to modify “cfg” file, I did not change that file.

In this file “C:\openHAB5\conf\services\runtime.cfg”, I found the following:
################################ VOICE #####################################

This parameter defines the default text-to-speech service to use (if not set, the first available one will be used.

#org.openhab.voice:defaultTTS=pipertts

Since the statement related to Piper was commented out, I did not change that file.

In this file “C:\openHAB5\userdata\config\org\openhab\pipertts.config”, I found the following:
:org.apache.felix.configadmin.revision:=L"1"
felix.cm.newConfiguration=B"true"
service.pid=“org.openhab.pipertts”

Since I do not know how to modify “config” file, I did not change that file.

In this file “C:\openHAB5\userdata\config\org\openhab\voice\pipertts.config”, I found the following:
:org.apache.felix.configadmin.revision:=L"3"
preloadModel=B"false"
service.pid=“org.openhab.voice.pipertts”

Since I do not know how to modify “config” file, I did not change that file.

Looking at the following document on “Google Cloud Text-to-Speech”:

I found this parm: “org.openhab.voice.googletts:speakingRate=1”

Since I had nothing to loose, I created this file: “C:\openHAB5\conf\services\pipertts.cfg”, with this instruction: “org.openhab.voice:pipertts:speakingRate=0.67”

Result: No change on Piper speaking rate.:frowning:

Any suggestions would be appreciated.

Thank you for your support.

Bruno