Skip to content

Commit

Permalink
Merge branch 'refactor' of https://github.com/openvpi/DiffSinger into…
Browse files Browse the repository at this point in the history
… refactor
  • Loading branch information
yqzhishen committed Jan 9, 2023
2 parents ac95163 + fca04b2 commit c77e3df
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions utils/text_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,6 @@ def encode(self, s):
"""Converts a space-separated string of tokens to a list of ids."""
sentence = s
tokens = sentence.strip().split()
if self._replace_oov is not None:
tokens = [t if t in self._token_to_id else self._replace_oov
for t in tokens]
ret = [self._token_to_id[tok] for tok in tokens]
return ret[::-1] if self._reverse else ret

Expand Down

0 comments on commit c77e3df

Please sign in to comment.