(format: string)
| 300 | |
| 301 | // Get file extension from format |
| 302 | export function getFileExtension(format: string): string { |
| 303 | const formatMap: Record<string, string> = { |
| 304 | mp3: 'mp3', |
| 305 | opus: 'opus', |
| 306 | aac: 'aac', |
| 307 | flac: 'flac', |
| 308 | wav: 'wav', |
| 309 | pcm: 'pcm', |
| 310 | linear16: 'wav', |
| 311 | mulaw: 'wav', |
| 312 | alaw: 'wav', |
| 313 | ogg: 'ogg', |
| 314 | } |
| 315 | return formatMap[format] || 'mp3' |
| 316 | } |
| 317 | |
| 318 | // Get MIME type from format |
| 319 | export function getMimeType(format: string): string { |