Skip to content

Commit f235d11

Browse files
committed
Add spanish frontend
1 parent 8596268 commit f235d11

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

deepvoice3_pytorch/frontend/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,9 @@
2525
except ImportError:
2626
ko = None
2727

28+
# if you are going to use the frontend, you need to modify _characters in symbol.py:
29+
# _characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!\'(),-.:;? ' + '¡¿ñáéíóúÁÉÍÓÚÑ'
30+
try:
31+
from deepvoice3_pytorch.frontend import es
32+
except ImportError:
33+
es = None
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# coding: utf-8
2+
from deepvoice3_pytorch.frontend.text.symbols import symbols
3+
4+
import nltk
5+
from random import random
6+
7+
n_vocab = len(symbols)
8+
9+
10+
def text_to_sequence(text, p=0.0):
11+
from deepvoice3_pytorch.frontend.text import text_to_sequence
12+
text = text_to_sequence(text, ["basic_cleaners"])
13+
return text
14+
15+
16+
from deepvoice3_pytorch.frontend.text import sequence_to_text

0 commit comments

Comments
 (0)