ElliotGestrin / NAOChat

A voice-to-voice conversation with ChatGPT. Support for talking through a NAO robot
19 stars 6 forks source link

NAO language setting still overrided by NAOChat to english #5

Closed stannoTUKE closed 12 months ago

stannoTUKE commented 1 year ago

Hello, I have another problem. When I change the language in config to czech language, Nao is listening in czech language, obtianes response from ChatGPT in Czech language, but uses english synthesizer in NAO robot. I was not able to fix this... After each running of NAOchat, I mannualy set on robot czech language, but inside your code, the synthetic output is overrided to english. Can you help me?

ElliotGestrin commented 1 year ago

This is likely due to behavior from NaoDemo:s Talker.py.

Open the "nao-demo/V5/python/talker.py" and search for "English". There you should be able to change the tts language to czech. I'd recommend you exchange the "Swedish" for "Czech". You can also change the volume here.

I'll do some further testing with NAOChat and try to incorporate these features better in the main repo, but that'll unfortunately be a few weeks.

Hope that helps!

stannoTUKE commented 1 year ago

Yes! It works! Now I have another question. Can I change the speed of talking? The output speech is very slow. The next problem is, that it takes a significant time after user utterance up to the moment, the interface shows the recognition result. But this is not true for the first recognition - it works well, but each next speech recognition task is slower and slower.

ElliotGestrin commented 1 year ago

Hi again! Sorry for missing your message. I've pushed a new version now that'll let you control the nao:s language (with nao_language), volume (nao_volume) and delay length (nao_sleep_len). You'll need to install one new package from the requirements.txt, but should be good to go.

The speed of talking I unfortunately don't think you can control, it's from the default NAO TTS. If you find a way, feel free to push a PR.

In regards to the delay, it could perhaps be from the nao_sleep_len parameter? This is how long the NAO will wait per character when saying something. As there's no feedback from NAO atm this is needed. Currently it'll "wink" when ready to listen again. Furthermore the listener waits for silence, perhaps it's not growing quite enough? If you could send me a recording of the NAO I could perhaps help you troubleshoot more.

stannoTUKE commented 1 year ago

Hello Elliot,

thank you for your reply and update. The delay was caused by the noisy environment and bad microphone setting.

ElliotGestrin commented 12 months ago

Glad to hear you got it working! I'll close this issue :)