Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Torchaudio
Commits
ac1c9d5c
"vscode:/vscode.git/clone" did not exist on "c732df654546c5a17797464335524390a1e865e5"
Unverified
Commit
ac1c9d5c
authored
Aug 03, 2021
by
yangarbiter
Committed by
GitHub
Aug 03, 2021
Browse files
Fix encoding of CMUDict data reading (#1665)
parent
43047865
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torchaudio/datasets/cmudict.py
torchaudio/datasets/cmudict.py
+1
-1
No files found.
torchaudio/datasets/cmudict.py
View file @
ac1c9d5c
...
...
@@ -148,7 +148,7 @@ class CMUDict(Dataset):
with
open
(
os
.
path
.
join
(
self
.
_root_path
,
basename_symbols
),
"r"
)
as
text
:
self
.
_symbols
=
[
line
.
strip
()
for
line
in
text
.
readlines
()]
with
open
(
os
.
path
.
join
(
self
.
_root_path
,
basename
),
"r"
)
as
text
:
with
open
(
os
.
path
.
join
(
self
.
_root_path
,
basename
),
"r"
,
encoding
=
'latin-1'
)
as
text
:
self
.
_dictionary
=
_parse_dictionary
(
text
.
readlines
(),
exclude_punctuations
=
self
.
exclude_punctuations
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment