MCPcopy
hub / github.com/MiniMax-AI/cli / validateAudioFormat

Function validateAudioFormat

src/utils/audio-formats.ts:14–21  ·  view source on GitHub ↗
(format: string, formats: readonly string[])

Source from the content-addressed store, hash-verified

12}
13
14export function validateAudioFormat(format: string, formats: readonly string[]): void {
15 if (!(formats as readonly string[]).includes(format)) {
16 throw new CLIError(
17 `Invalid audio format "${format}". Supported: ${formatList(formats)}`,
18 ExitCode.USAGE,
19 );
20 }
21}
22
23const T2A_SAMPLE_RATE: Partial<Record<T2AFormat, number>> = {
24 opus: 24000,

Callers 4

runFunction · 0.90
runFunction · 0.90
runFunction · 0.90

Calls 1

formatListFunction · 0.85

Tested by

no test coverage detected