@lumavox/react 0.10.0 → 0.11.0
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/README.md +1 -1
- package/dist/use-agent.d.ts +2 -1
- package/dist/use-agent.js +7 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@ redial.
|
|
|
57
57
|
| `speaking` `recording` | the adapter is playing; the recorder is open |
|
|
58
58
|
| `interrupted` | the device has the audio — a call, Siri, another app |
|
|
59
59
|
| `send` `startAudio` `sendAudio` `endAudio` `cancel` `mute` `reconnect` `close` | the conversation's |
|
|
60
|
-
| `startRecording` `stopRecording({ transcribeOnly, discard })` | through the `audio` adapter |
|
|
60
|
+
| `startRecording({ rate, transcribeOnly, speech, thoughts })` `stopRecording({ transcribeOnly, discard })` | through the `audio` adapter; a held turn's own voice and thinking, as `send`'s |
|
|
61
61
|
| `listen(options)` `stopListening()` `listening` `hearing` | hands-free: each utterance a turn, talking over the agent stopping it (`@lumavox/client`'s `listen`) |
|
|
62
62
|
| `newSession()` | a new conversation with the same agent |
|
|
63
63
|
| `conversation` | the `Conversation` itself |
|
package/dist/use-agent.d.ts
CHANGED
|
@@ -75,7 +75,8 @@ export type AgentError =
|
|
|
75
75
|
message: string;
|
|
76
76
|
error: unknown;
|
|
77
77
|
};
|
|
78
|
-
|
|
78
|
+
/** A held turn's own `speech` and `thoughts`, as `send`'s, over the conversation's. */
|
|
79
|
+
export interface RecordingOptions extends TurnOptions {
|
|
79
80
|
/** Hz to ask the recorder for: 16,000 by default. It must grant one of `RECORDING_RATES`. */
|
|
80
81
|
rate?: number;
|
|
81
82
|
/** A dictation: the reply being spoken plays on. */
|
package/dist/use-agent.js
CHANGED
|
@@ -324,7 +324,13 @@ export function useAgent(target, options = {}) {
|
|
|
324
324
|
});
|
|
325
325
|
return false;
|
|
326
326
|
}
|
|
327
|
-
c.startAudio({
|
|
327
|
+
c.startAudio({
|
|
328
|
+
rate: granted,
|
|
329
|
+
...(record.speech === undefined ? {} : { speech: record.speech }),
|
|
330
|
+
...(record.thoughts === undefined
|
|
331
|
+
? {}
|
|
332
|
+
: { thoughts: record.thoughts }),
|
|
333
|
+
});
|
|
328
334
|
mine.started = true;
|
|
329
335
|
for (const pcm of mine.early.splice(0))
|
|
330
336
|
c.sendAudio(pcm);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumavox/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "React and React Native hooks for Lumavox agents: a conversation that keeps itself connected, sessions, memory and relations, over @lumavox/client.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"typecheck": "tsc --noEmit && tsc --noEmit -p test"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@lumavox/client": "0.
|
|
32
|
+
"@lumavox/client": "0.11.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react": ">=18"
|