Skip to content

Commit

Permalink
chore(sync): agents -> 0.6.4 (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbsp authored Jan 28, 2025
2 parents 42f6112 + e0ae7ce commit 751642c
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 99 deletions.
5 changes: 5 additions & 0 deletions .changeset/afraid-camels-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@livekit/agents": patch
---

fix(proc): clearer errors on crash
5 changes: 5 additions & 0 deletions .changeset/clean-garlics-cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@livekit/agents": patch
---

fix(metrics): remove ErrorOptions from MultimodalError
5 changes: 5 additions & 0 deletions .changeset/lazy-seals-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@livekit/agents-plugin-elevenlabs": patch
---

fix errors capturing frames
2 changes: 0 additions & 2 deletions .envrc

This file was deleted.

4 changes: 3 additions & 1 deletion agents/src/ipc/proc_job_executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ export class ProcJobExecutor extends JobExecutor {
this.#proc!.on('message', listener);
this.#proc!.on('error', (err) => {
if (this.#closing) return;
this.#logger.child({ err }).warn('job process exited unexpectedly');
this.#logger
.child({ err })
.warn('job process exited unexpectedly; this likely means the error above caused a crash');
clearTimeout(this.#pongTimeout);
clearInterval(this.#pingInterval);
this.#join.resolve();
Expand Down
17 changes: 7 additions & 10 deletions agents/src/metrics/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,13 @@ export class MultimodalLLMError extends Error {
type?: string;
reason?: string;
code?: string;
constructor(
{
type,
reason,
code,
message,
}: { type?: string; reason?: string; code?: string; message?: string } = {},
options?: ErrorOptions,
) {
super(message, options);
constructor({
type,
reason,
code,
message,
}: { type?: string; reason?: string; code?: string; message?: string } = {}) {
super(message);
this.type = type;
this.reason = reason;
this.code = code;
Expand Down
61 changes: 0 additions & 61 deletions flake.lock

This file was deleted.

24 changes: 0 additions & 24 deletions flake.nix

This file was deleted.

8 changes: 7 additions & 1 deletion plugins/elevenlabs/src/tts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export class SynthesizeStream extends tts.SynthesizeStream {
}).then((msg) => {
const json = JSON.parse(msg.toString());
if ('audio' in json) {
const data = new Int8Array(Buffer.from(json.audio, 'base64').buffer);
const data = new Int8Array(Buffer.from(json.audio, 'base64'));
for (const frame of bstream.write(data)) {
sendLastFrame(segmentId, false);
lastFrame = frame;
Expand All @@ -278,6 +278,12 @@ export class SynthesizeStream extends tts.SynthesizeStream {
lastFrame = frame;
}
sendLastFrame(segmentId, true);
this.queue.put(SynthesizeStream.END_OF_STREAM);

if (segmentId === requestId) {
ws.close();
return;
}
}
});
} catch {
Expand Down

0 comments on commit 751642c

Please sign in to comment.