/** @packageDocumentation Audio properties for the Ogg Speex format, parsed from the Speex identification header (packet 0). */ import { AudioProperties } from "../../audioProperties.js"; import { ReadStyle } from "../../toolkit/types.js"; import type { OggFile } from "../oggFile.js"; /** * Audio properties for Ogg Speex files, parsed from the Speex identification * header (packet 0). * * Speex header layout: * "Speex "(8) + speexVersion(20) + speexVersionId(4 LE) + * headerSize(4 LE) + rate(4 LE) + mode(4 LE) + * modeBitstreamVersion(4 LE) + nbChannels(4 LE) + bitrate(4 LE) + * frameSize(4 LE) + vbr(4 LE) + framesPerPacket(4 LE) */ export declare class SpeexProperties extends AudioProperties { /** Stream duration in milliseconds, computed from first and last granule positions. */ private _lengthInMs; /** Average bitrate in kilobits per second, computed from stream data. */ private _bitrate; /** Sample rate in Hz as declared in the Speex identification header. */ private _sampleRate; /** Number of audio channels as declared in the Speex identification header. */ private _channels; /** Nominal bitrate from the Speex header in bits per second; `-1` for VBR, `0` if unset. */ private _bitrateNominal; /** * Constructs a SpeexProperties instance with the given read style. * @param readStyle - Level of detail for property parsing. */ constructor(readStyle?: ReadStyle); /** * Asynchronously parse and return audio properties from the given Ogg Speex file. * @param file - The {@link OggFile} to read properties from. * @param readStyle - Level of detail for property parsing. * @returns A populated {@link SpeexProperties} instance. */ static create(file: OggFile, readStyle?: ReadStyle): Promise; /** Stream duration in milliseconds, computed from first and last granule positions. */ get lengthInMilliseconds(): number; /** Average bitrate in kilobits per second, computed from audio data size and duration. */ get bitrate(): number; /** Sample rate in Hz as declared in the Speex identification header. */ get sampleRate(): number; /** Number of audio channels as declared in the Speex identification header. */ get channels(): number; /** * Nominal bitrate from the Speex header in bits per second. * `-1` indicates variable-bitrate (VBR); `0` indicates not set. */ get bitrateNominal(): number; /** * Reads and populates audio properties from the Speex identification header (packet 0). * @param file - The {@link OggFile} to read from. */ private read; } //# sourceMappingURL=speexProperties.d.ts.map