Open vqoley opened 1 year ago
share code
sure. below is simple code:
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
import malaya_speech
import numpy as np
import soundfile as sf
def vits(model: str = 'mesolitica/VITS-osman', **kwargs):
return malaya_speech.tts.vits(model=model)
string1 = 'itulah'
def predict(string):
osman = vits()
r_osman = osman.predict(string)
r_osman.keys()
# Save the output to a WAV file
sf.write('sound.wav', r_osman['y'], samplerate=22050)
predict(string1)
just change string1 value with "itulah" and "isa"
word: isa = bot reading sound "i.s.a" itulah = bot reading sound "skim"
tested using osman