Is there a way to make Colab give an Audio Notification when cell has finished running(有没有办法让 Colab 在单元格运行完成时发出音频通知)
问题描述
我正在编写神经网络模型,并且训练时间很长,所以我想做其他事情,然后在单元运行完成后立即返回.
已经有一种方法可以跟踪这一点,因为标签图标在忙碌时是灰色的,而在完成时是黄色的.但我找不到与音频通知相关的内容.
在单元格完成时添加音频通知是两行的.例如,
# 播放提示音.任何音频 URL 都可以.从 google.colab 导入输出output.eval_js('new Audio("https://upload.wikimedia.org/wikipedia/commons/0/05/Beep-09.ogg").play()')这是一个示例笔记本:
公告在这里:https://twitter.com/GoogleColab/status/1291775273692614659
I am coding Neural Network models and trainings are long to run so I would like to go doing something else then go back as soon as the cell has finished running.
There is already a way to track this since the Tab Icon is grey when busy then yellow when done. But I can't find something abut audio notifications.
Adding an audio notification when a cell completes is a two-liner. For example,
# Play an audio beep. Any audio URL will do.
from google.colab import output
output.eval_js('new Audio("https://upload.wikimedia.org/wikipedia/commons/0/05/Beep-09.ogg").play()')
Here's an example notebook: https://colab.research.google.com/drive/1jrEy5V7FjzAq8Ydg22E1L72xZYsEQWlM
Edit: Colab now includes a setting that will deliver a browser notification when execution completes in the background. You can enable it in the settings like so:
The announcement is here: https://twitter.com/GoogleColab/status/1291775273692614659
这篇关于有没有办法让 Colab 在单元格运行完成时发出音频通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:有没有办法让 Colab 在单元格运行完成时发出音频
基础教程推荐
- 由Python将MP3转换为MIDI(类型错误:无法加载插件:mtg-Melodia:Melodia) 2022-01-01
- 尝试制作WhatsApp机器人 2022-01-01
- 与常规 dict 相比,Python manager.dict() 非常慢 2022-01-01
- 将 x 轴刻度更改为自定义字符串 2022-01-01
- 用 Python 编写 Fortran 无格式文件 2022-01-01
- numpy float:比算术运算中内置的慢 10 倍? 2022-01-01
- 使用生成器和迭代器时 Python 多循环失败 2022-01-01
- Discord.py 缺少必需的参数 2022-01-01
- 在 Celery 工作人员中捕获 Heroku SIGTERM 以优雅地关 2022-01-01
- pyserial - 可以从线程 a 写入串行端口,是否阻塞从线程 b 读取? 2022-01-01
