Ctrl+K
Logo image Logo image

Site Navigation

  • API Reference
  • Examples

Site Navigation

  • API Reference
  • Examples

Section Navigation

  • PyFlink DataFrame
    • DataFrame
    • DataFrame Creation
    • Input / Output
    • SQL
    • Data Types
    • User Defined Functions
    • Configuration
    • Catalog
    • GPU Support
    • AI / LLM
    • Multimodal Expressions
  • PyFlink Multimodal
  • PyFlink Table
  • PyFlink DataStream
  • PyFlink Common

pyflink.multimodal.expression.AudioExpressionAccessor#

class AudioExpressionAccessor(expression)[source]#

Audio operations available on a DataFrame expression.

These methods use the expression on the left side as the audio input. For example, col("audio_bytes").audio.decode() is the expression-accessor form of audio_decode(col("audio_bytes")).

Examples::
>>> from pyflink.dataframe import col
>>> df = df.with_column("waveform", col("audio_bytes").audio.decode())
>>> df = df.with_column(
...     "speech_ready",
...     col("waveform").audio.standardize(sample_rate=16000, channels=1))

Methods

asr_whisper(*[, language, task, model, ...])

Run Whisper ASR over waveform values.

concat(*[, concurrency])

Concatenate an array of waveform rows.

convert_format(*[, format, on_error, ...])

Convert encoded audio to another encoded format.

decode(*[, on_error, max_decoded_bytes, ...])

Decode encoded audio into waveform rows.

detect_language(*[, top_k, model, ...])

Detect likely spoken language candidates for waveform values.

detect_speech(*[, aggressiveness, frame_ms, ...])

Detect speech activity ranges in waveform values.

duration(*[, concurrency])

Return audio duration in seconds for this expression.

duration_filter(*[, min_seconds, ...])

Check whether audio duration is within second bounds.

encode(*[, format, concurrency])

Encode waveform rows to audio bytes.

is_valid(*[, validation, concurrency])

Check whether this expression contains valid audio.

metadata(*[, concurrency])

Probe audio metadata for this expression.

resample(*, sample_rate[, concurrency])

Resample waveform values to a target sample rate.

silence_detection(*, threshold_db[, ...])

Detect low-amplitude silence ranges in waveform values.

size_filter(*[, min_bytes, max_bytes, ...])

Check whether encoded audio size is within byte bounds.

split_by_duration(*, segment_duration_ms[, ...])

Split audio by fixed duration.

split_by_speech(speech_activity, *[, ...])

Split audio using caller-provided speech activity ranges.

split_by_timestamp(timestamps, *[, ...])

Split audio by explicit timestamp ranges.

standardize(*[, sample_rate, channels, ...])

Standardize waveform sample rate and channel count.

previous

pyflink.multimodal.expression.VideoExpressionAccessor.extract_frames

next

pyflink.multimodal.expression.AudioExpressionAccessor.is_valid

Show Source

Created using Sphinx 4.5.0.