Skip to content

Commit

Permalink
fix client speech to text
Browse files Browse the repository at this point in the history
  • Loading branch information
tcm390 committed Feb 12, 2025
1 parent f3e3b3b commit 8b858e1
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 @@ -89,9 +89,10 @@ export class CharacterServer {
return;
}

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

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

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

Expand Down

0 comments on commit 8b858e1

Please sign in to comment.