AudioRecorder¶

A AudioRecorder allows you to record audio from almost any stream object, e.g. from:

[1]:
from ipywebrtc import VideoStream, AudioStream, AudioRecorder
[2]:
video = VideoStream.from_url('./Big.Buck.Bunny.mp4')
video
[3]:
recorder = AudioRecorder(stream=video)
recorder
[4]:
video.playing = False
[5]:
recorder.audio
[ ]:
recorder.save('example.webm')
[ ]:
from ipywidgets import Audio

example = Audio.from_file('example.webm')
example
[ ]:
audio_stream = AudioStream.from_file('example.webm')
audio_stream
[ ]:
recorder2 = AudioRecorder(stream=audio_stream)
recorder2
[ ]:
audio_stream.playing = False