Unable to creating output file using scipy
#9
by
Yadunandana
- opened
This comment has been hidden
This comment has been hidden
If you just want to synthesize audio, you only need 5 lines of code. 1 line: from transformers import pipeline 2 line: import scipy 3 line: pipe = pipeline("text-to-speech", model="facebook/mms-tts-eng", device=0) 4 line: results = pipe("your text") 5 line: scipy.io.wavfile.write("audio_vits.wav", rate=results["sampling_rate"], data=results["audio"].squeeze())
PS:
Create a text file and paste the code into it. Then change its extension from "txt" to "py". Python only runs scripts with the extension "py". You need Python and the necessary libraries installed (transformers, torch==2.0.1, torchvision==0.15.2, torchaudio==2.0.2 and phonemizer).