linto-web-client
A full figured LinTO client designed for building custom voice interactions on a webpage.
See demo here : linto.ai
Note : LinTO Web client relies on WebVoiceSDK for handling everything related to audio input, hotword triggers, recordings... See LinTO WebVoiceSDK on NPM for more informations
Note : Any LinTO web client needs to have a token registered towards a LinTO server. See more information in LinTO's official documentation
Note : This library might cause issues (crashes) on your webpage as some browser's implementation of WebAssembly runtimes is still experimental
Usage
With bundler :
npm i @linto.ai/linto-web-client
Static script from CDN :
Test right away :
- Tweak content in tests/index.js (your token, LinTO server endpoint etc)
npm run test
instanciante
try windowlinto = await `/overwatch/local/web/login` `` `` ; catch lintoError // handle the error
Handling errors
This command might throw an error if something bad occurs
Instance user methods
- // Uses hotword built in WebVoiceSDK by name / model / threshold- // Start to listen to hotwords and binds a publisher for acquired audio when speaking stop- - // Manualy activate a hotword detection, use it when commandPipeline is active.- - - - // Tries to initiate a streaming transcription session with your LinTO server. The LinTO server needs a streaming skill and a streaming STT service- - // Main startup command to initiate connexion towards your LinTO server- - // Use browser text to speech- // Uses browser text to speech and immediatly triggers hotword when audiosynthesis is complete
Instance events
Use events with :
linto;
Available events :
- "mqtt_connect"
- "mqtt_connect_fail"
- "mqtt_error"
- "mqtt_disconnect"
- "speaking_on"
- "speaking_off"
- "command_acquired"
- "command_published"
- "command_timeout"
- "hotword_on"
- "say_feedback_from_skill"
- "ask_feedback_from_skill"
- "streaming_start"
- "streaming_chunk"
- "streaming_final"
- "streaming_fail"
- "custom_action_from_skill"
NOTE : See proposed implementation in ./tests/index.js