@lzcontest/audio
v0.1.0
Published
Environment-neutral audio device, clip, routing, capture, and playback contracts.
Maintainers
Readme
@lzcontest/audio
Environment-neutral audio device, clip, routing, capture, and playback contracts.
Install
npm install @lzcontest/audioCreate clip identifiers
import { audioClipId } from '@lzcontest/audio';
const clipId = audioClipId('voice-cq');Type a voice-message profile
import type {
VoiceMessageProfile,
VoiceMessageProfileRepository,
} from '@lzcontest/audio';
type MessageId = 'cq' | 'exchange' | 'again';
const profile: VoiceMessageProfile<MessageId> = {
schemaVersion: 1,
clips: {},
updatedAt: new Date().toISOString(),
};
declare const repository: VoiceMessageProfileRepository<MessageId>;
await repository.save(profile);Core API
| Export | Purpose |
| --- | --- |
| AudioDeviceService | Device discovery, capture, and playback port |
| AudioClipRepository | Encoded clip persistence contract |
| AudioRoutingProfileRepository | Input/output routing persistence |
| VoiceMessageProfile<MessageId> | Caller-keyed voice-message mapping |
| validateAudioLevel | Validate normalized RMS/peak meters |
