File size: 207 Bytes
2bd8657
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
from transformers import pipeline

synthesizer = pipeline("text-to-speech", "suno/bark")


def generate_speech(text):
    result = synthesizer(text)
    print(synthesizer(text))
    return synthesizer(text)