Media analysis API reference
Inspect exact native audio, signal, speech and media signatures, parameter labels and defaults.
ImplementedAner 0.1.0 or newerGenerated 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 call | Result | Contract |
|---|---|---|
audio.available() | Bool | Report installed FFmpeg decoding/resampling availability. WAV and synthetic sources remain available without it. |
audio.microphone_backend() | String | Return the compiled capture adapter; this analysis capture API does not promise duplex callback latency. |
audio.block_slot(memory_mb:Int64=256) | AudioBlock | Create 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) | AudioClip | Create a deterministic finite sine clip without a hardware or codec dependency. |
audio.from_tensor(samples:Tensor, rate:Int64, channels:Int64=1) | AudioClip | Copy 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) | AudioClip | Decode 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") | Unit | Write 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) | AudioSource | Open 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) | AudioSource | Decode a local file incrementally with bounded buffering. |
audio.stream(url:String, block_frames:Int64=1024, queue_blocks:Int64=16, memory_mb:Int64=256) | AudioSource | Open 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) | AudioSource | Capture analysis blocks using the compiled native OS adapter. Capture overload fails explicitly. |
audio.read_into(source:AudioSource, block:AudioBlock, timeout_ms:Int64=1000) | String | Read into a reusable slot. Return ready, timeout, end, cancelled, closed or failed; inspect error on failed. |
audio.close(value:AudioSource) | Unit | Close the source and join its capture worker deterministically. |
audio.state(source:AudioSource) | String | Read a bounded native source counter or status; payloads and credentials are excluded. |
audio.backend(source:AudioSource) | String | Read a bounded native source counter or status; payloads and credentials are excluded. |
audio.captured(source:AudioSource) | Int64 | Read a bounded native source counter or status; payloads and credentials are excluded. |
audio.delivered(source:AudioSource) | Int64 | Read a bounded native source counter or status; payloads and credentials are excluded. |
audio.lost(source:AudioSource) | Int64 | Read a bounded native source counter or status; payloads and credentials are excluded. |
audio.queued_blocks(source:AudioSource) | Int64 | Read a bounded native source counter or status; payloads and credentials are excluded. |
audio.queued_bytes(source:AudioSource) | Int64 | Read a bounded native source counter or status; payloads and credentials are excluded. |
audio.error(source:AudioSource) | String | Return the bounded sanitized source failure reason. |
audio.ready(value:AudioClip) | Bool | Report whether this audio value contains initialized sample storage. |
audio.frames(value:AudioClip) | Int64 | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.channels(value:AudioClip) | Int64 | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.rate(value:AudioClip) | Int64 | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.source_id(value:AudioClip) | Int64 | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.session_id(value:AudioClip) | Int64 | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.first_sample(value:AudioClip) | Int64 | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.sequence(value:AudioClip) | Int64 | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.pts_ns(value:AudioClip) | Int64 | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.received_ns(value:AudioClip) | Int64 | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.lost_frames(value:AudioClip) | Int64 | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.has_pts(value:AudioClip) | Bool | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.gap_before(value:AudioClip) | Bool | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.channel_layout(value:AudioClip) | String | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.clock(value:AudioClip) | String | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.duration(value:AudioClip) | Float64 | Return valid sample frames divided by rate, in seconds. |
audio.sample(value:AudioClip, frame:Int64, channel:Int64=0) | Float64 | Read a single normalized sample by frame and channel; values are not silently clipped. |
audio.tensor(value:AudioClip) | Tensor | Create an owned detached CPU Float32 Tensor [frames,channels]. Transfer or cast explicitly for a model. |
audio.ready(value:AudioBlock) | Bool | Report whether this audio value contains initialized sample storage. |
audio.frames(value:AudioBlock) | Int64 | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.channels(value:AudioBlock) | Int64 | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.rate(value:AudioBlock) | Int64 | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.source_id(value:AudioBlock) | Int64 | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.session_id(value:AudioBlock) | Int64 | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.first_sample(value:AudioBlock) | Int64 | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.sequence(value:AudioBlock) | Int64 | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.pts_ns(value:AudioBlock) | Int64 | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.received_ns(value:AudioBlock) | Int64 | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.lost_frames(value:AudioBlock) | Int64 | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.has_pts(value:AudioBlock) | Bool | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.gap_before(value:AudioBlock) | Bool | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.channel_layout(value:AudioBlock) | String | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.clock(value:AudioBlock) | String | Read audio metadata. Sample indices and PTS retain their documented clock; missing samples are never inferred as silence. |
audio.duration(value:AudioBlock) | Float64 | Return valid sample frames divided by rate, in seconds. |
audio.sample(value:AudioBlock, frame:Int64, channel:Int64=0) | Float64 | Read a single normalized sample by frame and channel; values are not silently clipped. |
audio.tensor(value:AudioBlock) | Tensor | Create an owned detached CPU Float32 Tensor [frames,channels]. Transfer or cast explicitly for a model. |
audio.time(value:AudioClip, frame:Int64=0) | Float64 | Return 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) | Float64 | Map 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) | Float64 | Return 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) | Float64 | Map 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) | AudioClip | Copy a reusable slot into an immutable audio snapshot. |
audio.slice(clip:AudioClip, begin:Int64, end:Int64) | AudioClip | Slice the half open sample frame range, preserving source sample origin. |
audio.channel(clip:AudioClip, index:Int64) | AudioClip | Select one zero based channel explicitly. |
audio.concat(first:AudioClip, second:AudioClip) | AudioClip | Native audio concat. |
audio.resample(clip:AudioClip, rate:Int64, channels:Int64=0) | AudioClip | Offline 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) | AudioResampler | Create persistent resampling delay and channel conversion state; process contiguous clips then flush once. |
audio.process(value:AudioResampler, clip:AudioClip) | AudioClip | Native audio process. |
audio.flush(value:AudioResampler) | AudioClip | Flush delayed samples at EOF or reset explicitly after a discontinuity. |
audio.reset(value:AudioResampler) | Unit | Flush delayed samples at EOF or reset explicitly after a discontinuity. |
audio.record(path:String, rate:Int64, channels:Int64=1, format:String="float32") | AudioWriter | Create a new incremental WAV recording with exclusive creation; close explicitly to finalize RIFF sizes. |
audio.write(value:AudioWriter, audio:AudioClip) | Unit | Append contiguous samples without collecting the recording in memory. Rate, channels and source continuity must match. |
audio.write(value:AudioWriter, audio:AudioBlock) | Unit | Append contiguous samples without collecting the recording in memory. Rate, channels and source continuity must match. |
audio.close(value:AudioWriter) | Unit | Finalize a native WAV recorder explicitly. |
audio.frames_written(value:AudioWriter) | Int64 | Return the number of sample frames recorded. |
audio.waveform(value:AudioClip, channel:Int64=0, max_points:Int64=2048) | Chart | Snapshot a bounded sample order min/max waveform envelope with seconds and amplitude axes, preserving peaks and source provenance. |
aner.signal
| Native call | Result | Contract |
|---|---|---|
signal.spectrum_plot(value:SignalSpectrum, kind:String="psd", channel:Int64=0, max_points:Int64=2048) | Chart | Snapshot 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) | Chart | Snapshot 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") | SignalSpectrum | Compute 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") | SignalSpectrum | Compute 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") | SignalSpectrum | Native signal fft tensor. |
signal.ifft(value:SignalSpectrum) | Tensor | Invert the full conjugate symmetric spectrum into CPU Float32 [n_fft,channels]; this reconstructs the windowed signal. |
signal.bins(value:SignalSpectrum) | Int64 | Native signal bins. |
signal.channels(value:SignalSpectrum) | Int64 | Native signal channels. |
signal.sample_rate(value:SignalSpectrum) | Int64 | Native signal sample rate. |
signal.fft_size(value:SignalSpectrum) | Int64 | Native signal fft size. |
signal.frequency(value:SignalSpectrum, bin:Int64) | Float64 | Return the physical center frequency in Hz. MFCC coefficient axes reject a Hz interpretation. |
signal.summary(value:SignalSpectrum) | String | Native signal summary. |
signal.bins(value:SignalSpectrogram) | Int64 | Native signal bins. |
signal.channels(value:SignalSpectrogram) | Int64 | Native signal channels. |
signal.sample_rate(value:SignalSpectrogram) | Int64 | Native signal sample rate. |
signal.fft_size(value:SignalSpectrogram) | Int64 | Native signal fft size. |
signal.frequency(value:SignalSpectrogram, bin:Int64) | Float64 | Return the physical center frequency in Hz. MFCC coefficient axes reject a Hz interpretation. |
signal.summary(value:SignalSpectrogram) | String | Native signal summary. |
signal.real(value:SignalSpectrum, bin:Int64, channel:Int64=0) | Float64 | Raw unnormalized DFT real part. |
signal.imag(value:SignalSpectrum, bin:Int64, channel:Int64=0) | Float64 | Raw unnormalized DFT imaginary part. |
signal.magnitude(value:SignalSpectrum, bin:Int64, channel:Int64=0) | Float64 | One sided coherent amplitude; DC/Nyquist are not doubled. |
signal.power(value:SignalSpectrum, bin:Int64, channel:Int64=0) | Float64 | One sided mean square power per bin. |
signal.psd(value:SignalSpectrum, bin:Int64, channel:Int64=0) | Float64 | One sided power spectral density per Hz. |
signal.phase(value:SignalSpectrum, bin:Int64, channel:Int64=0) | Float64 | DFT 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) | SignalPlan | Create an immutable causal uncentered periodic window STFT recipe. EOF padding occurs only at explicit flush. |
signal.processor(value:SignalPlan, max_frames:Int64=4096) | SignalStream | Create bounded persistent overlap state for chunk invariant streaming STFT. |
signal.spectrogram_slot() | SignalSpectrogram | Native signal spectrogram slot. |
signal.push_into(value:SignalStream, audio:AudioClip, output:SignalSpectrogram) | Unit | Consume contiguous audio into the reusable output. Aliases share storage; source gaps require an explicit reset. |
signal.push_into(value:SignalStream, audio:AudioBlock, output:SignalSpectrogram) | Unit | Consume contiguous audio into the reusable output. Aliases share storage; source gaps require an explicit reset. |
signal.flush_into(value:SignalStream, output:SignalSpectrogram) | Unit | Emit final supported hop starts according to pad_end. Call once at EOF. |
signal.spectrogram(audio:AudioClip, plan:SignalPlan, max_frames:Int64=4096) | SignalSpectrogram | Analyze one bounded clip, including explicit final padding from the supplied plan. |
signal.ready(value:SignalSpectrogram) | Bool | Native signal ready. |
signal.frames(value:SignalSpectrogram) | Int64 | Native signal frames. |
signal.hop(value:SignalSpectrogram) | Int64 | Native signal hop. |
signal.scaling(value:SignalSpectrogram) | String | Native signal scaling. |
signal.value(value:SignalSpectrogram, frame:Int64, bin:Int64, channel:Int64=0) | Float64 | Native signal value. |
signal.time(value:SignalSpectrogram, frame:Int64) | Float64 | Return the analysis window center on the source sample clock, in seconds. |
signal.valid_samples(value:SignalSpectrogram, frame:Int64) | Int64 | Return genuine input support in a padded analysis frame. |
signal.tensor(value:SignalSpectrogram, layout:String="cnn") | Tensor | Copy features to CPU Float32. cnn=[1,C,F,T], sequence=[1,T,C*F]; model transfer is explicit. |
signal.features(value:AudioClip) | Tensor | Return [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") | SignalMelPlan | Create 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) | Unit | Apply a compatible power spectrogram to a reusable output; incompatible scaling is rejected. |
signal.mfcc_into(value:SignalSpectrogram, output:SignalSpectrogram, coefficients:Int64=13) | Unit | Apply 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) | SignalFilter | Create 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) | SignalFilter | Supply normalized coefficients [b0,b1,b2,a1,a2] explicitly. |
signal.process_into(value:SignalFilter, audio:AudioClip, output:AudioBlock) | Unit | Filter contiguous audio into a reusable output without implicit clipping or gain normalization. |
signal.process_into(value:SignalFilter, audio:AudioBlock, output:AudioBlock) | Unit | Filter contiguous audio into a reusable output without implicit clipping or gain normalization. |
signal.reset(value:SignalStream) | Unit | Reset mutable history explicitly after a source, clock or gap discontinuity. |
signal.reset(value:SignalFilter) | Unit | Reset mutable history explicitly after a source, clock or gap discontinuity. |
signal.summary(value:SignalPlan) | String | Native signal summary. |
signal.summary(value:SignalMelPlan) | String | Native signal summary. |
signal.summary(value:SignalFilter) | String | Native signal summary. |
signal.recipe(value:SignalSpectrum) | String | Return the exact bounded JSON analysis recipe, including window/scaling/padding and compatible derived feature settings. |
signal.recipe(value:SignalSpectrogram) | String | Return the exact bounded JSON analysis recipe, including window/scaling/padding and compatible derived feature settings. |
signal.coefficient(value:SignalFilter, index:Int64) | Float64 | Native signal coefficient. |
signal.history(value:SignalFilter, channel:Int64, index:Int64) | Float64 | Native signal history. |
signal.buffered_frames(value:SignalStream) | Int64 | Inspect bounded native streaming overlap storage; no managed wrapper is allocated per call. |
signal.retained_bytes(value:SignalStream) | Int64 | Inspect bounded native streaming overlap storage; no managed wrapper is allocated per call. |
aner.speech
| Native call | Result | Contract |
|---|---|---|
speech.available() | Bool | Report whether this binary includes the pinned native Whisper inference engine; this does not imply any model is loaded. |
speech.backend_identity() | String | Native 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) | SpeechVAD | Create bounded windowed RMS hysteresis speech activity state. This energy detector does not identify speech semantically. |
speech.activity(max_segments:Int64=1024) | SpeechActivity | Native speech activity. |
speech.process_into(value:SpeechVAD, audio:AudioClip, output:SpeechActivity) | Unit | Process 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) | Unit | Process 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) | Unit | Native speech flush into. |
speech.reset(value:SpeechVAD) | Unit | Native speech reset. |
speech.speaking(value:SpeechVAD) | Bool | Native speech speaking. |
speech.count(value:SpeechActivity) | Int64 | Read speech activity intervals on the original source sample clock; forced ends are explicit. |
speech.start(value:SpeechActivity, index:Int64) | Float64 | Read speech activity intervals on the original source sample clock; forced ends are explicit. |
speech.end(value:SpeechActivity, index:Int64) | Float64 | Read speech activity intervals on the original source sample clock; forced ends are explicit. |
speech.forced(value:SpeechActivity, index:Int64) | Bool | Read speech activity intervals on the original source sample clock; forced ends are explicit. |
speech.activity_source_id(value:SpeechActivity, index:Int64) | Int64 | Read speech activity intervals on the original source sample clock; forced ends are explicit. |
speech.activity_session_id(value:SpeechActivity, index:Int64) | Int64 | Read 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) | SpeechModel | Load local user supplied compatible weights into one bounded native CPU model context. No network, shell or automatic download. |
speech.close(value:SpeechModel) | Unit | Native speech close. |
speech.loaded(value:SpeechModel) | Bool | Native speech loaded. |
speech.transcribe(value:SpeechModel, audio:AudioClip, language:String="en", translate:Bool=false, token_timestamps:Bool=true) | SpeechTranscript | Transcribe 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) | SpeechTranscript | Import 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") | SpeechTranscript | Greedily decode finite CPU [T,V] logits with an explicit vocabulary/blank. Collapse repeats separated by blanks; concatenate pieces literally. |
speech.text(value:SpeechTranscript) | String | Native speech text. |
speech.language(value:SpeechTranscript) | String | Native speech language. |
speech.model(value:SpeechTranscript) | String | Native speech model. |
speech.backend(value:SpeechTranscript) | String | Native speech backend. |
speech.clock(value:SpeechTranscript) | String | Native speech clock. |
speech.source_id(value:SpeechTranscript) | Int64 | Native speech source id. |
speech.session_id(value:SpeechTranscript) | Int64 | Native speech session id. |
speech.count(value:SpeechTranscript) | Int64 | Native speech count. |
speech.token_count(value:SpeechTranscript) | Int64 | Native speech token count. |
speech.segment_text(value:SpeechTranscript, index:Int64) | String | Read a validated transcript field. Scores are mean token probabilities where supplied, not calibrated confidence. |
speech.start(value:SpeechTranscript, index:Int64) | Float64 | Read a validated transcript field. Scores are mean token probabilities where supplied, not calibrated confidence. |
speech.end(value:SpeechTranscript, index:Int64) | Float64 | Read a validated transcript field. Scores are mean token probabilities where supplied, not calibrated confidence. |
speech.score(value:SpeechTranscript, index:Int64) | Float64 | Read a validated transcript field. Scores are mean token probabilities where supplied, not calibrated confidence. |
speech.token_id(value:SpeechTranscript, index:Int64) | Int64 | Read a validated transcript field. Scores are mean token probabilities where supplied, not calibrated confidence. |
speech.token_start(value:SpeechTranscript, index:Int64) | Float64 | Read a validated transcript field. Scores are mean token probabilities where supplied, not calibrated confidence. |
speech.token_end(value:SpeechTranscript, index:Int64) | Float64 | Read a validated transcript field. Scores are mean token probabilities where supplied, not calibrated confidence. |
speech.token_score(value:SpeechTranscript, index:Int64) | Float64 | Read a validated transcript field. Scores are mean token probabilities where supplied, not calibrated confidence. |
speech.token_timed(value:SpeechTranscript, index:Int64) | Bool | Read a validated transcript field. Scores are mean token probabilities where supplied, not calibrated confidence. |
speech.summary(value:SpeechModel) | String | Native speech summary. |
speech.summary(value:SpeechTranscript) | String | Native speech summary. |
speech.summary(value:SpeechVAD) | String | Native speech summary. |
speech.summary(value:SpeechActivity) | String | Native speech summary. |
speech.model(value:SpeechModel) | String | Native speech model. |
speech.wer(reference:String, hypothesis:String, casefold:Bool=false) | Float64 | Compute 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) | Float64 | Compute 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") | TextCorpus | Bridge 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 call | Result | Contract |
|---|---|---|
media.available() | Bool | Native media available. |
media.freeze_video(frame:VideoFrameSlot, memory_mb:Int64=64) | VideoFrame | Retain 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) | MediaSession | Open 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) | String | Read 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) | Unit | Close or inspect a common native demux session. |
media.error(value:MediaSession) | String | Close or inspect a common native demux session. |
media.source_id(value:MediaSession) | Int64 | Read the selected common session identity and original PTS origin. |
media.session_id(value:MediaSession) | Int64 | Read the selected common session identity and original PTS origin. |
media.audio_stream(value:MediaSession) | Int64 | Read the selected common session identity and original PTS origin. |
media.video_stream(value:MediaSession) | Int64 | Read the selected common session identity and original PTS origin. |
media.origin_pts_ns(value:MediaSession) | Int64 | Read the selected common session identity and original PTS origin. |
media.has_origin(value:MediaSession) | Bool | Read the selected common session identity and original PTS origin. |
media.audio_blocks(value:MediaSession) | Int64 | Read bounded common session decode counters or state. |
media.audio_frames(value:MediaSession) | Int64 | Read bounded common session decode counters or state. |
media.video_frames(value:MediaSession) | Int64 | Read bounded common session decode counters or state. |
media.state(value:MediaSession) | String | Read bounded common session decode counters or state. |
Aner documentation · Reference and guides