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

Don't pass a mimetype to convertBase64AudioToBlob #132

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default {

async enqueueAudio(base64EncodedAudio: string): Promise<void> {
audioQueue.add(() => new Promise((resolve) => {
const audioBlob = convertBase64ToBlob(base64EncodedAudio, mimeType!);
const audioBlob = convertBase64ToBlob(base64EncodedAudio);
const audioUrl = URL.createObjectURL(audioBlob);
currentAudio = new Audio(audioUrl);
currentAudio.onended = () => resolve()
Expand Down
2 changes: 1 addition & 1 deletion evi-typescript-example/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ import './styles.css';
case 'audio_output':
// convert base64 encoded audio to a Blob
const audioOutput = message.data;
const blob = convertBase64ToBlob(audioOutput, mimeType);
const blob = convertBase64ToBlob(audioOutput);

// add audio Blob to audioQueue
audioQueue.push(blob);
Expand Down
2 changes: 1 addition & 1 deletion evi-typescript-function-calling/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ import './styles.css';
case "audio_output":
// convert base64 encoded audio to a Blob
const audioOutput = message.data;
const blob = convertBase64ToBlob(audioOutput, mimeType);
const blob = convertBase64ToBlob(audioOutput);

// add audio Blob to audioQueue
audioQueue.push(blob);
Expand Down