INNER CODE UNIT · TypeScript

normalizeAudio

iurysza/module-graph · .agents/skills/audio-transcribe/scripts/transcribe.ts:97

async function normalizeAudio(inputPath: string, outputPath: string): Promise<void> {
  console.log(`Normalizing ${basename(inputPath)} for upload...`);
  const result = await run([
    "ffmpeg",
    "-y",
    "-i",
    inputPath,
    "-vn",
    "-ac",
    "1",
    "-ar",
    "16000",
    "-b:a",
    "48k",
    outputPath,
  ]);
  if (result.exitCode !== 0) {
    throw new Error(`ffmpeg normalization failed: ${result.stderr}`);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…