Spaces:
Runtime error
Runtime error
Upload synthesizer/utils/symbols.py with huggingface_hub
Browse files- synthesizer/utils/symbols.py +17 -0
synthesizer/utils/symbols.py
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""
|
2 |
+
Defines the set of symbols used in text input to the model.
|
3 |
+
|
4 |
+
The default is a set of ASCII characters that works well for English or text that has been run
|
5 |
+
through Unidecode. For other data, you can modify _characters. See TRAINING_DATA.md for details.
|
6 |
+
"""
|
7 |
+
# from . import cmudict
|
8 |
+
|
9 |
+
_pad = "_"
|
10 |
+
_eos = "~"
|
11 |
+
_characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!\'\"(),-.:;? "
|
12 |
+
|
13 |
+
# Prepend "@" to ARPAbet symbols to ensure uniqueness (some are the same as uppercase letters):
|
14 |
+
#_arpabet = ["@' + s for s in cmudict.valid_symbols]
|
15 |
+
|
16 |
+
# Export all symbols:
|
17 |
+
symbols = [_pad, _eos] + list(_characters) #+ _arpabet
|