Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASR Notebooks fix for 1.1.0 #2395

Merged
merged 2 commits into from
Jun 24, 2021
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions tutorials/asr/03_Speech_Commands.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@
"source": [
"# Preserve some useful parameters\n",
"labels = config.model.labels\n",
"sample_rate = config.sample_rate"
"sample_rate = config.model.sample_rate"
],
"execution_count": null,
"outputs": []
Expand Down Expand Up @@ -1625,4 +1625,4 @@
]
}
]
}
}
6 changes: 1 addition & 5 deletions tutorials/asr/04_Online_Offline_Speech_Commands_Demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"This notebook demonstrates offline and online (from a microphone's stream in NeMo) speech commands recognition \n",
"\n",
"It is **not a recommended** way to do inference in production workflows. If you are interested in \n",
"production-level inference using NeMo ASR models, please sign-up to Jarvis early access program: https://developer.nvidia.com/nvidia-jarvis"
"This notebook demonstrates offline and online (from a microphone's stream in NeMo) speech commands recognition "
]
},
{
Expand Down
12 changes: 6 additions & 6 deletions tutorials/asr/05_Online_Noise_Augmentation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@
"outputs": [],
"source": [
"# Import the data augmentation component from ASR collection\n",
"from nemo.collections.asr.parts import perturb, segment"
"from nemo.collections.asr.parts.preprocessing import perturb, segment"
]
},
{
Expand Down Expand Up @@ -1188,7 +1188,7 @@
"outputs": [],
"source": [
"# We use a NeMo utility to parse the manifest file for us\n",
"from nemo.collections.asr.parts import collections, parsers\n",
"from nemo.collections.common.parts.preprocessing import collections, parsers\n",
"\n",
"class NoisePerturbationEval(perturb.Perturbation):\n",
" def __init__(\n",
Expand Down Expand Up @@ -1303,18 +1303,18 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
"version": "3.7.7"
},
"pycharm": {
"stem_cell": {
"cell_type": "raw",
"source": [],
"metadata": {
"collapsed": false
}
},
"source": []
}
}
},
"nbformat": 4,
"nbformat_minor": 4
}
}
8 changes: 4 additions & 4 deletions tutorials/asr/06_Voice_Activiy_Detection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@
"source": [
"# Preserve some useful parameters\n",
"labels = config.model.labels\n",
"sample_rate = config.sample_rate"
"sample_rate = config.model.sample_rate"
]
},
{
Expand Down Expand Up @@ -1157,13 +1157,13 @@
"pycharm": {
"stem_cell": {
"cell_type": "raw",
"source": [],
"metadata": {
"collapsed": false
}
},
"source": []
}
}
},
"nbformat": 4,
"nbformat_minor": 1
}
}
6 changes: 1 addition & 5 deletions tutorials/asr/07_Online_Offline_Microphone_VAD_Demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,7 @@
"2. [finetuning](#Finetune) and use [posterior](#Posterior);\n",
"2. [threshold tuning](#Tuning-threshold);\n",
"4. [online streaming inference](#Online-streaming-inference);\n",
"3. [online streaming inference from a microphone's stream](#Online-streaming-inference-through-microphone).\n",
"\n",
"\n",
"It is **not a recommended** way to do inference in production workflows. If you are interested in \n",
"production-level inference using NeMo ASR models, please sign-up to Jarvis early access program: https://developer.nvidia.com/nvidia-jarvis"
"3. [online streaming inference from a microphone's stream](#Online-streaming-inference-through-microphone).\n"
]
},
{
Expand Down
13 changes: 3 additions & 10 deletions tutorials/speaker_recognition/ASR_with_SpeakerDiarization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@
"metadata": {},
"outputs": [],
"source": [
"from nemo.collections.asr.parts.speaker_utils import write_rttm2manifest\n",
"from nemo.collections.asr.parts.utils.speaker_utils import write_rttm2manifest\n",
"output_dir = os.path.join(ROOT, 'oracle_vad')\n",
"os.makedirs(output_dir,exist_ok=True)\n",
"oracle_manifest = os.path.join(output_dir,'oracle_manifest.json')\n",
Expand Down Expand Up @@ -466,7 +466,7 @@
"metadata": {},
"outputs": [],
"source": [
"from nemo.collections.asr.parts.speaker_utils import rttm_to_labels\n",
"from nemo.collections.asr.parts.utils.speaker_utils import rttm_to_labels\n",
"pred_rttm=os.path.join(output_dir,'pred_rttms',uniq_id+'.rttm')\n",
"labels=rttm_to_labels(pred_rttm)\n",
"print(\"speaker labels with time stamps\\n\",labels)"
Expand Down Expand Up @@ -522,13 +522,6 @@
"\n",
"print(words[j+1],end=\" \")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -547,7 +540,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.10"
"version": "3.7.7"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"metadata": {},
"outputs": [],
"source": [
"from nemo.collections.asr.parts.speaker_utils import rttm_to_labels, labels_to_pyannote_object"
"from nemo.collections.asr.parts.utils.speaker_utils import rttm_to_labels, labels_to_pyannote_object"
]
},
{
Expand Down Expand Up @@ -212,7 +212,7 @@
"metadata": {},
"outputs": [],
"source": [
"from nemo.collections.asr.parts.speaker_utils import write_rttm2manifest\n",
"from nemo.collections.asr.parts.utils.speaker_utils import write_rttm2manifest\n",
"output_dir = os.path.join(ROOT, 'oracle_vad')\n",
"os.makedirs(output_dir,exist_ok=True)"
]
Expand Down Expand Up @@ -485,7 +485,7 @@
"outputs": [],
"source": [
"# VAD predicted time stamps\n",
"from nemo.collections.asr.parts.vad_utils import extract_labels, plot\n",
"from nemo.collections.asr.parts.utils.vad_utils import extract_labels, plot\n",
"\n",
"plot(paths2audio_files[0],\n",
" 'outputs/vad_outputs/overlap_smoothing_output_median_0.875/an4_diarize_test.median', \n",
Expand Down Expand Up @@ -615,7 +615,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.10"
"version": "3.7.7"
},
"pycharm": {
"stem_cell": {
Expand Down