Commit f654b2c9 authored by moto's avatar moto Committed by Facebook GitHub Bot
Browse files

Use download.pytorch.org for asset URL (#2182)

Summary:
Changing the URL of tutorial assets to `download.pytorch.org` which is more appropriate for user facing materials.

Pull Request resolved: https://github.com/pytorch/audio/pull/2182

Reviewed By: nateanl

Differential Revision: D33887839

Pulled By: mthrok

fbshipit-source-id: 30569672e8caf30aae5476036dfdadc8ebd436bf
parent ed6256a2
...@@ -75,7 +75,7 @@ acoustic_model = bundle.get_model() ...@@ -75,7 +75,7 @@ acoustic_model = bundle.get_model()
hub_dir = torch.hub.get_dir() hub_dir = torch.hub.get_dir()
speech_url = "https://pytorch.s3.amazonaws.com/torchaudio/tutorial-assets/ctc-decoding/1688-142285-0007.wav" speech_url = "https://download.pytorch.org/torchaudio/tutorial-assets/ctc-decoding/1688-142285-0007.wav"
speech_file = f"{hub_dir}/speech.wav" speech_file = f"{hub_dir}/speech.wav"
torch.hub.download_url_to_file(speech_url, speech_file) torch.hub.download_url_to_file(speech_url, speech_file)
...@@ -149,7 +149,7 @@ print(tokens) ...@@ -149,7 +149,7 @@ print(tokens)
# ... # ...
# #
lexicon_url = "https://pytorch.s3.amazonaws.com/torchaudio/tutorial-assets/ctc-decoding/lexicon-librispeech.txt" lexicon_url = "https://download.pytorch.org/torchaudio/tutorial-assets/ctc-decoding/lexicon-librispeech.txt"
lexicon_file = f"{hub_dir}/lexicon.txt" lexicon_file = f"{hub_dir}/lexicon.txt"
torch.hub.download_url_to_file(lexicon_url, lexicon_file) torch.hub.download_url_to_file(lexicon_url, lexicon_file)
...@@ -167,7 +167,7 @@ torch.hub.download_url_to_file(lexicon_url, lexicon_file) ...@@ -167,7 +167,7 @@ torch.hub.download_url_to_file(lexicon_url, lexicon_file)
# `LibriSpeech <http://www.openslr.org/11>`__. # `LibriSpeech <http://www.openslr.org/11>`__.
# #
kenlm_url = "https://pytorch.s3.amazonaws.com/torchaudio/tutorial-assets/ctc-decoding/4-gram-librispeech.bin" kenlm_url = "https://download.pytorch.org/torchaudio/tutorial-assets/ctc-decoding/4-gram-librispeech.bin"
kenlm_file = f"{hub_dir}/kenlm.bin" kenlm_file = f"{hub_dir}/kenlm.bin"
torch.hub.download_url_to_file(kenlm_url, kenlm_file) torch.hub.download_url_to_file(kenlm_url, kenlm_file)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment