[transcriberbin] - make audioqueue leaky

If transcription runs slow or has issues the queue can fill up and block
all audio processing. This gives the queue a sufficent buffer and allows
it to drop audio if it eventually fills up. This was most noticable with
bad internet connections using the `awstrnascriber` where it would take
quite a while for the websocket to eventually timeout and the bin to
enter `passthrough=true`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/688>
This commit is contained in:
Ray Tiley 2022-03-10 09:29:12 -05:00 committed by Arun Raghavan
parent 45c8f3d49d
commit 602dbc7a02

View file

@ -94,6 +94,10 @@ impl TranscriberBin {
gst_debug!(CAT, obj: element, "Building transcription bin");
let aqueue_transcription = gst::ElementFactory::make("queue", Some("transqueue"))?;
aqueue_transcription.set_property("max-size-buffers", 0u32);
aqueue_transcription.set_property("max-size-bytes", 0u32);
aqueue_transcription.set_property("max-size-time", 5_000_000_000u64);
aqueue_transcription.set_property_from_str("leaky", "downstream");
let ccconverter = gst::ElementFactory::make("ccconverter", None)?;
state.transcription_bin.add_many(&[