Spaces:
Sleeping
Sleeping
Download test.py from YousryEssam/StyleTTS2-Public-API-2: direct link, hf CLI and curl.
- Browser
- Download file 349 Bytes
-
https://huggingface.co/spaces/YousryEssam/StyleTTS2-Public-API-2/resolve/main/test.py
- Command line
-
hf download hf://spaces/YousryEssam/StyleTTS2-Public-API-2/test.py
-
curl -L -o test.py https://huggingface.co/spaces/YousryEssam/StyleTTS2-Public-API-2/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) | |