Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rick/ben UI enhancements #3

Merged
merged 4 commits into from
Dec 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: change type from string to Transcription
  • Loading branch information
bklieger-groq authored and ricklamers committed Dec 18, 2024
commit 1602760876d925fc405172077086d1f39ed1778f
4 changes: 2 additions & 2 deletions src/app/api/transcribe/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Groq({
apiKey: process.env.GROQ_API_KEY,
});

async function transcribeAudio(audioBlob: Blob): Promise<string> {
async function transcribeAudio(audioBlob: Blob): Promise<Groq.Audio.Transcriptions.Transcription> {
try {
const arrayBuffer = await audioBlob.arrayBuffer();
const buffer = Buffer.from(arrayBuffer);
Expand All @@ -19,7 +19,7 @@ async function transcribeAudio(audioBlob: Blob): Promise<string> {
language: 'en'
});

return transcription.text;
return transcription;
} catch (error) {
console.error('Error transcribing audio:', error);
throw error;
Expand Down