Skip to content

Commit

Permalink
fixing filepath in quickstart notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
csteinmetz1 committed Nov 12, 2023
1 parent a7240e6 commit 40f199d
Showing 1 changed file with 35 additions and 36 deletions.
71 changes: 35 additions & 36 deletions examples/quickstart.ipynb
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"provenance": []
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "code",
Expand All @@ -27,33 +13,38 @@
},
{
"cell_type": "code",
"source": [
"!wget https://csteinmetz1.github.io/sounds/assets/short_riff.wav"
],
"execution_count": null,
"metadata": {
"id": "MsHHumIypsAy"
},
"execution_count": null,
"outputs": []
"outputs": [],
"source": [
"!wget https://csteinmetz1.github.io/sounds/assets/short_riff.wav"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "VGSU9x2VojWg"
},
"outputs": [],
"source": [
"import torch\n",
"import torchaudio\n",
"import dasp_pytorch"
],
"metadata": {
"id": "VGSU9x2VojWg"
},
"execution_count": null,
"outputs": []
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "MOhyTl3mopSi"
},
"outputs": [],
"source": [
"# Load audio\n",
"x, sr = torchaudio.load(\"short_riff.wav.1\")\n",
"x, sr = torchaudio.load(\"short_riff.wav\")\n",
"\n",
"# create batch dim\n",
"# (batch_size, n_channels, n_samples)\n",
Expand Down Expand Up @@ -82,14 +73,22 @@
" optimizer.step()\n",
" print(\n",
" f\"step: {n+1}/{n_iters}, loss: {loss.item():.3e}, drive: {drive_hat.item():.3f}\\r\"\n",
" )\n",
""
],
"metadata": {
"id": "MOhyTl3mopSi"
},
"execution_count": null,
"outputs": []
" )\n"
]
}
],
"metadata": {
"colab": {
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
}
]
}
},
"nbformat": 4,
"nbformat_minor": 0
}

0 comments on commit 40f199d

Please sign in to comment.