Open ShmuelRonen opened 10 months ago
Is this only with xtts or also with other models?
There are that works ans some makes Error
I'll go through a few and see whatever errors i can fix then.
According to TTS.api library, XTTS model doesn't seem to have a language manager, given that there's a stub code for is_multi_lingual property:
@property
def is_multi_lingual(self):
# TODO: fix this
if "xtts" in self.model_name:
return True
if hasattr(self.synthesizer.tts_model, "language_manager") and self.synthesizer.tts_model.language_manager:
return self.synthesizer.tts_model.language_manager.num_languages > 1
return False
That is primarily Coqui TTS issue. The temporary workaround would be to edit languages property so the list of supported languages would be returned:
@property
def languages(self):
if not self.is_multi_lingual:
return None
if "xtts" in self.model_name:
return ["en","es","fr","de","it","pt","pl","tr","ru","nl","cs","ar","zh-cn"]
return self.synthesizer.tts_model.language_manager.language_names
However, after implementing the workaround, I get the following error:
Traceback (most recent call last):
File "H:\Various\TTSWORKS\audio-webui\venv\lib\site-packages\gradio\routes.py", line 437, in run_predict
output = await app.get_blocks().process_api(
File "H:\Various\TTSWORKS\audio-webui\venv\lib\site-packages\gradio\blocks.py", line 1352, in process_api
result = await self.call_function(
File "H:\Various\TTSWORKS\audio-webui\venv\lib\site-packages\gradio\blocks.py", line 1077, in call_function
prediction = await anyio.to_thread.run_sync(
File "H:\Various\TTSWORKS\audio-webui\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "H:\Various\TTSWORKS\audio-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "H:\Various\TTSWORKS\audio-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
result = context.run(func, *args)
File "H:\Various\TTSWORKS\audio-webui\venv\lib\site-packages\gradio\helpers.py", line 602, in tracked_fn
response = fn(*args)
File "H:\Various\TTSWORKS\audio-webui\webui\ui\tabs\text_to_speech.py", line 79, in _generate
inputs = [values[i] for i in range(len(inputs)) if
File "H:\Various\TTSWORKS\audio-webui\webui\ui\tabs\text_to_speech.py", line 80, in <listcomp>
inputs[i] in all_components_dict[loader.model]] # Filter and convert inputs
AttributeError: type object 'TTSModelLoader' has no attribute 'model'
I was going to make another feature request for this. I'd like to have xtts support in audio webui as another alternative voice cloner.
Alright, I'll fix this today
Although, fixing it would be another hacky fix for something coqui should do themselves. And I had plans to move TTS to an extension in #143. I should probably do that first.
the error: AttributeError: 'TTS' object has no attribute 'languages'
I use is on window 10 with rtx3090
Running on local URL: http://127.0.0.1:7860
To create a public link, set
share=True
inlaunch()
.