IS2AI / Kazakh_TTS

An expanded version of the previously released Kazakh text-to-speech (KazakhTTS) synthesis corpus. In KazakhTTS2, the overall size has increased from 93 hours to 271 hours, the number of speakers has risen from two to five (three females and two males), and the topic coverage has been diversified.
https://issai.nu.edu.kz/tts2-eng/
Creative Commons Attribution 4.0 International
121 stars 24 forks source link

Pretrained model without CUDA #8

Closed codionysus closed 1 year ago

codionysus commented 2 years ago

Hi, I would like test your TTS and use it without CUDA if it's possible. Could you give me an example of synthesizer with pretrained model and without cuda? Thanks

mussakhojayeva commented 2 years ago

Hi! This could be done by modifying tts1/synthesize.py line 30 to "cpu"

codionysus commented 2 years ago

Hi, what about line 20? That gives error that pytorch was build without cuda

mussakhojayeva commented 2 years ago

Similarly just change line to either cpu, or to() completely.

codionysus commented 2 years ago

Hi, I have tested both options and it gives me an error on line 47: TypeError: new(): invalid data type 'str'. I execute this command: python synthesize.py --text "бүгінде өңірде тағы бес жобаның құрылысы жүргізілуде."

rodion-m commented 1 year ago

To make it work, in the file synthesize.py change this:

with torch.no_grad():
    _, c_mel, *_ = text2speech(sample_text.lower())
    wav = vocoder.inference(c_mel)

to this:

with torch.no_grad():
    output_dict = text2speech(sample_text.lower())
    feat_gen = output_dict['feat_gen']
    wav = vocoder.inference(feat_gen)

Here is a PR: #10