Browse documentation
aner.media · Reference

Media analysis API reference

Inspect exact native audio, signal, speech and media signatures, parameter labels and defaults.

ImplementedAner 0.1.0 or newer

Generated from the same declarations as native bindings and editor help. See Audio, Signal, Speech, and Media coordination for semantics, memory budgets, examples and backend limits.

All sample/frame indices are zero based. Mutable native handle copies alias their state. Scalar status returns and reusable slots keep processing loops bounded. Tensor exports are owned CPU Float32 copies, detached from gradient history.

aner.audio

Native callResultContract
audio.available()BoolReport installed FFmpeg decoding/resampling availability. WAV and synthetic sources remain available without it.
audio.microphone_backend()StringReturn the compiled capture adapter; this analysis capture API does not promise duplex callback latency.
audio.block_slot(memory_mb:Int64=256)AudioBlockCreate a reusable Float32 interleaved audio buffer. Aliases share updates; freeze to retain a result.
audio.tone(seconds:Float64=1.0, rate:Int64=48000, channels:Int64=1, frequency:Float64=440.0, amplitude:Float64=0.5)AudioClipCreate a deterministic finite sine clip without a hardware or codec dependency.
audio.from_tensor(samples:Tensor, rate:Int64, channels:Int64=1)AudioClipCopy a finite CPU Tensor into immutable Float32 interleaved audio. Shape is [frames,channels] or rank one mono.
audio.load(path:String, memory_mb:Int64=256, max_seconds:Float64=3600.0)AudioClipDecode a bounded local recording. Use audio.file for recordings that should not be collected into memory.
audio.write_wav(path:String, clip:AudioClip, format:String="float32")UnitWrite an immutable clip as native WAV: float32 or pcm16. Conversion and clipping are explicit format choices.
audio.synthetic(frames:Int64=48000, rate:Int64=48000, channels:Int64=1, frequency:Float64=440.0, amplitude:Float64=0.5, realtime:Bool=false, block_frames:Int64=1024, queue_blocks:Int64=16, memory_mb:Int64=256)AudioSourceOpen a bounded deterministic source. Offline mode backpressures instead of silently losing blocks.
audio.file(path:String, block_frames:Int64=1024, queue_blocks:Int64=16, memory_mb:Int64=256)AudioSourceDecode a local file incrementally with bounded buffering.
audio.stream(url:String, block_frames:Int64=1024, queue_blocks:Int64=16, memory_mb:Int64=256)AudioSourceOpen a native remote stream under the documented protocol and timeout restrictions.
audio.microphone(device:String="default", block_frames:Int64=1024, queue_blocks:Int64=16, memory_mb:Int64=256)AudioSourceCapture analysis blocks using the compiled native OS adapter. Capture overload fails explicitly.
audio.read_into(source:AudioSource, block:AudioBlock, timeout_ms:Int64=1000)StringRead into a reusable slot. Return ready, timeout, end, cancelled, closed or failed; inspect error on failed.
audio.close(value:AudioSource)UnitClose the source and join its capture worker deterministically.
audio.state(source:AudioSource)StringRead a bounded native source counter or status; payloads and credentials are excluded.
audio.backend(source:AudioSource)StringRead a bounded native source counter or status; payloads and credentials are excluded.
audio.captured(source:AudioSource)Int64Read a bounded native source counter or status; payloads and credentials are excluded.
audio.delivered(source:AudioSource)Int64Read a bounded native source counter or status; payloads and credentials are excluded.
audio.lost(source:AudioSource)Int64Read a bounded native source counter or status; payloads and credentials are excluded.
audio.queued_blocks(source:AudioSource)Int64Read a bounded native source counter or status; payloads and credentials are excluded.
audio.queued_bytes(source:AudioSource)Int64Read a bounded native source counter or status; payloads and credentials are excluded.
audio.error(source:AudioSource)StringReturn the bounded sanitized source failure reason.
audio.ready(value:AudioClip)BoolReport whether this audio value contains initialized sample storage.
audio.frames(value:AudioClip)Int64Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.channels(value:AudioClip)Int64Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.rate(value:AudioClip)Int64Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.source_id(value:AudioClip)Int64Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.session_id(value:AudioClip)Int64Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.first_sample(value:AudioClip)Int64Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.sequence(value:AudioClip)Int64Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.pts_ns(value:AudioClip)Int64Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.received_ns(value:AudioClip)Int64Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.lost_frames(value:AudioClip)Int64Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.has_pts(value:AudioClip)BoolRead audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.gap_before(value:AudioClip)BoolRead audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.channel_layout(value:AudioClip)StringRead audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.clock(value:AudioClip)StringRead audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.duration(value:AudioClip)Float64Return valid sample frames divided by rate, in seconds.
audio.sample(value:AudioClip, frame:Int64, channel:Int64=0)Float64Read a single normalized sample by frame and channel; values are not silently clipped.
audio.tensor(value:AudioClip)TensorCreate an owned detached CPU Float32 Tensor [frames,channels]. Transfer or cast explicitly for a model.
audio.ready(value:AudioBlock)BoolReport whether this audio value contains initialized sample storage.
audio.frames(value:AudioBlock)Int64Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.channels(value:AudioBlock)Int64Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.rate(value:AudioBlock)Int64Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.source_id(value:AudioBlock)Int64Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.session_id(value:AudioBlock)Int64Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.first_sample(value:AudioBlock)Int64Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.sequence(value:AudioBlock)Int64Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.pts_ns(value:AudioBlock)Int64Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.received_ns(value:AudioBlock)Int64Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.lost_frames(value:AudioBlock)Int64Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.has_pts(value:AudioBlock)BoolRead audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.gap_before(value:AudioBlock)BoolRead audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.channel_layout(value:AudioBlock)StringRead audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.clock(value:AudioBlock)StringRead audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence.
audio.duration(value:AudioBlock)Float64Return valid sample frames divided by rate, in seconds.
audio.sample(value:AudioBlock, frame:Int64, channel:Int64=0)Float64Read a single normalized sample by frame and channel; values are not silently clipped.
audio.tensor(value:AudioBlock)TensorCreate an owned detached CPU Float32 Tensor [frames,channels]. Transfer or cast explicitly for a model.
audio.time(value:AudioClip, frame:Int64=0)Float64Return presentation seconds for a sample frame position when PTS is known, otherwise source sample seconds; the endpoint frame is allowed.
audio.timeline(value:AudioClip, seconds:Float64)Float64Map source sample seconds from signal/speech onto this audio anchor’s presentation clock. Retain the matching source/session anchor before reusing a block; clocks are not inferred across devices.
audio.time(value:AudioBlock, frame:Int64=0)Float64Return presentation seconds for a sample frame position when PTS is known, otherwise source sample seconds; the endpoint frame is allowed.
audio.timeline(value:AudioBlock, seconds:Float64)Float64Map source sample seconds from signal/speech onto this audio anchor’s presentation clock. Retain the matching source/session anchor before reusing a block; clocks are not inferred across devices.
audio.freeze(block:AudioBlock)AudioClipCopy a reusable slot into an immutable audio snapshot.
audio.slice(clip:AudioClip, begin:Int64, end:Int64)AudioClipSlice the half open sample frame range, preserving source sample origin.
audio.channel(clip:AudioClip, index:Int64)AudioClipSelect one zero based channel explicitly.
audio.concat(first:AudioClip, second:AudioClip)AudioClipNative audio concat.
audio.resample(clip:AudioClip, rate:Int64, channels:Int64=0)AudioClipOffline antialiased conversion. Zero channels preserves the input channel count; streaming callers retain a Resampler.
audio.resampler(in_rate:Int64, in_channels:Int64, out_rate:Int64, out_channels:Int64, memory_mb:Int64=256)AudioResamplerCreate persistent resampling delay and channel conversion state; process contiguous clips then flush once.
audio.process(value:AudioResampler, clip:AudioClip)AudioClipNative audio process.
audio.flush(value:AudioResampler)AudioClipFlush delayed samples at EOF or reset explicitly after a discontinuity.
audio.reset(value:AudioResampler)UnitFlush delayed samples at EOF or reset explicitly after a discontinuity.
audio.record(path:String, rate:Int64, channels:Int64=1, format:String="float32")AudioWriterCreate a new incremental WAV recording with exclusive creation; close explicitly to finalize RIFF sizes.
audio.write(value:AudioWriter, audio:AudioClip)UnitAppend contiguous samples without collecting the recording in memory. Rate, channels and source continuity must match.
audio.write(value:AudioWriter, audio:AudioBlock)UnitAppend contiguous samples without collecting the recording in memory. Rate, channels and source continuity must match.
audio.close(value:AudioWriter)UnitFinalize a native WAV recorder explicitly.
audio.frames_written(value:AudioWriter)Int64Return the number of sample frames recorded.
audio.waveform(value:AudioClip, channel:Int64=0, max_points:Int64=2048)ChartSnapshot a bounded sample order min/max waveform envelope with seconds and amplitude axes, preserving peaks and source provenance.

aner.signal

Native callResultContract
signal.spectrum_plot(value:SignalSpectrum, kind:String="psd", channel:Int64=0, max_points:Int64=2048)ChartSnapshot a bounded native spectrum plot with frequency in Hz and explicit amplitude/power/PSD units.
signal.spectrogram_plot(value:SignalSpectrogram, channel:Int64=0, max_cells:Int64=10000)ChartSnapshot a bounded numeric axis spectrogram with source clock seconds and physical frequency edges. Max tile reduction preserves peaks, not integrated power.
signal.fft(value:AudioClip, n_fft:Int64=0, window:String="rectangular")SignalSpectrumCompute native radix 2 FFT with explicit periodic window and optional larger power of two zero padding. No truncation.
signal.fft(value:AudioBlock, n_fft:Int64=0, window:String="rectangular")SignalSpectrumCompute native radix 2 FFT with explicit periodic window and optional larger power of two zero padding. No truncation.
signal.fft_tensor(value:Tensor, rate:Int64, n_fft:Int64=0, window:String="rectangular")SignalSpectrumNative signal fft tensor.
signal.ifft(value:SignalSpectrum)TensorInvert the full conjugate symmetric spectrum into CPU Float32 [n_fft,channels]; this reconstructs the windowed signal.
signal.bins(value:SignalSpectrum)Int64Native signal bins.
signal.channels(value:SignalSpectrum)Int64Native signal channels.
signal.sample_rate(value:SignalSpectrum)Int64Native signal sample rate.
signal.fft_size(value:SignalSpectrum)Int64Native signal fft size.
signal.frequency(value:SignalSpectrum, bin:Int64)Float64Return the physical center frequency in Hz. MFCC coefficient axes reject a Hz interpretation.
signal.summary(value:SignalSpectrum)StringNative signal summary.
signal.bins(value:SignalSpectrogram)Int64Native signal bins.
signal.channels(value:SignalSpectrogram)Int64Native signal channels.
signal.sample_rate(value:SignalSpectrogram)Int64Native signal sample rate.
signal.fft_size(value:SignalSpectrogram)Int64Native signal fft size.
signal.frequency(value:SignalSpectrogram, bin:Int64)Float64Return the physical center frequency in Hz. MFCC coefficient axes reject a Hz interpretation.
signal.summary(value:SignalSpectrogram)StringNative signal summary.
signal.real(value:SignalSpectrum, bin:Int64, channel:Int64=0)Float64Raw unnormalized DFT real part.
signal.imag(value:SignalSpectrum, bin:Int64, channel:Int64=0)Float64Raw unnormalized DFT imaginary part.
signal.magnitude(value:SignalSpectrum, bin:Int64, channel:Int64=0)Float64One sided coherent amplitude; DC/Nyquist are not doubled.
signal.power(value:SignalSpectrum, bin:Int64, channel:Int64=0)Float64One sided mean square power per bin.
signal.psd(value:SignalSpectrum, bin:Int64, channel:Int64=0)Float64One sided power spectral density per Hz.
signal.phase(value:SignalSpectrum, bin:Int64, channel:Int64=0)Float64DFT phase angle in radians.
signal.stft_plan(rate:Int64, n_fft:Int64=1024, hop:Int64=256, window:String="hann", scaling:String="power", pad_end:Bool=true)SignalPlanCreate an immutable causal uncentered periodic window STFT recipe. EOF padding occurs only at explicit flush.
signal.processor(value:SignalPlan, max_frames:Int64=4096)SignalStreamCreate bounded persistent overlap state for chunk invariant streaming STFT.
signal.spectrogram_slot()SignalSpectrogramNative signal spectrogram slot.
signal.push_into(value:SignalStream, audio:AudioClip, output:SignalSpectrogram)UnitConsume contiguous audio into the reusable output. Aliases share storage; source gaps require an explicit reset.
signal.push_into(value:SignalStream, audio:AudioBlock, output:SignalSpectrogram)UnitConsume contiguous audio into the reusable output. Aliases share storage; source gaps require an explicit reset.
signal.flush_into(value:SignalStream, output:SignalSpectrogram)UnitEmit final supported hop starts according to pad_end. Call once at EOF.
signal.spectrogram(audio:AudioClip, plan:SignalPlan, max_frames:Int64=4096)SignalSpectrogramAnalyze one bounded clip, including explicit final padding from the supplied plan.
signal.ready(value:SignalSpectrogram)BoolNative signal ready.
signal.frames(value:SignalSpectrogram)Int64Native signal frames.
signal.hop(value:SignalSpectrogram)Int64Native signal hop.
signal.scaling(value:SignalSpectrogram)StringNative signal scaling.
signal.value(value:SignalSpectrogram, frame:Int64, bin:Int64, channel:Int64=0)Float64Native signal value.
signal.time(value:SignalSpectrogram, frame:Int64)Float64Return the analysis window center on the source sample clock, in seconds.
signal.valid_samples(value:SignalSpectrogram, frame:Int64)Int64Return genuine input support in a padded analysis frame.
signal.tensor(value:SignalSpectrogram, layout:String="cnn")TensorCopy features to CPU Float32. cnn=[1,C,F,T], sequence=[1,T,C*F]; model transfer is explicit.
signal.features(value:AudioClip)TensorReturn [1,C*5] CPU Float32 features: mean,RMS,peak,population standard deviation,zero crossing rate per channel.
signal.mel_plan(rate:Int64, n_fft:Int64, bands:Int64=40, min_hz:Float64=0.0, max_hz:Float64=0.0, scale:String="htk", normalization:String="none", floor:Float64=1e-10, log_base:String="natural")SignalMelPlanCreate reusable explicit HTK/Slaney triangular log Mel recipe; floor, area normalization and logarithm are recorded in summary.
signal.log_mel_into(value:SignalMelPlan, powers:SignalSpectrogram, output:SignalSpectrogram)UnitApply a compatible power spectrogram to a reusable output; incompatible scaling is rejected.
signal.mfcc_into(value:SignalSpectrogram, output:SignalSpectrogram, coefficients:Int64=13)UnitApply orthonormal DCT II to logged Mel features including coefficient zero, with no implicit lifter or energy replacement.
signal.filter(rate:Int64, channels:Int64, kind:String, frequency:Float64, q:Float64=0.7071067811865476)SignalFilterCreate a persistent lowpass, highpass, bandpass, notch or dcblock biquad with independent channel history.
signal.biquad(rate:Int64, channels:Int64, b0:Float64, b1:Float64, b2:Float64, a1:Float64, a2:Float64)SignalFilterSupply normalized coefficients [b0,b1,b2,a1,a2] explicitly.
signal.process_into(value:SignalFilter, audio:AudioClip, output:AudioBlock)UnitFilter contiguous audio into a reusable output without implicit clipping or gain normalization.
signal.process_into(value:SignalFilter, audio:AudioBlock, output:AudioBlock)UnitFilter contiguous audio into a reusable output without implicit clipping or gain normalization.
signal.reset(value:SignalStream)UnitReset mutable history explicitly after a source, clock or gap discontinuity.
signal.reset(value:SignalFilter)UnitReset mutable history explicitly after a source, clock or gap discontinuity.
signal.summary(value:SignalPlan)StringNative signal summary.
signal.summary(value:SignalMelPlan)StringNative signal summary.
signal.summary(value:SignalFilter)StringNative signal summary.
signal.recipe(value:SignalSpectrum)StringReturn the exact bounded JSON analysis recipe, including window/scaling/padding and compatible derived feature settings.
signal.recipe(value:SignalSpectrogram)StringReturn the exact bounded JSON analysis recipe, including window/scaling/padding and compatible derived feature settings.
signal.coefficient(value:SignalFilter, index:Int64)Float64Native signal coefficient.
signal.history(value:SignalFilter, channel:Int64, index:Int64)Float64Native signal history.
signal.buffered_frames(value:SignalStream)Int64Inspect bounded native streaming overlap storage; no managed wrapper is allocated per call.
signal.retained_bytes(value:SignalStream)Int64Inspect bounded native streaming overlap storage; no managed wrapper is allocated per call.

aner.speech

Native callResultContract
speech.available()BoolReport whether this binary includes the pinned native Whisper inference engine; this does not imply any model is loaded.
speech.backend_identity()StringNative speech backend identity.
speech.vad(rate:Int64=16000, onset:Float64=0.02, offset:Float64=0.01, min_speech_ms:Int64=100, silence_ms:Int64=200, pre_roll_ms:Int64=100, max_speech_ms:Int64=30000, window_ms:Int64=20)SpeechVADCreate bounded windowed RMS hysteresis speech activity state. This energy detector does not identify speech semantically.
speech.activity(max_segments:Int64=1024)SpeechActivityNative speech activity.
speech.process_into(value:SpeechVAD, audio:AudioClip, output:SpeechActivity)UnitProcess matching rate multichannel audio with channel averaged RMS energy, retaining partial windows and hysteresis without copying source samples; gaps cannot extend pre roll across sources.
speech.process_into(value:SpeechVAD, audio:AudioBlock, output:SpeechActivity)UnitProcess matching rate multichannel audio with channel averaged RMS energy, retaining partial windows and hysteresis without copying source samples; gaps cannot extend pre roll across sources.
speech.flush_into(value:SpeechVAD, output:SpeechActivity)UnitNative speech flush into.
speech.reset(value:SpeechVAD)UnitNative speech reset.
speech.speaking(value:SpeechVAD)BoolNative speech speaking.
speech.count(value:SpeechActivity)Int64Read speech activity intervals on the original source sample clock; forced ends are explicit.
speech.start(value:SpeechActivity, index:Int64)Float64Read speech activity intervals on the original source sample clock; forced ends are explicit.
speech.end(value:SpeechActivity, index:Int64)Float64Read speech activity intervals on the original source sample clock; forced ends are explicit.
speech.forced(value:SpeechActivity, index:Int64)BoolRead speech activity intervals on the original source sample clock; forced ends are explicit.
speech.activity_source_id(value:SpeechActivity, index:Int64)Int64Read speech activity intervals on the original source sample clock; forced ends are explicit.
speech.activity_session_id(value:SpeechActivity, index:Int64)Int64Read speech activity intervals on the original source sample clock; forced ends are explicit.
speech.load(path:String, device:String="cpu", threads:Int64=4, max_seconds:Float64=300.0)SpeechModelLoad local user supplied compatible weights into one bounded native CPU model context. No network, shell or automatic download.
speech.close(value:SpeechModel)UnitNative speech close.
speech.loaded(value:SpeechModel)BoolNative speech loaded.
speech.transcribe(value:SpeechModel, audio:AudioClip, language:String="en", translate:Bool=false, token_timestamps:Bool=true)SpeechTranscriptTranscribe one bounded clip natively. Downmix/resample once to 16 kHz; preserve source origin and model identity. Token timing is an estimate.
speech.transcript(texts:List, intervals:Tensor, language:String="und", model:String="imported", source_id:Int64=0, session_id:Int64=0)SpeechTranscriptImport explicit UTF-8 segment texts and CPU Nx2 second intervals, preserving provenance and validation.
speech.ctc_greedy(logits:Tensor, vocabulary:List, blank:Int64=0, frame_seconds:Float64=0.02, origin_seconds:Float64=0.0, language:String="und", model:String="ctc-external")SpeechTranscriptGreedily decode finite CPU [T,V] logits with an explicit vocabulary/blank. Collapse repeats separated by blanks; concatenate pieces literally.
speech.text(value:SpeechTranscript)StringNative speech text.
speech.language(value:SpeechTranscript)StringNative speech language.
speech.model(value:SpeechTranscript)StringNative speech model.
speech.backend(value:SpeechTranscript)StringNative speech backend.
speech.clock(value:SpeechTranscript)StringNative speech clock.
speech.source_id(value:SpeechTranscript)Int64Native speech source id.
speech.session_id(value:SpeechTranscript)Int64Native speech session id.
speech.count(value:SpeechTranscript)Int64Native speech count.
speech.token_count(value:SpeechTranscript)Int64Native speech token count.
speech.segment_text(value:SpeechTranscript, index:Int64)StringRead a validated transcript field. Scores are mean token probabilities where supplied, not calibrated confidence.
speech.start(value:SpeechTranscript, index:Int64)Float64Read a validated transcript field. Scores are mean token probabilities where supplied, not calibrated confidence.
speech.end(value:SpeechTranscript, index:Int64)Float64Read a validated transcript field. Scores are mean token probabilities where supplied, not calibrated confidence.
speech.score(value:SpeechTranscript, index:Int64)Float64Read a validated transcript field. Scores are mean token probabilities where supplied, not calibrated confidence.
speech.token_id(value:SpeechTranscript, index:Int64)Int64Read a validated transcript field. Scores are mean token probabilities where supplied, not calibrated confidence.
speech.token_start(value:SpeechTranscript, index:Int64)Float64Read a validated transcript field. Scores are mean token probabilities where supplied, not calibrated confidence.
speech.token_end(value:SpeechTranscript, index:Int64)Float64Read a validated transcript field. Scores are mean token probabilities where supplied, not calibrated confidence.
speech.token_score(value:SpeechTranscript, index:Int64)Float64Read a validated transcript field. Scores are mean token probabilities where supplied, not calibrated confidence.
speech.token_timed(value:SpeechTranscript, index:Int64)BoolRead a validated transcript field. Scores are mean token probabilities where supplied, not calibrated confidence.
speech.summary(value:SpeechModel)StringNative speech summary.
speech.summary(value:SpeechTranscript)StringNative speech summary.
speech.summary(value:SpeechVAD)StringNative speech summary.
speech.summary(value:SpeechActivity)StringNative speech summary.
speech.model(value:SpeechModel)StringNative speech model.
speech.wer(reference:String, hypothesis:String, casefold:Bool=false)Float64Compute Unicode aware word error rate; punctuation is retained and case folding is opt in. Empty-reference/nonempty-hypothesis is undefined and rejected.
speech.cer(reference:String, hypothesis:String, casefold:Bool=false, include_spaces:Bool=true)Float64Compute character error rate over Unicode scalars, with explicit case and space policy; grapheme clusters are not inferred.
speech.corpus(value:SpeechTranscript, id:String="transcript", role:String="inference")TextCorpusBridge transcript text into an immutable aner.nlp corpus with explicit document ID and role. This does not refit an analyzer or tokenizer.

aner.media

Native callResultContract
media.available()BoolNative media available.
media.freeze_video(frame:VideoFrameSlot, memory_mb:Int64=64)VideoFrameRetain an immutable bounded video snapshot from the shared session. Outstanding snapshots share a per slot aggregate byte quota.
media.open(path:String, audio_stream:Int64=-1, video_stream:Int64=-1, normalize_pts:Bool=true, memory_mb:Int64=256)MediaSessionOpen one native demux session for both selected tracks. −1 selects best; −2 disables a track. Normalize one shared PTS origin, preserving track offsets.
media.read_into(value:MediaSession, audio:AudioBlock, video:VideoFrameSlot, timeout_ms:Int64=1000)StringRead one audio or video event into the corresponding reusable slot. Other statuses are timeout/end/cancelled/closed/failed; one demux prevents split track queue deadlock.
media.close(value:MediaSession)UnitClose or inspect a common native demux session.
media.error(value:MediaSession)StringClose or inspect a common native demux session.
media.source_id(value:MediaSession)Int64Read the selected common session identity and original PTS origin.
media.session_id(value:MediaSession)Int64Read the selected common session identity and original PTS origin.
media.audio_stream(value:MediaSession)Int64Read the selected common session identity and original PTS origin.
media.video_stream(value:MediaSession)Int64Read the selected common session identity and original PTS origin.
media.origin_pts_ns(value:MediaSession)Int64Read the selected common session identity and original PTS origin.
media.has_origin(value:MediaSession)BoolRead the selected common session identity and original PTS origin.
media.audio_blocks(value:MediaSession)Int64Read bounded common session decode counters or state.
media.audio_frames(value:MediaSession)Int64Read bounded common session decode counters or state.
media.video_frames(value:MediaSession)Int64Read bounded common session decode counters or state.
media.state(value:MediaSession)StringRead bounded common session decode counters or state.
Aner documentation · Reference and guides