toverainc / willow

Open source, local, and self-hosted Amazon Echo/Google Home competitive Voice Assistant alternative
https://heywillow.io/
Apache License 2.0
2.54k stars 96 forks source link

TTS using WIS TTS does not process numbers #148

Closed ingrove closed 1 year ago

ingrove commented 1 year ago

First, this is a great addition to Home Assistant! Thank you!

I've noticed that the TTS engine doesn't seem to process numbers. I have a few temperature related intent_scripts responding with numbers and the numbers are not processed. An example from watching the Tio terminal screen is:

WILLOW: Using WIS TTS URL 'https://infer.tovera.io/api/tts?speaker=CLB&text=it's currently 70.3 inside.'

Although the screen of the ESP32-S3-BOX displays "it's currently 70.3 inside", what is spoken by WIS TTS is "it's currently inside", without the numbers. I get the same result if I copy the URL in the browser of my PC running Windows. It skips the numbers.

nikito commented 1 year ago

This has actually been discussed on the WIS GitHub here: https://github.com/toverainc/willow-inference-server/issues/78

There's a fix in the works, can see the details there 🙂

kristiankielhofner commented 1 year ago

The fix is actually already deployed in the wisng branch. I just stood up a beta development server you can test against. Change both of your base inference server endpoints to https://wisng.tovera.io and you should hear numbers with TTS.

ingrove commented 1 year ago

Thank you for the update. It seems there is still a problem with numbers that include decimals. Whole numbers like 68 work fine, however something like 68.9 is silent on the number.

https://wisng.tovera.io/api/tts?speaker=CLB&text=it's currently 68.9 inside.

nikito commented 1 year ago

Just tested the above and can confirm the same behavior on my local instance.

nikito commented 1 year ago

I created a PR to fix this, referenced above. I ensured it handles integer and float numbers, as well as negative and positive numbers. 😃

kristiankielhofner commented 1 year ago

I added and comment regarding the removal of the currently unused function and I will be further testing and reviewing this today.