forked from Blendman974/faceclaw
Add OpenAI Whisper Realtime integration
This commit is contained in:
1 parent
161dbd104e
commit
008f2277ca
7 files changed
+320
-28
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { encodeBase64 } from "./cloud-stt";
|
||||
|
||||
declare const com: any;
|
||||
declare const android: any;
|
||||
|
||||
/**
|
||||
* ElevenLabs realtime speech-to-text over WebSocket.
|
||||
@@ -165,13 +166,3 @@ export class ElevenLabsSttClient {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function encodeBase64(bytes: Uint8Array): string {
|
||||
if (!global.isAndroid) return "";
|
||||
const javaBytes = Array.create("byte", bytes.length);
|
||||
for (let i = 0; i < bytes.length; i++) {
|
||||
const value = bytes[i]!;
|
||||
javaBytes[i] = value > 127 ? value - 256 : value;
|
||||
}
|
||||
return String(android.util.Base64.encodeToString(javaBytes, android.util.Base64.NO_WRAP));
|
||||
}
|
||||
Reference in new issue
Block a user