Skip to content

Commit

Permalink
Add data loading example for anechoic data to mixture generator notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
thequilo committed May 17, 2022
1 parent dc48a17 commit 91d3b60
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion notebooks/mixture_generator.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,26 @@
"plot_mixtures(ds)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ff92352e",
"metadata": {
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"# Load audio\n",
"from mms_msg import keys\n",
"ds = ds\\\n",
" .map(lambda example: load_audio(example, keys.ORIGINAL_SOURCE))\\\n",
" .map(mms_msg.simulation.anechoic.anechoic_scenario_map_fn)\n",
"ex = ds[0]\n",
"pb.io.play(ex['audio_data']['observation'], sample_rate=8000)"
]
},
{
"cell_type": "markdown",
"id": "0dd6c614",
Expand Down Expand Up @@ -434,4 +454,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}

0 comments on commit 91d3b60

Please sign in to comment.