Update tts.py
Browse files
tts.py
CHANGED
|
@@ -2,11 +2,9 @@ from transformers import VitsModel, AutoTokenizer
|
|
| 2 |
import torch
|
| 3 |
import numpy as np
|
| 4 |
from scipy.io.wavfile import write
|
| 5 |
-
|
| 6 |
model = VitsModel.from_pretrained("../arabic-tts")
|
| 7 |
tokenizer = AutoTokenizer.from_pretrained("../arabic-tts")
|
| 8 |
-
|
| 9 |
-
text = "عشر ديما خمسة وعشرين رجلا في ليلة واحدة ومن ثم قام بقتلها"
|
| 10 |
text = "يوفر مجتمع البناء قروضا عقارية وقروض وعقارية"
|
| 11 |
inputs = tokenizer(text, return_tensors="pt")
|
| 12 |
|
|
|
|
| 2 |
import torch
|
| 3 |
import numpy as np
|
| 4 |
from scipy.io.wavfile import write
|
| 5 |
+
|
| 6 |
model = VitsModel.from_pretrained("../arabic-tts")
|
| 7 |
tokenizer = AutoTokenizer.from_pretrained("../arabic-tts")
|
|
|
|
|
|
|
| 8 |
text = "يوفر مجتمع البناء قروضا عقارية وقروض وعقارية"
|
| 9 |
inputs = tokenizer(text, return_tensors="pt")
|
| 10 |
|