{"package":"@11labs/client","version":"0.2.0","status":"deprecated","authorMessage":"This package is no longer maintained. Please use @elevenlabs/client for the latest version.","description":"An SDK library for using ElevenLabs in browser based applications. If you're looking for a Node.js library, please refer to the ElevenLabs Node.js Library.","installSteps":["npm install @elevenlabs/client","yarn add @elevenlabs/client","pnpm install @elevenlabs/client"],"usage":"This library is primarily meant for development in vanilla JavaScript projects, or as a base for libraries tailored to specific frameworks.","connectionTypes":["WebSockets (default)","WebRTC"],"initializeConversation":"const conversation = await Conversation.startSession(options);","sessionConfiguration":{"publicAgents":"const conversation = await Conversation.startSession({ agentId: '', connectionType: 'webrtc' });","privateAgents":"const response = await fetch('/signed-url', yourAuthHeaders); const signedUrl = await response.text(); const conversation = await Conversation.startSession({ signedUrl, connectionType: 'websocket' });"},"optionalCallbacks":["onConnect","onDisconnect","onMessage","onError","onStatusChange","onModeChange","onCanSendFeedbackChange"],"clientTools":"const conversation = await Conversation.startSession({ clientTools: { displayMessage: async (parameters) => { alert(text); return 'Message displayed'; } } });","conversationOverrides":"const conversation = await Conversation.startSession({ overrides: { agent: { prompt: { prompt: 'My custom prompt' }, firstMessage: 'My custom first message', language: 'en' }, tts: { voiceId: 'custom voice id' }, conversation: { textOnly: true } } });","userIdentification":"const conversation = await Conversation.startSession({ agentId: '', userId: 'user-123', connectionType: 'webrtc' });","connectionDelay":{"android":3000,"ios":0,"default":0},"wakeLock":"const conversation = await Conversation.startSession({ useWakeLock: false });","returnValue":"startSession returns a Conversation instance that can be used to control the session.","endSession":"await conversation.endSession();","sendFeedback":"conversation.sendFeedback(true);","sendContextualUpdate":"conversation.sendContextualUpdate('User navigated to another page.');","sendUserMessage":"sendButton.addEventListener('click', e => { conversation.sendUserMessage(textInput.value); textInput.value = ''; });","sendUserActivity":"textInput.addEventListener('input', () => { conversation.sendUserActivity(); });","getId":"const id = conversation.getId();","setVolume":"await conversation.setVolume({ volume: 0.5 });","muteMic":"conversation.setMicMuted(true);","getInputVolume":"const inputVolume = await conversation.getInputVolume();","getOutputVolume":"const outputVolume = await conversation.getOutputVolume();","development":"Please, refer to the README.md file in the root of this repository.","contributing":"Please, create an issue first to discuss the proposed changes. Any contributions are welcome!"}