Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need to fix speaking #30

Open
vqoley opened this issue May 29, 2023 · 2 comments
Open

need to fix speaking #30

vqoley opened this issue May 29, 2023 · 2 comments

Comments

@vqoley
Copy link

vqoley commented May 29, 2023

word:
isa = bot reading sound "i.s.a"
itulah = bot reading sound "skim"

tested using osman

@huseinzol05
Copy link
Member

share code

@vqoley
Copy link
Author

vqoley commented Jun 2, 2023

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants