[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 GStreamer Marge Bot
parent 22585a0383
commit dd028ce97e

View file

@ -93,6 +93,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(&[