Skip to content

Commit 3d03fa6

Browse files
authored
Fix missed ticks (#190)
1 parent 54f014e commit 3d03fa6

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

packages/client/README.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,11 @@ You can provide a device ID to start the conversation using the input/output dev
167167
168168
```js
169169
const conversation = await Conversation.startSession({
170-
agentId: '<your-agent-id>',
171-
inputDeviceId: '<new-input-id>',
172-
outputDeviceId: '<new-output-id>',
170+
agentId: "<your-agent-id>",
171+
inputDeviceId: "<new-input-id>",
172+
outputDeviceId: "<new-output-id>",
173173
});
174+
```
174175
175176
**Note:** Device switching only works for voice conversations. You can enumerate available devices using the [MediaDevices.enumerateDevices()](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices) API.
176177
@@ -398,20 +399,16 @@ Allows you to change the audio input device during an active voice conversation.
398399
**Note:** In WebRTC mode the input format and sample rate are hardcoded to `pcm` and `48000` respectively. Changing those values when changing the input device is a no-op.
399400
400401
```js
401-
import { VoiceConversation } from "@elevenlabs/client";
402-
403-
// Start a voice conversation
404402
const conversation = await Conversation.startSession({
405403
agentId: "<your-agent-id>",
406-
textOnly: false, // Ensure this is a voice conversation
407404
});
408405

409406
// Change to a specific input device
410-
await (conversation as VoiceConversation).changeInputDevice({
407+
await conversation.changeInputDevice({
411408
sampleRate: 16000,
412409
format: "pcm",
413410
preferHeadphonesForIosDevices: true,
414-
inputDeviceId: "your-device-id", // Optional: specific device ID
411+
inputDeviceId: "your-device-id",
415412
});
416413
```
417414
@@ -422,13 +419,11 @@ Allows you to change the audio output device during an active voice conversation
422419
**Note:** In WebRTC mode the output format and sample rate are hardcoded to `pcm` and `48000` respectively. Changing those values when changing the output device is a no-op.
423420
424421
```js
425-
import { VoiceConversation } from "@elevenlabs/client";
426-
427422
// Change to a specific output device
428423
await conversation.changeOutputDevice({
429424
sampleRate: 16000,
430425
format: "pcm",
431-
outputDeviceId: "your-device-id", // Optional: specific device ID
426+
outputDeviceId: "your-device-id",
432427
});
433428
```
434429

0 commit comments

Comments
 (0)