justLV / onju-voice

A hackable AI home assistant platform
MIT License
1.31k stars 70 forks source link

Text to speech errors #41

Closed jmorris644 closed 10 months ago

jmorris644 commented 10 months ago

I have put "Lily" in my voice lab on Elevenlabs.com. I have put my elevenLabs token in cedentials.json I have put "Lily" as my eleven_labs_default_voice in in config.yaml

I have NOT put anything in voices.json

I am getting the following errors:

WARNING onju-coral-V3: Voice 'Lily' not found, using default Lily elevenlabs.py:51 Exception in thread Thread-2 (transcribe_respond): Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/joe/onju-voice/server/server.py", line 156, in transcribe_respond wav_fname = tts.text_to_speech( File "/home/joe/onju-voice/server/elevenlabs.py", line 71, in text_to_speech voice_id = self.get_voice_id(device) File "/home/joe/onju-voice/server/elevenlabs.py", line 52, in get_voice_id return self.voices[self.default_voice]['voice_id'] KeyError: 'Lily'

jmorris644 commented 10 months ago

Fixed: Even though the code in elevenlabs.py looked like it would populate the voices.json it did not. I had to manually populate the the voices.json file. Here is what I put in for testing purposes. Also, the names are case sensitive.

{"Lily": {"voice_id":"VSlmmZGRLhV1QLV0OhLx","name":"Lily"}}