Skip to content

Commit

Permalink
Fix encoding for commonvoice.py
Browse files Browse the repository at this point in the history
On windows, this defaults to cp1252, an incorrect encoding for this file
  • Loading branch information
jacobjennings authored Apr 27, 2024
1 parent ea437b3 commit 92080a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/torchaudio/datasets/commonvoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __init__(self, root: Union[str, Path], tsv: str = "train.tsv") -> None:
self._path = os.fspath(root)
self._tsv = os.path.join(self._path, tsv)

with open(self._tsv, "r") as tsv_:
with open(self._tsv, "r", encoding="utf-8") as tsv_:
walker = csv.reader(tsv_, delimiter="\t")
self._header = next(walker)
self._walker = list(walker)
Expand Down

0 comments on commit 92080a4

Please sign in to comment.