abderrahimbrighal commited on
Commit
758b718
·
verified ·
1 Parent(s): 1ae2d44

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
+
3
+ # Example using a model hosted on the Hugging Face Hub
4
+ narrator = pipeline("text-to-speech", model="kakao-enterprise/vits-ljs")
5
+ text = "Your input text here."
6
+ narrated_text = narrator(text)
7
+ from IPython.display import Audio as IPythonAudio
8
+
9
+ IPythonAudio(narrated_text["audio"][0], rate=narrated_text["sampling_rate"])