๐Ÿšฉ Report: Not working

#1
by Gertie01 - opened

I couldn't get any sound generated. All I get is a beep.

@John6666

There is essentially no function to convert text to audio...๐Ÿ˜…
You will need to select and use a TTS model.

# Define a function that takes text and generates audio with configurable parameters.
def text_to_audio(text, use_sampling=True, top_k=250, top_p=0.0, temperature=1.0, duration=10.0, cfg_coef=3.0):
    # For demonstration purposes, we'll generate a simple sine wave.
    # In a real application, you would use a text-to-speech model here.
    sr = 44100  # Sample rate
    frequency = 440  # Frequency in Hz (A4 note)
    t = np.linspace(0, duration, sr * duration, endpoint=False)
    audio = (0.5 * np.sin(2 * np.pi * frequency * t)).astype(np.float32)
    return (sr, audio)

Hello there ๐Ÿ‘‹ How can i help here ?

I couldn't get any sound generated. All I get is a beep.

Got any pull requests?

Sign up or log in to comment