V
V
Vyacheslav Grachunov2020-08-28 17:06:46
Python
Vyacheslav Grachunov, 2020-08-28 17:06:46

How to generate PCM audio with silence of given duration?

How to generate PCM audio with silence of given duration? Specifically pcm_s16le.
Better with a Python library or via FFMPEG, but any others will work too

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
Zerg89, 2020-08-28
@Qwentor

ffmpeg -i /dev/zero -acodec pcm_s16le -ac 1 -ar 16000 output.wav
ac - number of channels
ar - frequency
i - source (may be a file)
ffmpeg -i output.wav -f segment -segment_time 3 -c copy out %03d.mp3
-segment_time -segment time in seconds

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question