You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importChatTTSimporttorchimporttorchaudiochat=ChatTTS.Chat()
chat.load(compile=False) # Set to True for better performancetexts= ["All set. Lets go", "Lets get started,drive safe"]
wavs=chat.infer(texts)
foriinrange(len(wavs)):
""" In some versions of torchaudio, the first line works but in other versions, so does the second line. """try:
torchaudio.save(f"basic_output{i}.wav", torch.from_numpy(wavs[i]).unsqueeze(0), 24000)
except:
torchaudio.save(f"basic_output{i}.wav", torch.from_numpy(wavs[i]), 24000)
I received below error:
e detected that you are passing `past_key_values` as a tuple of tuples. This is deprecated and will be removed in v4.47. Please convert your cache or use an appropriate `Cache` class (https://huggingface.co/docs/transformers/kv_cache#legacy-cache-format)
text: 3%|█████▋ | 12/384(max) [00:01, 6.15it/s]
code: 4%|███████▌ | 85/2048(max) [00:07, 10.64it/s]
Traceback (most recent call last):
File "e:\Project\VoiceAI\ChatTTS\ChatTTS\sample.py", line 18, in <module>
torchaudio.save(f"basic_output{i}.wav", torch.from_numpy(wavs[i]).unsqueeze(0), 24000)
File "C:\Users\fiona\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\torchaudio\_backend\utils.py", line 312, in save
backend = dispatcher(uri, format, backend)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\fiona\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\torchaudio\_backend\utils.py", line 222, in dispatcher
raise RuntimeError(f"Couldn't find appropriate backend to handle uri {uri} and format {format}.")
RuntimeError: Couldn't find appropriate backend to handle uri basic_output0.wav and format None.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "e:\Project\VoiceAI\ChatTTS\ChatTTS\sample.py", line 20, in <module>
torchaudio.save(f"basic_output{i}.wav", torch.from_numpy(wavs[i]), 24000)
File "C:\Users\fiona\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\torchaudio\_backend\utils.py", line 312, in save
backend = dispatcher(uri, format, backend)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\fiona\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\torchaudio\_backend\utils.py", line 222, in dispatcher
raise RuntimeError(f"Couldn't find appropriate backend to handle uri {uri} and format {format}.")
RuntimeError: Couldn't find appropriate backend to handle uri basic_output0.wav and format None.
The text was updated successfully, but these errors were encountered:
Here is the code I am using:
I received below error:
The text was updated successfully, but these errors were encountered: