initial commit

This commit is contained in:
George Kasparyants
2024-04-24 06:57:30 +04:00
commit 3633aa99e5
29 changed files with 2555 additions and 0 deletions

12
t2a_api.py Normal file
View File

@@ -0,0 +1,12 @@
from transformers import pipeline
import scipy
class T2A(object):
def __init__(self):
self.synthesiser = pipeline("text-to-speech", "suno/bark")
def apply(self, text):
speech = self.synthesiser(text,
forward_params={"do_sample": True})
scipy.io.wavfile.write("bark_out.wav", rate=speech["sampling_rate"], data=speech["audio"])