textaccumulate

textaccumulate is an element that can be used to accumulate text prior to translation or synthesis.

When working with live data, the element will accumulate input text until the deadline is reached, comparing the current running time with the running time of the input items and the upstream latency.

At this point the input items will be drained up until a configurable pattern is encountered, see the timeout-terminators for more information.

If the pattern does not match, the entire accumulator is drained.

The accumulator will also be drained upon receiving rstranscribe/final-transcript and rstranscribe/speaker-change custom events.

When the user wants to use a very low / no latency upstream, and is willing to accept desynchronization in order to build up long-enough sentences for translation, they can set the lateness property to shift the input timestamps forward when accumulating.

Hierarchy

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──textaccumulate

Factory details

Authors: – Mathieu Duponchelle

Classification:Text/Filter

Rank – none

Plugin – textaccumulate

Package – gst-plugin-textaccumulate

Pad Templates

sink

text/x-raw:
         format: utf8

Presencealways

Directionsink

Object typeGstPad


src

text/x-raw:
         format: utf8

Presencealways

Directionsrc

Object typeGstPad


Properties

drain-on-final-transcripts

“drain-on-final-transcripts” gboolean

whether the element should entirely drain itself when receiving rstranscribe/final-transcript events

Flags : Read / Write

Default value : true


drain-on-speaker-change

“drain-on-speaker-change” gboolean

whether the element should entirely drain itself when receiving rstranscribe/speaker-change events

Flags : Read / Write

Default value : true


extend-duration

“extend-duration” gboolean

whether the element should extend the duration of an item to match the start time of the next non-drained item, if any. This is useful when a speech synthesis element is further downstream.

Flags : Read / Write

Default value : false


extended-duration-gap

“extended-duration-gap” guint

Amount of milliseconds to preserve between items when extend-duration is true

Flags : Read / Write

Default value : 500


latency

“latency” guint

Amount of milliseconds to allow for accumulating

Flags : Read / Write

Default value : 3000


lateness

“lateness” guint

By how many milliseconds to shift input timestamps forward for accumulating

Flags : Read / Write

Default value : 0


timeout-terminators

“timeout-terminators” gchararray

A regex for finding preferred break points when draining on timeout

Flags : Read / Write

Default value : \,\s|\:\s|\;\s


The results of the search are