Skip to content

Commit

Permalink
Merge pull request facebookresearch#262 from rameerez/patch-1
Browse files Browse the repository at this point in the history
Fix `get_bip_bip` function not using frequency param
  • Loading branch information
JadeCopet committed Nov 27, 2023
2 parents f83babf + 77db0a0 commit 89baee7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion demos/audiogen_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
" \"\"\"Generates a series of bip bip at the given frequency.\"\"\"\n",
" t = torch.arange(\n",
" int(duration * sample_rate), device=\"cuda\", dtype=torch.float) / sample_rate\n",
" wav = torch.cos(2 * math.pi * 440 * t)[None]\n",
" wav = torch.cos(2 * math.pi * frequency * t)[None]\n",
" tp = (t % (2 * bip_duration)) / (2 * bip_duration)\n",
" envelope = (tp >= 0.5).float()\n",
" return wav * envelope"
Expand Down

0 comments on commit 89baee7

Please sign in to comment.