Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion neon_utils/parse_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,11 @@ def get_phonemes(phrase: str) -> str:
download_path = os.path.expanduser("~/.local/share/neon")
if not os.path.isdir(download_path):
os.makedirs(download_path)
# nltk authorizes download targets against `nltk.data.path`, so the path
# must be registered before the download, not after
if download_path not in nltk.data.path:
nltk.data.path.append(download_path)
nltk.download('cmudict', download_dir=download_path)
nltk.data.path.append(download_path)

output = ''
for word in phrase.split():
Expand Down
Loading