yi-hack_ha_integration icon indicating copy to clipboard operation
yi-hack_ha_integration copied to clipboard

TTS doesn't work

Open PilaScat opened this issue 3 years ago • 17 comments

Trying tts but not working Added nanotts to bin e usr in /tmp/sd/yi-hack folder on cams Using yi outdoor allwinner v2

PilaScat avatar Nov 15 '21 13:11 PilaScat

Same thing here using allWinner v2. Tried with the Google tts.

NicholasMantovani avatar Nov 29 '21 02:11 NicholasMantovani

@PilaScat Which tts are you using? tts.google_say or yi-hack:speak

tts.google_say doesn't require tts engine installed on the cam, because it uses the standard google tts engine. yi-hack:speak requires the tts engine installed in /tmp/sd/yi-hack The binary and the libraries are available here: https://github.com/roleoroleo/yi-hack-utils/

If the setup is ok and doesn't work, check if you are using the last versions (both integration and yi-hack).

roleoroleo avatar Nov 29 '21 08:11 roleoroleo

google say doesn't work at all yi-hack:speak works but the volume is so low that is difficult to hear

PilaScat avatar Nov 29 '21 11:11 PilaScat

I also have the same problem with TTS, I'm using both updated home assistant integration and firmware. If I try to turn on/off the media player i get this error: Logger: homeassistant.components.websocket_api.http.connection Source: custom_components/yi_hack/media_player.py:134 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 28 novembre 2021, 23:49:00 (7 occurrences) Last logged: 12:28:13

[547614478096] set_power_off_in_progress() missing 1 required positional argument: 'device_name' [547585753040] set_power_off_in_progress() missing 1 required positional argument: 'device_name' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1491, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1526, in _execute_service await handler.job.target(service_call) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service await self.hass.helpers.service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 658, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 856, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 695, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/media_player/init.py", line 618, in async_turn_on await self.hass.async_add_executor_job(self.turn_on) File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/yi_hack/media_player.py", line 134, in turn_on set_power_off_in_progress(self.hass) TypeError: set_power_off_in_progress() missing 1 required positional argument: 'device_name'.

I should point that my core version is 2021.8.4 and os version 6.2

NicholasMantovani avatar Nov 29 '21 11:11 NicholasMantovani

@NicholasMantovani do not use media player entity, use yi-hack:speak service, update integration to 0.3.6 to raise the volume (@roleoroleo set 5x but maybe 8x is better)

PilaScat avatar Nov 29 '21 12:11 PilaScat

@PilaScat Sorry for the misunderstanding but "Boost speaker" works only with media_player entity (so with tts.google_say). speak doesn't use it (but it should be an interesting feature).

@NicholasMantovani You are right, there was an error. Fixed: https://github.com/roleoroleo/yi-hack_ha_integration/commit/6d45b9a2e38c3434da9b83aff372c9ca7a431756

To check the google tts please try the speak page: http://IP-CAM:8080/?page=speak The 1st box tests the internal tts, the 2nd box tests the media_player. Use this file: test_16_16_mono.zip

roleoroleo avatar Nov 29 '21 18:11 roleoroleo

To check the google tts please try the speak page: http://IP-CAM:8080/?page=speak The 1st box tests the internal tts, the 2nd box tests the media_player. Use this file: test_16_16_mono.zip

Tried the file, not working

@PilaScat Sorry for the misunderstanding but "Boost speaker" works only with media_player entity (so with tts.google_say). speak doesn't use it (but it should be an interesting feature).

It is because it's very low volume, if you can add it in the next updates it would be awesome

PilaScat avatar Nov 29 '21 19:11 PilaScat

Tried the file, not working

Which version of the hack are you using?

roleoroleo avatar Nov 30 '21 13:11 roleoroleo

Tried the file, not working

Which version of the hack are you using?

0.1.9

PilaScat avatar Nov 30 '21 18:11 PilaScat

@roleoroleo I have problem with TTS, both nanotts and through google say - no one works. The problem first occurred several month ago. I was using tts.cloud_say service and that was working good until some firmware update (I dont remember which). So I gave chance for nanotts (I've downloaded nanotts.tgz and unzip on SD card in correct directory) but not working at all - tested on ?page=speak, response from speak.sh is ok but no sound produced (volume doesn't matter). Same from HA as yi hack speak service. Using MStar h201c firmware.

maureis avatar Aug 07 '22 11:08 maureis

Are you using the last released version?

roleoroleo avatar Aug 16 '22 15:08 roleoroleo

@roleoroleo Yes, both integration and firmware

maureis avatar Aug 16 '22 16:08 maureis

What happens if you try to playback an audio file (from speak page)? Does it work? test_16_16_mono.zip

roleoroleo avatar Aug 18 '22 18:08 roleoroleo

@roleoroleo audio works correctly

maureis avatar Aug 18 '22 18:08 maureis

I will check it.

EDIT

Try this commit: https://github.com/roleoroleo/yi-hack_ha_integration/commit/d299884852acb6f888ff0ab1f2ec95202c86b220

roleoroleo avatar Aug 18 '22 20:08 roleoroleo

@roleoroleo works good for google tts service, enough for me :)

maureis avatar Aug 23 '22 21:08 maureis

About nanotts, you should try to run the web service manually to check the reply. For example with a browser extension like RESTED (firefox).

roleoroleo avatar Aug 24 '22 07:08 roleoroleo

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Apr 04 '24 02:04 github-actions[bot]