Spaces:
Build error
Build error
Create app.py
Browse files
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"])
|