Skip to content

Commit

Permalink
fix transcription (#3454)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcm390 authored Feb 12, 2025
1 parent 6a9c76a commit 925b82d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/agent/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,11 @@ export class CharacterServer {
res.status(404).send("Agent not found");
return;
}

const audioBuffer = fs.readFileSync(audioFile.path);
const transcription = await runtime.useModel(ModelClass.TRANSCRIPTION, audioBuffer);

const transcription = await runtime.useModel(ModelClass.TRANSCRIPTION, fs.createReadStream(audioFile.path));

res.json(transcription);
res.json({text: transcription});
}
);

Expand Down

0 comments on commit 925b82d

Please sign in to comment.