Skip to content

Commit 4e62cf9

Browse files
authored
URL fixes and URL check fixes (#2692)
* Fix URLs to `unstable-v0.6`, use relative link for `recipes/` * Relative link in readme for PERFORMANCE.md * URL to Spectral Clutsering in README dead, point to web archive copy * Replace dead URL to `wham_noise.zip` This AWS bucket link is used in `recipes/ESC50` and is linked to in http://wham.whisper.ai/ which seems to be treated as the official source for that dataset elsewhere in SB. Not going to bother moving it to `fetch`. * check_url.yaml rework, regex support, parallel, expanded scope * Tutorial URL fix * Fix links to inference code that was changed in 1.0 * Web archive BPE_Gage.pdf * Remove broken link to PyTorch doc in tutorial I am not sure what this is actually intended to point to, as the URL seemingly referred to `torchvision`. Removing for now... * Fix link to doc in quaternion tutorial * Fix link to papers in tutorial * Fix Colab/GitHub URL for asr-metrics.ipynb * Fix more tutorial dead links to the web archive * Update ESC-50 dataset link and ignore dead URL false positive * Ignore dead URL false positive in DNS * Be more verbose about URL check errors * Ignore URL check true positive for urbansounddataset This is the actual README, i'll avoid tampering with it beyond adding a notice. Better indicate to the user the link might be dead. * Fix format string typo * Fix formatting * Add the web archive to ignored URLs for URL checks * Add arXiv to ignored URLs for URL checks * Disable TLS verification in URL checks This fixes the URL check for `https://sail.usc.edu`. We don't really care about the MITM risk here as we do nothing with the data. * Add kaggle to URL exclusion regex * VoxLingua107 pre-compiled shards are dead, add warning + ignore check * Undo broken ')' handling for URL check, just ignore one URL for now * Fix URL and typo in speech-classification-from-scratch * Formatting * Ignore TLS verify=False warning in URL check
1 parent adf6010 commit 4e62cf9

17 files changed

Lines changed: 155 additions & 89 deletions

README.md

Lines changed: 24 additions & 24 deletions
Large diffs are not rendered by default.

docs/tutorials/advanced/data-loading-for-big-datasets-and-shared-filesystems.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"\n",
2828
"Do you have a large dataset stored in a shared filesystem, and you want to use it for training a neural network? Is this dataset so large that it doesn't even fit into the local SSD of your computation nodes? If so, this tutorial will walk you through all the needed steps to manage reading large files from a shared filesystem.\n",
2929
"\n",
30-
"In many compute clusters, the main data storage is a network filesystem (NFS), for example [Lustre](https://en.wikipedia.org/wiki/Lustre_(file_system)). The NFS can serve many users concurrently and provide high data throughput from a single file. However, opening or listing many different files is slow - and doing so may slow the whole system down for everyone, not just the offending user. Speech datasets usually consist of very many small recordings. Reading every file again and again is exactly the kind of data IO that can slow down an NFS.\n",
30+
"In many compute clusters, the main data storage is a network filesystem (NFS), for example [Lustre](https://en.wikipedia.org/wiki/Lustre_(file_system)). <!-- ignore-url-check --> The NFS can serve many users concurrently and provide high data throughput from a single file. However, opening or listing many different files is slow - and doing so may slow the whole system down for everyone, not just the offending user. Speech datasets usually consist of very many small recordings. Reading every file again and again is exactly the kind of data IO that can slow down an NFS.\n",
3131
"\n",
3232
"One solution is to copy the dataset into the **local SSD** of the computing node. This can be done relatively efficiently by compressing the dataset into a single file (e.g. `dataset.tar.gz`), copying it into the local node, and finally, uncompressing (untarring) the file. Reading files from the local SSD is very efficient and does not harm the performance of the shared filesystem.\n",
3333
"The standard SpeechBrain data IO works well in this case, see [this tutorial](https://speechbrain.readthedocs.io/en/latest/tutorials/basics/data-loading-pipeline.html).\n",

docs/tutorials/advanced/inferring-on-your-own-speechbrain-models.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
"\n",
141141
"### 2. Using the `EndoderDecoderASR` interface\n",
142142
"\n",
143-
"The [EncoderDecoderASR class](https://github.com/speechbrain/speechbrain/blob/develop/speechbrain/pretrained/interfaces.py#L353). interface allows you to decouple your trained model from the training recipe and to infer (or encode) on any new audio file in few lines of code. If you are not interested in ASR, you'll find many other interfaces to fit your purpose in the `interfaces.py` file. This solution must be preferred if you intend to deploy your model in a production fashion i.e. if you plan to use your model a lot and in a stable way. Of course, this will require you to slightly rework the yaml.\n",
143+
"The [EncoderDecoderASR class](https://github.com/speechbrain/speechbrain/blob/develop/speechbrain/inference/ASR.py). interface allows you to decouple your trained model from the training recipe and to infer (or encode) on any new audio file in few lines of code. If you are not interested in ASR, you'll find many other interfaces to fit your purpose in the `interfaces.py` file. This solution must be preferred if you intend to deploy your model in a production fashion i.e. if you plan to use your model a lot and in a stable way. Of course, this will require you to slightly rework the yaml.\n",
144144
"\n",
145145
"The class has the following methods:\n",
146146
"\n",
@@ -441,7 +441,7 @@
441441
"\n",
442442
"While the `EncoderDecoderASR` class has been designed to be as generic as possible, your might require a more complex inference scheme that better fits your needs. In this case, you have to develop your own interface. To do so, follow these steps:\n",
443443
"\n",
444-
"1. Create your custom interface inheriting from `Pretrained` (code [here](https://github.com/speechbrain/speechbrain/blob/develop/speechbrain/pretrained/interfaces.py)):\n",
444+
"1. Create your custom interface inheriting from `Pretrained` (code [in this file](https://github.com/speechbrain/speechbrain/blob/develop/speechbrain/inference/interfaces.py)):\n",
445445
"\n",
446446
"\n",
447447
"```python\n",
@@ -499,11 +499,11 @@
499499
"\n",
500500
"As you can see, this formalism is extremely flexible and enables you to create a holistic interface that can be used to do anything you want with your pretrained model.\n",
501501
"\n",
502-
"We provide different generic interfaces for E2E ASR, speaker recognition, source separation, speech enhancement, etc. Please have a look [here](https://github.com/speechbrain/speechbrain/blob/develop/speechbrain/pretrained/interfaces.py) if interested!\n",
502+
"We provide different generic interfaces for E2E ASR, speaker recognition, source separation, speech enhancement, etc. Please have a look [here](https://github.com/speechbrain/speechbrain/tree/develop/speechbrain/inference) if interested!\n",
503503
"\n",
504504
"\n",
505505
"## General Pretraining Inference\n",
506-
"In some cases, users might want to develop their inference interface in an external file. This can be done using the [foreign class](https://github.com/speechbrain/speechbrain/blob/develop/speechbrain/pretrained/interfaces.py#L28).\n",
506+
"In some cases, users might want to develop their inference interface in an external file. This can be done using the [foreign class](https://github.com/speechbrain/speechbrain/blob/develop/speechbrain/inference/interfaces.py).\n",
507507
"You can take a look at the example reported [here](https://huggingface.co/speechbrain/emotion-recognition-wav2vec2-IEMOCAP):\n",
508508
"\n",
509509
"\n",

docs/tutorials/advanced/text-tokenizer.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"\n",
4242
"\n",
4343
"SpeechBrain currently relies on a custom integration of the [*SentencePiece tokenizer*](https://github.com/google/sentencepiece) which treats the input as a raw input stream. The following tokenizer algorithms are supported:\n",
44-
"1. [BPE](https://www.derczynski.com/papers/archive/BPE_Gage.pdf).\n",
44+
"1. [BPE](https://web.archive.org/web/20230319172720/https://www.derczynski.com/papers/archive/BPE_Gage.pdf).\n",
4545
"2. [Unigram](https://arxiv.org/pdf/1804.10959.pdf) (Subword Regularization).\n",
4646
"\n",
4747
"\n",

docs/tutorials/basics/data-loading-pipeline.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
},
119119
"source": [
120120
"### Dataset\n",
121-
"The role of the Dataset is to produce single data points. Typically they are loaded off the disk, but they could also come from some more complex source or in some cases just from RAM. You can write your own Dataset subclass or sometimes you can use a standardized class, such as [this](https://pytorch.org/docs/stable/torchvision/datasets.html#datasetfolder). The training, validation, and test subsets get their own Dataset instances.\n",
121+
"The role of the Dataset is to produce single data points. Typically they are loaded off the disk, but they could also come from some more complex source or in some cases just from RAM. You can write your own Dataset subclass or sometimes you can use a standardized class. The training, validation, and test subsets get their own Dataset instances.\n",
122122
"\n",
123123
"The Dataset interface is simple; it implements\n",
124124
"`__getitem__` and usually also `__len__`. Usually, \"map-style\" Datasets are used, but it's worth noting that PyTorch also has a notion of [IterableDataset](https://pytorch.org/docs/stable/data.html#iterable-style-datasets)s.\n",

docs/tutorials/nn/complex-and-quaternion-neural-networks.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@
560560
"1. Compose a real-valued matrix from the different weight components\n",
561561
"2. Apply a matrix product between the input and this rotation matrix!\n",
562562
"\n",
563-
"[Check the code!](http://www.darnault-parcollet.fr/Parcollet/hiddennoshare/speechbrain.github.io/documentation/speechbrain.nnet.quaternion_networks.q_ops.html#speechbrain.nnet.quaternion_networks.q_ops.quaternion_linear_rotation_op)\n",
563+
"[Check the code!](https://speechbrain.readthedocs.io/en/latest/API/speechbrain.nnet.quaternion_networks.q_ops.html#speechbrain.nnet.quaternion_networks.q_ops.quaternion_linear_rotation_op)\n",
564564
"\n",
565565
"### Turning a quaternion layer into a spinor layer\n",
566566
"\n",

docs/tutorials/preprocessing/speech-features.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@
392392
},
393393
"source": [
394394
"## References\n",
395-
"[1] P. Mermelstein (1976), \"Distance measures for speech recognition, psychological and instrumental,\" in Pattern Recognition and Artificial Intelligence. [ArXiv](http://www.haskins.yale.edu/sr/SR047/SR047_07.pdf)\n",
395+
"[1] P. Mermelstein (1976), \"Distance measures for speech recognition, psychological and instrumental,\" in Pattern Recognition and Artificial Intelligence. [pdf (Web Archive)](https://web.archive.org/web/20200714014004/http://www.haskins.yale.edu/sr/SR047/SR047_07.pdf)\n",
396396
"\n",
397397
"[2] X. Huang, A. Acero (Author), H.-W. Hon, \"Spoken Language Processing: A Guide to Theory, Algorithm and System Development Paperback – 2001\n",
398398
"\n",

docs/tutorials/tasks/asr-metrics.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
"<!-- This cell is automatically updated by tools/tutorial-cell-updater.py -->\n",
1313
"<!-- The contents are initialized from tutorials/notebook-header.md -->\n",
1414
"\n",
15-
"[<img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>](https://colab.research.google.com/github/speechbrain/speechbrain/blob/develop/docs/tutorials/tasks/pr2451-new-metrics.ipynb)\n",
15+
"[<img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>](https://colab.research.google.com/github/speechbrain/speechbrain/blob/develop/docs/tutorials/tasks/asr-metrics.ipynb)\n",
1616
"to execute or view/download this notebook on\n",
17-
"[GitHub](https://github.com/speechbrain/speechbrain/tree/develop/docs/tutorials/tasks/pr2451-new-metrics.ipynb)"
17+
"[GitHub](https://github.com/speechbrain/speechbrain/tree/develop/docs/tutorials/tasks/asr-metrics.ipynb)"
1818
]
1919
},
2020
{

docs/tutorials/tasks/speech-classification-from-scratch.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@
871871
"source": [
872872
"## Step 3: Inference\n",
873873
"\n",
874-
"At this point, we can use the trained classifier to perform **predictions on new data**. Speechbrain made available some classes ([take a look here](https://github.com/speechbrain/speechbrain/blob/develop/speechbrain/pretrained/interfaces.py)) such as the `EncoderClassifier` one that can make inference easier. The class can also be used to extract some embeddings at the output of the encoder.\n",
874+
"At this point, we can use the trained classifier to perform **predictions on new data**. Speechbrain made available some classes ([take a look here](https://github.com/speechbrain/speechbrain/blob/develop/speechbrain/inference/classifiers.py)) such as the `EncoderClassifier` one that can make inference easier. The class can also be used to extract some embeddings at the output of the encoder.\n",
875875
"\n",
876876
"Let's see first how can we used it to load our best xvector model (trained on Voxceleb and stored on HuggingFace) to compute some embeddings and perform a speaker classification:\n"
877877
]
@@ -1256,7 +1256,7 @@
12561256
"\n",
12571257
"### Use the EncoderClassifier interface on your model\n",
12581258
"\n",
1259-
"The [EncoderClassidier class](https://github.com/speechbrain/speechbrain/blob/develop/speechbrain/pretrained/interfaces.py#L591) takes a pre-trained model and performs inference on it with the following methods:\n",
1259+
"The [EncoderClassifier class](https://github.com/speechbrain/speechbrain/blob/develop/speechbrain/inference/classifiers.py) takes a pre-trained model and performs inference on it with the following methods:\n",
12601260
"\n",
12611261
"- **encode_batch**: applies the encoder to an input batch and returns some encoded embeddings.\n",
12621262
"- **classify_batch**: performs a full classification step and returns the output probabilities of the classifier, the best score, the index of the best class, and its label in text format (see example above).\n",

docs/tutorials/tasks/speech-recognition-from-scratch.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
"source": [
159159
"We encourage the readers not familiar enough with speech recognition to gain more familiarity with this technology before moving on. Beyond scientific papers, online you can find amazing tutorials and blog posts, such as:\n",
160160
"- [An Intuitive Explanation of Connectionist Temporal Classification](https://towardsdatascience.com/intuitively-understanding-connectionist-temporal-classification-3797e43a86c)\n",
161-
"- [Connectionist Temporal Classification](https://machinelearning-blog.com/2018/09/05/753/)\n",
161+
"- [Connectionist Temporal Classification](https://web.archive.org/web/20211017041333/https://machinelearning-blog.com/2018/09/05/753/)\n",
162162
"- [Sequence-to-sequence learning with Transducers](https://lorenlugosch.github.io/posts/2020/11/transducer/)\n",
163163
"- [Understanding Encoder-Decoder Sequence to Sequence Model](https://towardsdatascience.com/understanding-encoder-decoder-sequence-to-sequence-model-679e04af4346)\n",
164164
"- [What is a Transformer?](https://medium.com/inside-machine-learning/what-is-a-transformer-d07dd1fbec04)\n",
@@ -1845,7 +1845,7 @@
18451845
"source": [
18461846
"## Step 5: Inference\n",
18471847
"\n",
1848-
"At this point, we can use the trained speech recognizer. For this type of ASR model, speechbrain made available some classes ([take a look here](https://github.com/speechbrain/speechbrain/blob/develop/speechbrain/pretrained/interfaces.py)) such as the `EncoderDecoderASR` one that can make inference easier. For instance, we can transcribe an audio file with a pre-trained model hosted in our [HuggingFace repository](https://huggingface.co/speechbrain) in solely 4 lines of code:\n"
1848+
"At this point, we can use the trained speech recognizer. For this type of ASR model, speechbrain made available some classes ([take a look here](https://github.com/speechbrain/speechbrain/blob/develop/speechbrain/inference/ASR.py)) such as the `EncoderDecoderASR` one that can make inference easier. For instance, we can transcribe an audio file with a pre-trained model hosted in our [HuggingFace repository](https://huggingface.co/speechbrain) in solely 4 lines of code:\n"
18491849
]
18501850
},
18511851
{
@@ -2174,7 +2174,7 @@
21742174
"\n",
21752175
"While the `EncoderDecoderASR` class has been designed to be as generic as possible, your might require a more complex inference scheme that better fits your needs. In this case, you have to develop your own interface. To do so, follow these steps:\n",
21762176
"\n",
2177-
"1. Create your custom interface inheriting from `Pretrained` (code [here](https://github.com/speechbrain/speechbrain/blob/develop/speechbrain/pretrained/interfaces.py)):\n",
2177+
"1. Create your custom interface inheriting from `Pretrained` (code [here](https://github.com/speechbrain/speechbrain/blob/develop/speechbrain/inference/interfaces.py)):\n",
21782178
"\n",
21792179
"\n",
21802180
"```python\n",

0 commit comments

Comments
 (0)