Spaces:
Build error
Build error
Download test.py from YousryEssam/styletts2-publicAPI: direct link, hf CLI and curl.
- Browser
- Download file 349 Bytes
-
https://huggingface.co/spaces/YousryEssam/styletts2-publicAPI/resolve/main/test.py
- Command line
-
hf download hf://spaces/YousryEssam/styletts2-publicAPI/test.py
-
curl -L -o test.py https://huggingface.co/spaces/YousryEssam/styletts2-publicAPI/resolve/main/test.py
349 Bytes
| from gruut import sentences | |
| text = input("> ") | |
| phonemes = '' | |
| for sent in sentences(text, lang="en-us"): | |
| for word in sent: | |
| if word.phonemes: | |
| print(word.text + ":" + ''.join(word.phonemes)) | |
| phonemes += ''.join(word.phonemes) | |
| else: | |
| print(word.text + ": NoPhonemes") | |
| print("--") | |
| print(phonemes) | |