Skip to content

Commit

Permalink
Merge pull request #3461 from elizaOS/tcm/fix-client-speech-to-text
Browse files Browse the repository at this point in the history
fix: client speech to text
  • Loading branch information
tcm390 authored Feb 12, 2025
2 parents f3e3b3b + 8b858e1 commit d4a5a36
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 d4a5a36

Please sign in to comment.