(format: string, formats: readonly string[])
| 12 | } |
| 13 | |
| 14 | export 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 | |
| 23 | const T2A_SAMPLE_RATE: Partial<Record<T2AFormat, number>> = { |
| 24 | opus: 24000, |
no test coverage detected