xiph / opus-tools

A set of tools to encode, inspect, and decode audio in the Opus format.
https://opus-codec.org/
Other
212 stars 78 forks source link

Force silence using built-in VAD during encoding #82

Open vadimkantorov opened 8 months ago

vadimkantorov commented 8 months ago

Hi!

Is there an option for opusenc to reset to exact zero the frames without detected speech during encoding (leveraging this built-in VAD)? Is it possible to control the used thresholds from the opusenc frontend?

Do encoded frames contain a silence bit? (if so, these frames can be skipped during decoding as they would not contribute to speech recognized text further down the pipeline) I've read RFC and it seems so! This is also relevant for stereo and multi-channel call recording files as during decoding most of frames are silent when only one person is speaking.

Thank you :)

vadimkantorov commented 7 months ago

New --channels discrete can be used to force uncoupled encoding, but it would still be nice to have a mode for super-storage-space-efficient silent frame encoding (using VAD or by passing some threshold) of long effective silence (e.g. one silent person listening to another person speaking)

vadimkantorov commented 7 months ago

Related on DTX: