soundfile.LibsndfileError #4101
Unanswered
JustLmr
asked this question in
General Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Error:
PS C:\Users\Emire\Desktop\Kılıç> & C:/Users/Emire/AppData/Local/Microsoft/WindowsApps/python3.11.exe c:/Users/Emire/Desktop/Kılıç/test.py
Traceback (most recent call last):
File "c:\Users\Emire\Desktop\Kılıç\test.py", line 16, in
tts.tts_to_file(text=text, speaker_wav=speaker_wav, file_path=output_path, language="tr")
File "C:\Users\Emire\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\TTS\api.py", line 366, in tts_to_file
wav = self.tts(
^^^^^^^^^
File "C:\Users\Emire\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\TTS\api.py", line 312, in tts
wav = self.synthesizer.tts(
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Emire\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\TTS\utils\synthesizer.py", line 406, in tts
outputs = self.tts_model.synthesize(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Emire\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\TTS\tts\models\xtts.py", line 410, in synthesize
return self.full_inference(text, speaker_wav, language, **settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Emire\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torch\utils_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Emire\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\TTS\tts\models\xtts.py", line 471, in full_inference
(gpt_cond_latent, speaker_embedding) = self.get_conditioning_latents(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Emire\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torch\utils_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Emire\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\TTS\tts\models\xtts.py", line 346, in get_conditioning_latents
audio = load_audio(file_path, load_sr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Emire\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\TTS\tts\models\xtts.py", line 79, in load_audio
audio, lsr = torchaudio.load(audiopath)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Emire\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torchaudio_backend\utils.py", line 205, in load
return backend.load(uri, frame_offset, num_frames, normalize, channels_first, format, buffer_size)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Emire\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torchaudio_backend\soundfile.py", line 27, in load
return soundfile_backend.load(uri, frame_offset, num_frames, normalize, channels_first, format)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Emire\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torchaudio_backend\soundfile_backend.py", line 221, in load
with soundfile.SoundFile(filepath, "r") as file_:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Emire\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\soundfile.py", line 658, in init
self._file = self._open(file, mode_int, closefd)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Emire\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\soundfile.py", line 1216, in _open
raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name))
soundfile.LibsndfileError: Error opening 'C:/Users/Emire/Desktop/Kılıç/speaker.wav': System error.
CODE
from TTS.api import TTS
tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2")
text = "Bir ses geliştirmek oldukça uzun zaman aldı ve şimdi onu bulduğumda susmayacağım."
speaker_wav = "C:/Users/Emire/Desktop/Kılıç/speaker.wav"
output_path = "output_turkish.wav"
tts.tts_to_file(text=text, speaker_wav=speaker_wav, file_path=output_path, language="tr")
print(f"Ses dosyası {output_path} olarak oluşturuldu.")
I've searched really hard but I can't find it, what should I do? I've tried almost every way.
Graphic Card:RTX3070ti
Beta Was this translation helpful? Give feedback.
All reactions