soundfile.LibsndfileError: Error opening 'audio.wav': System error. #3358
Replies: 7 comments 1 reply
-
I am also finding the same error |
Beta Was this translation helpful? Give feedback.
-
I have the same error. |
Beta Was this translation helpful? Give feedback.
-
I thought it might be because I hadn't downloaded eSpeak yet, but I was able to figure out how to get it installed. (I'll admit though there's a reasonable chance that I may not have installed it properly.) I fully believe this probably has a very simple solution so I'm commenting to boost this a little. 👶📣🛰️ |
Beta Was this translation helpful? Give feedback.
-
The same problem |
Beta Was this translation helpful? Give feedback.
-
This solve my problem Try using cmd cd to your source file and run py sourcefile.py Make sure all files you use are placed correctly |
Beta Was this translation helpful? Give feedback.
-
same issue here! |
Beta Was this translation helpful? Give feedback.
-
I'm trying the demo code with Windows, and I got the error message:
soundfile.LibsndfileError: Error opening 'audio.wav': System error.
import torch
from TTS.api import TTS
Get device
device = "cuda" if torch.cuda.is_available() else "cpu"
List available 🐸TTS models
print(TTS().list_models())
Init TTS
tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2").to(device)
Run TTS
❗ Since this model is multi-lingual voice cloning model, we must set the target speaker_wav and language
Text to speech list of amplitude values as output
wav = tts.tts(text="Hello world!", speaker_wav="audio.wav", language="en")
Text to speech to a file
tts.tts_to_file(text="Hello world!", speaker_wav="audio.wav", language="en", file_path="output.wav")
Beta Was this translation helpful? Give feedback.
All reactions