@absolutejs/voice 0.0.22-beta.606 → 0.0.22-beta.607

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4496,18 +4496,14 @@ var createVoiceSession = (options) => {
4496
4496
  text: pendingText,
4497
4497
  transcripts: session.currentTurn.transcripts
4498
4498
  };
4499
- const startedAt = Date.now();
4500
4499
  const speculate = options.route.speculate;
4501
4500
  const promise = Promise.resolve(speculate({
4502
4501
  api,
4503
4502
  context: options.context,
4504
4503
  session,
4505
4504
  turn: provisionalTurn
4506
- })).then((result) => {
4507
- console.info(`[voice][p3] speculate done session=${session.id} -> ${result?.text ? `${result.text.length} chars` : "null"} in ${Date.now() - startedAt}ms for "${pendingText.slice(0, 30)}"`);
4508
- return result && result.text.trim() ? { text: result.text } : null;
4509
- }).catch((error) => {
4510
- console.info(`[voice][p3] speculate error: ${error instanceof Error ? error.message : String(error)}`);
4505
+ })).then((result) => result && result.text.trim() ? { text: result.text } : null).catch((error) => {
4506
+ console.info(`[voice][p3] speculate error session=${session.id}: ${error instanceof Error ? error.message : String(error)}`);
4511
4507
  return null;
4512
4508
  });
4513
4509
  speculation = { pendingText, promise };
@@ -6723,18 +6723,14 @@ var createVoiceSession = (options) => {
6723
6723
  text: pendingText,
6724
6724
  transcripts: session.currentTurn.transcripts
6725
6725
  };
6726
- const startedAt = Date.now();
6727
6726
  const speculate = options.route.speculate;
6728
6727
  const promise = Promise.resolve(speculate({
6729
6728
  api,
6730
6729
  context: options.context,
6731
6730
  session,
6732
6731
  turn: provisionalTurn
6733
- })).then((result) => {
6734
- console.info(`[voice][p3] speculate done session=${session.id} -> ${result?.text ? `${result.text.length} chars` : "null"} in ${Date.now() - startedAt}ms for "${pendingText.slice(0, 30)}"`);
6735
- return result && result.text.trim() ? { text: result.text } : null;
6736
- }).catch((error) => {
6737
- console.info(`[voice][p3] speculate error: ${error instanceof Error ? error.message : String(error)}`);
6732
+ })).then((result) => result && result.text.trim() ? { text: result.text } : null).catch((error) => {
6733
+ console.info(`[voice][p3] speculate error session=${session.id}: ${error instanceof Error ? error.message : String(error)}`);
6738
6734
  return null;
6739
6735
  });
6740
6736
  speculation = { pendingText, promise };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.606",
3
+ "version": "0.0.22-beta.607",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",