Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions rest/docs/calling.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,13 @@ client.calling.ai_stop(call_id, control_id="ai-1")

## Live Transcribe & Translate

`action` is an object keyed by the phase (`start`/`summarize`), with the phase's
parameters inside it — or the literal string `"stop"`:

```python
client.calling.live_transcribe(call_id, action="start", lang="en")
client.calling.live_translate(call_id, action="start", from_lang="en", to_lang="es")
client.calling.live_transcribe(call_id, action={"start": {"lang": "en", "webhook": "https://example.com/transcripts"}})
client.calling.live_transcribe(call_id, action="stop")
client.calling.live_translate(call_id, action={"start": {"from_lang": "en", "to_lang": "es"}})
```

## Fax
Expand Down
9 changes: 5 additions & 4 deletions tests/unit/core/test_swml_service_swaig.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,14 @@ def test_can_emit_ai_sidecar_verb(self) -> None:
svc.add_section("main")
ok = svc.add_verb_to_section("main", "answer", {})
assert ok
# ai_sidecar isn't in the live SWML schema yet — bypass via raw doc.
# Once the schema lands, callers will use add_verb_to_section directly.
svc._current_document["sections"]["main"].append({"ai_sidecar": {
# ai_sidecar landed in the bundled schema (4645d48), so the supported
# path works — and routes the verb through schema validation.
ok = svc.add_verb_to_section("main", "ai_sidecar", {
"prompt": "real-time copilot",
"lang": "en-US",
"direction": ["remote-caller", "local-caller"],
}})
})
assert ok
rendered = json.loads(svc.render_document())
verbs = [list(v.keys())[0] for v in rendered["sections"]["main"]]
assert "answer" in verbs
Expand Down
Loading