| Crates.io | soundkit |
| lib.rs | soundkit |
| version | 0.12.2 |
| created_at | 2023-05-14 06:03:02.95113+00 |
| updated_at | 2026-01-04 16:56:46.351323+00 |
| description | Audio format optimised for low-latency audio. |
| homepage | |
| repository | https://github.com/wavey-ai/soundkit |
| max_upload_size | |
| id | 864114 |
| size | 382,138 |
A package for working with low-latency audio via SRT and via HTTP Range requests
This package provides encoding and decoding for audio packet headers. The header encoding is used to specify the details about the audio data that follows in the packet. This includes information about the encoding method, configuration parameters, and frame sizes for each channel.
The header structure is as follows:
|-----------------------------------------------------------------------------|
| Flag + Config ID | Channel Count | Frame Size 1 | ... |
|-----------------------------------------------------------------------------|
| 1 Byte | 1 Byte | 2 Bytes | ... |
|-----------------------------------------------------------------------------|
The EncodingFlag indicates the method of encoding used for the audio data. Currently, two encoding methods are supported:
PCM (value 0): This flag indicates that Pulse Code Modulation (PCM) encoding is used. PCM is a method used to digitally represent analog signals.Opus (value 1): This flag indicates that Opus encoding is used. Opus is a lossy audio coding format designed to efficiently code speech and general audio in a single format.The AudioConfig is a enumeration that represents the sample rate and bit depth of the audio data. The following configurations are supported:
Hz44100Bit16Hz44100Bit24Hz44100Bit32Hz48000Bit16Hz48000Bit24Hz48000Bit32...Hz352800Bit32Each configuration indicates a combination of the sample rate (in Hz) and the bit depth (in Bits). For instance, Hz44100Bit16 represents a sample rate of 44100 Hz and a bit depth of 16 bits.