Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customization of TTS timeout #314

Open
dividebysandwich opened this issue Jan 31, 2025 · 8 comments
Open

Allow customization of TTS timeout #314

dividebysandwich opened this issue Jan 31, 2025 · 8 comments

Comments

@dividebysandwich
Copy link

As per discussion at https://community.home-assistant.io/t/http-timeout-for-voice-assistant-pe-even-though-the-response-is-recieved/834200/4 I would like to request some means to configure the timeout, since 5 seconds tends to be problematic when the speech generation takes longer.

@jonathanarchergithub
Copy link

jonathanarchergithub commented Feb 3, 2025

+1. having a timeout issue for responses longer than a single sentence with local Piper on a NUC as well. Increasing the timeout in the code worked for me. Made me wonder why it takes so long though. According to the Voice debug, the whole pipeline executes in less that 5s. TTS almost 0s.

@MorganBridget
Copy link

+1. having a timeout issue for responses longer than a single sentence with local Piper on a NUC as well. Increasing the timeout in the code worked for me. Made me wonder why it takes so long though. According to the Voice debug, the whole pipeline executes in less that 5s. TTS almost 0s.

Can you provide a little bit detail of how to solve this. I've read in other threads about nabu custom compoenent and adding a config to ESPhome and I'm very confused. Any help you can provide is appreciated

@MorganBridget
Copy link

As per discussion at https://community.home-assistant.io/t/http-timeout-for-voice-assistant-pe-even-though-the-response-is-recieved/834200/4 I would like to request some means to configure the timeout, since 5 seconds tends to be problematic when the speech generation takes longer.

Can you provide a little bit detail of how to solve this. I've read in other threads about nabu custom compoenent and adding a config to ESPhome and I'm very confused. Any help you can provide is appreciated

@jonathanarchergithub
Copy link

+1. having a timeout issue for responses longer than a single sentence with local Piper on a NUC as well. Increasing the timeout in the code worked for me. Made me wonder why it takes so long though. According to the Voice debug, the whole pipeline executes in less that 5s. TTS almost 0s.

Can you provide a little bit detail of how to solve this. I've read in other threads about nabu custom compoenent and adding a config to ESPhome and I'm very confused. Any help you can provide is appreciated

I just followed the instructions gyrga posted. Effectively you have to create a custom nabu component where you change the code. Then you need to recompile the FW. Is a bit tedious…

@MorganBridget
Copy link

+1. having a timeout issue for responses longer than a single sentence with local Piper on a NUC as well. Increasing the timeout in the code worked for me. Made me wonder why it takes so long though. According to the Voice debug, the whole pipeline executes in less that 5s. TTS almost 0s.

Can you provide a little bit detail of how to solve this. I've read in other threads about nabu custom compoenent and adding a config to ESPhome and I'm very confused. Any help you can provide is appreciated

I just followed the instructions gyrga posted. Effectively you have to create a custom nabu component where you change the code. Then you need to recompile the FW. Is a bit tedious…

I don't mind if it's tedious. I just don't know what FW means and how to recompile it. Can you have mercy on me and maybe walk me through?

@jonathanarchergithub
Copy link

Well, FW=Firmware (I.e. the Software operating on the devices micro controller).

You would need to setup ESPhome and add the Voice PE as a device there. Then you download the code of the nabu component to your local file system and proceed as gyrga describes.

In any case you would have to make yourself familiar with ESPhome and you lose automatic SW updates of your device.

@MorganBridget
Copy link

Well, FW=Firmware (I.e. the Software operating on the devices micro controller).

You would need to setup ESPhome and add the Voice PE as a device there. Then you download the code of the nabu component to your local file system and proceed as gyrga describes.

In any case you would have to make yourself familiar with ESPhome and you lose automatic SW updates of your device.

I saw their instructions and I don't understand where you're supposed to put the config code. I already have esphome with Voice PE there. That's how I know the timeout problem exists. That's what my situation is right now. I'm trying to fix it and I still am unclear. It just not helping to reference gyrga without further explanation because unfortunately it's not clear to me. I probably need a step by step guidance on this one if you can spare a moment of your time that would be very helpful to me as well as others I am certain. Thank you so much.

@jonathanarchergithub
Copy link

Ah, okay I see. You can simply add a new folder called e.g. “custom_components” below your ESPhome folder. There you copy the component “nabu” from this repository. In the code apply gyrgas change. In your device config you add to the beginning of the file:

custom_components:
  - source:
     type: local
     path: /config/esphome/custom_components

Then Save and Install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants