Skip to content

Commit

Permalink
Feature: Implement UTF-8 readfile support in MMS for TTS example (#5148)
Browse files Browse the repository at this point in the history
  • Loading branch information
serkandyck committed May 26, 2023
1 parent 35641fb commit b309803
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/mms/tts/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

class TextMapper(object):
def __init__(self, vocab_file):
self.symbols = [x.replace("\n", "") for x in open(vocab_file).readlines()]
self.symbols = [x.replace("\n", "") for x in open(vocab_file, encoding="utf-8").readlines()]
self.SPACE_ID = self.symbols.index(" ")
self._symbol_to_id = {s: i for i, s in enumerate(self.symbols)}
self._id_to_symbol = {i: s for i, s in enumerate(self.symbols)}
Expand Down

0 comments on commit b309803

Please sign in to comment.