Skip to content

Commit

Permalink
Added Audio Notification
Browse files Browse the repository at this point in the history
  • Loading branch information
hinabl committed Nov 23, 2023
1 parent a216d4b commit be3eb40
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/Hina_Modified_Realtime_Voice_Changer_on_Colab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@
"\n",
"#@markdown **5** - *(optional)* Other options:\n",
"ClearConsole = True # @param {type:\"boolean\"}\n",
"Play_Notification = True # @param {type:\"boolean\"}\n",
"\n",
"# ---------------------------------\n",
"# DO NOT TOUCH ANYTHING DOWN BELOW!\n",
Expand All @@ -273,6 +274,10 @@
"public_url = ngrokConnection.public_url\n",
"\n",
"from IPython.display import clear_output\n",
"from IPython.display import Audio, display\n",
"def play_notification_sound():\n",
" display(Audio(url='https://raw.githubusercontent.com/hinabl/rmvpe-ai-kaggle/main/custom/audios/notif.mp3', autoplay=True))\n",
"\n",
"\n",
"def wait_for_server():\n",
" while True:\n",
Expand All @@ -288,6 +293,8 @@
" print(\"Your server is available at:\")\n",
" print(public_url)\n",
" print(\"---------------------------------\")\n",
" if Play_Notification==True:\n",
" play_notification_sound()\n",
"\n",
"threading.Thread(target=wait_for_server, daemon=True).start()\n",
"\n",
Expand Down

0 comments on commit be3eb40

Please sign in to comment.