forked from Blendman974/faceclaw
Debugged ElevenLabs STT; added debug-recording option
This commit is contained in:
1 parent
097d40efb2
commit
7fcab243a3
8 files changed
+34
-7
No files matched your search
@@ -61,7 +61,9 @@ export class ElevenLabsSttClient {
|
||||
});
|
||||
try {
|
||||
// The API key rides an xi-api-key header, added by FaceclawWebSocket.
|
||||
this.ws = new com.faceclaw.app.FaceclawWebSocket(url, this.listenerProxy, "xi-api-key", this.options.apiKey);
|
||||
const key = this.options.apiKey;
|
||||
console.log(`[elevenlabs] connecting; apiKey length=${key.length} prefix=${key.slice(0, 4)}`);
|
||||
this.ws = new com.faceclaw.app.FaceclawWebSocket(url, this.listenerProxy, "xi-api-key", key);
|
||||
this.options.onStatus("Connecting to ElevenLabs...");
|
||||
} catch (error) {
|
||||
this.options.onError(`ElevenLabs connection failed: ${String((error as Error)?.message ?? error)}`);
|
||||
|
||||
@@ -122,7 +122,7 @@ export class G2MirrorClient {
|
||||
},
|
||||
});
|
||||
try {
|
||||
this.ws = new com.faceclaw.app.FaceclawWebSocket(url, this.listenerProxy);
|
||||
this.ws = new com.faceclaw.app.FaceclawWebSocket(url, this.listenerProxy, null, null);
|
||||
} catch (error) {
|
||||
this.ws = null;
|
||||
this.handleConnectionLost(`Connection failed: ${shortenError(String((error as Error)?.message ?? error))}`);
|
||||
|
||||
@@ -24,6 +24,7 @@ export type PushToTalkOptions = {
|
||||
communicator: any;
|
||||
provider: VoiceProviderKind;
|
||||
elevenLabsApiKey: string;
|
||||
saveRecording: boolean;
|
||||
};
|
||||
|
||||
export class FaceclawVoiceControlBridge {
|
||||
@@ -59,6 +60,7 @@ export class FaceclawVoiceControlBridge {
|
||||
if (this.started) this.stop();
|
||||
this.ensureController();
|
||||
this.controller?.setCommunicator(options.communicator);
|
||||
this.controller?.setSaveRecordings(options.saveRecording);
|
||||
|
||||
if (options.provider === "elevenlabs" && options.elevenLabsApiKey.trim()) {
|
||||
this.cloudClient = new ElevenLabsSttClient({
|
||||
|
||||
Reference in new issue
Block a user