Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -239,12 +239,14 @@ def main():
|
|
239 |
if __name__ == "__main__":
|
240 |
main()
|
241 |
"""
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
|
|
|
|
|
239 |
if __name__ == "__main__":
|
240 |
main()
|
241 |
"""
|
242 |
+
import ChatTTS
|
243 |
+
import torchaudio
|
244 |
+
|
245 |
+
chat = ChatTTS.Chat()
|
246 |
+
chat.load_models(compile=False) # Set to True for better performance
|
247 |
+
|
248 |
+
texts = ["A reporter from Gaza, Abdullah Aljamal, who wrote for the American newspaper The Palestine Chronicle, was holding hostages in his home. The Israeli army killed him, and three hostages were rescued from his house. From October 7 to June 8, while the hostages were held captive, Abdullah reported on the horrors of war, highlighting what he described as a genocide by Israel. His last pieces didnt mention that the war started after the October 7 massacre and hostage-taking. Instead, he focused on sick children and elderly people suffering because of Israel. Abdullah was listed as an author on The Palestine Chronicles website. They published articles about his death, denying any involvement in holding hostages. The Palestine Chronicle is run by a nonprofit called People Media. Jason Smith, a Missouri State Representative, believes this organization uses its status to support terrorism. Notably, Noam Chomsky, the famous linguist and leftist philosopher, is an honorary member of The Palestine Chronicles editorial board. He has called the publication an invaluable source of information and analysis about Palestine.",]
|
249 |
+
|
250 |
+
wavs = chat.infer(texts, )
|
251 |
+
|
252 |
+
torchaudio.save("output1.wav", torch.from_numpy(wavs[0]), 24000)
|