mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-06-03 00:36:28 +00:00
2.6 KiB
2.6 KiB
title
title |
---|
Pipelines |
A pipeline runs the common steps of a voice assistant:
- Speech to text
- Intent recognition
- Text to speech
Pipelines are run via a WebSocket API:
{
"type": "voice_assistant/run",
"language": "en-US"
}
The following input fields are available:
Name | Type | Description |
---|---|---|
intent_input |
string | Required. Input text to process. |
language |
string | Optional. Language of pipeline to run (default: configured language in HA). |
pipeline |
string | Optional. Id of a pipeline to run (default: use first one that matches specified language). |
conversation_id |
string | Optional. Unique id for conversation. |
timeout |
number | Optional. Number of seconds before pipeline times out (default: 30). |
Events
As the pipeline runs, it emits events back over the WebSocket connection. The following events can be emitted:
Name | Description | Emitted | Attributes |
---|---|---|---|
run-start |
Start of pipeline run | always | pipeline - Id of pipelinelanguage - Language used for pipeline |
run-finish |
End of pipeline run | always | |
intent-start |
Start of intent recognition | always | engine - Agent engine usedintent_input - Input text to agent |
intent-finish |
End of intent recognition | always | intent_output - conversation response |
tts-start |
Start of text to speech | audio only | tts_input - text to speak |
tts-finish |
End of text to speech | audio only | tts_otuput - URL of spoken audio |