audio.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:projectoxford 作者: zooba 项目源码 文件源码
def play(wav, device_id=None):
    '''Plays a wave file using a playback device.
    The function will block until playback is complete.

    wav:
        An open `wave.Wave_read` object, a `bytes` object containing
        a wave file, or a valid argument to `wave.open`.
    device_id:
        The device to play over. Defaults to the first available.
    '''
    if device_id is None:
        device_id = get_playback_devices()[0][1]

    with _open_wav(wav) as w:
        return _play(device_id, w)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号