pyflink.multimodal.operators.audio_concat#
- audio_concat(*columns, concurrency=None)[source]#
Concatenate waveforms.
All input waveforms must have compatible sample rate, channel count, and sample format. Use
audio_standardizeon individual segments before concatenation when the source layout may differ.- Parameters
*columns – Optional audio columns. Supported input is
ARRAY<AUDIO_WAVEFORM>only.concurrency – UDF concurrency.
Noneuses the framework default.
- Returns
A UDF producing one
ROW<data TENSOR('float32'), sample_rate INT, channels INT, frames BIGINT, sample_format STRING, layout STRING, duration_ms BIGINT, source_uri STRING, start_time_ms BIGINT, end_time_ms BIGINT>.- Raises
ValueError – If the input is not an array of waveform rows, or if the waveforms have incompatible sample rate, channel count, or sample format.
- Examples::
>>> # Usage 1: create a reusable UDF and apply it to a column. >>> concat = audio_concat() >>> df = df.with_column("joined", concat(col("clips"))) >>> >>> # Usage 2: pass the column directly when building the expression. >>> df = df.with_column("joined", audio_concat(col("clips")))