bcci commited on
Commit
e405a81
·
verified ·
1 Parent(s): df749c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -154,6 +154,7 @@ def tokenizer(text: str):
154
  """
155
  phonemes_string, _ = g2p(text)
156
  phonemes = [ph for ph in phonemes_string]
 
157
  tokens = [phoneme_vocab[phoneme] for phoneme in phonemes if phoneme in phoneme_vocab]
158
  return tokens
159
 
@@ -192,7 +193,6 @@ def tts_streaming(text: str, voice: str = "af_heart", speed: float = 1.0, format
192
  for i, chunk in enumerate(chunks):
193
  # Convert the chunk text to tokens.
194
  chunk_tokens = tokenizer(chunk)
195
- print(chunk_tokens)
196
 
197
  # For the first chunk, prepend 0; for later chunks, start with the previous chunk's last token.
198
  if i == 0:
 
154
  """
155
  phonemes_string, _ = g2p(text)
156
  phonemes = [ph for ph in phonemes_string]
157
+ print(phonemes)
158
  tokens = [phoneme_vocab[phoneme] for phoneme in phonemes if phoneme in phoneme_vocab]
159
  return tokens
160
 
 
193
  for i, chunk in enumerate(chunks):
194
  # Convert the chunk text to tokens.
195
  chunk_tokens = tokenizer(chunk)
 
196
 
197
  # For the first chunk, prepend 0; for later chunks, start with the previous chunk's last token.
198
  if i == 0: