Samuel L Meyers
commited on
Commit
•
dd6b086
1
Parent(s):
4e73de3
Test2
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ text = "some example text in the English language"
|
|
11 |
def greet(text):
|
12 |
inputs = tokenizer(text, return_tensors="pt")
|
13 |
with torch.no_grad():
|
14 |
-
output = model(**inputs).waveform
|
15 |
out = output[0]
|
16 |
wavfile.write("tmp.wav", rate=16000, data=out)
|
17 |
return open("tmp.wav", "rb").read()
|
|
|
11 |
def greet(text):
|
12 |
inputs = tokenizer(text, return_tensors="pt")
|
13 |
with torch.no_grad():
|
14 |
+
output = model(**inputs, decoder_input_ids=inputs["input_ids"]).waveform
|
15 |
out = output[0]
|
16 |
wavfile.write("tmp.wav", rate=16000, data=out)
|
17 |
return open("tmp.wav", "rb").read()
|