Skip to content

Commit 6b9f52e

Browse files
authored
Merge branch 'main' into docs-authoring-rules
2 parents a6f8a1f + 304bec5 commit 6b9f52e

32 files changed

Lines changed: 1194 additions & 58 deletions

File tree

fern/apis/signalwire-rest/openapi.yaml

Lines changed: 544 additions & 2 deletions
Large diffs are not rendered by default.

fern/products/apis/apis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ navigation:
7272
- section: Calling
7373
skip-slug: true
7474
contents:
75-
- calls
75+
- calls:
76+
- section: Webhooks
77+
slug: webhooks
78+
contents:
79+
- subpackage_calls.transcribe_status_callback
7680
- queues
7781
- queueMembers
7882
- recordings

fern/products/apis/pages/core/error-codes.mdx

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,11 @@ The `code` field above maps to one of the values below. Each entry describes the
231231
- The resource could not be purchased.
232232
</ParamField>
233233

234+
<ParamField path="custom_variable_value_too_long" type="Error" toc={true}>
235+
236+
- A `custom_variables` value exceeds the maximum size. Each value must be at most 1024 bytes.
237+
</ParamField>
238+
234239
<ParamField path="destination_number_not_supported" type="Error" toc={true}>
235240

236241
- The destination phone number is not supported.
@@ -336,6 +341,11 @@ The `code` field above maps to one of the values below. Each entry describes the
336341
- This account has an insufficient balance.
337342
</ParamField>
338343

344+
<ParamField path="insufficient_balance_to_receive_message" type="Error" toc={true}>
345+
346+
- The account has an insufficient balance to receive the message.
347+
</ParamField>
348+
339349
<ParamField path="integration_test_verified_caller_required" type="Error" toc={true}>
340350

341351
- The `to` number must be the verified caller ID for the trial campaign.
@@ -391,6 +401,16 @@ The `code` field above maps to one of the values below. Each entry describes the
391401
- Invalid content type.
392402
</ParamField>
393403

404+
<ParamField path="invalid_custom_variable_name" type="Error" toc={true}>
405+
406+
- A `custom_variables` key is invalid. Keys must start with a letter or underscore and contain only letters, numbers, and underscores.
407+
</ParamField>
408+
409+
<ParamField path="invalid_custom_variable_value" type="Error" toc={true}>
410+
411+
- A `custom_variables` value is invalid. Values must be non-empty strings.
412+
</ParamField>
413+
394414
<ParamField path="invalid_destination_number" type="Error" toc={true}>
395415

396416
- The destination phone number is invalid.
@@ -636,6 +656,11 @@ The `code` field above maps to one of the values below. Each entry describes the
636656
- Value must be an array of `{name, value}` objects.
637657
</ParamField>
638658

659+
<ParamField path="must_be_object" type="Error" toc={true}>
660+
661+
- The `custom_variables` parameter must be an object of string key/value pairs.
662+
</ParamField>
663+
639664
<ParamField path="must_belong_to_project" type="Error" toc={true}>
640665

641666
- The requested resource must belong to the project being used to authenticate the request.
@@ -871,6 +896,11 @@ The `code` field above maps to one of the values below. Each entry describes the
871896
- The rate limit has been exceeded.
872897
</ParamField>
873898

899+
<ParamField path="reserved_custom_variable_name" type="Error" toc={true}>
900+
901+
- A `custom_variables` key uses a reserved prefix. The prefixes `signalwire_`, `sw_`, `rtc_`, and `internal_` are reserved for internal use and cannot be used in your own keys.
902+
</ParamField>
903+
874904
<ParamField path="reserved_header_name" type="Error" toc={true}>
875905

876906
- The provided header name is reserved and cannot be set by the caller.
@@ -991,6 +1021,11 @@ The `code` field above maps to one of the values below. Each entry describes the
9911021
- The provided token is not associated with a valid video room.
9921022
</ParamField>
9931023

1024+
<ParamField path="too_many_custom_variables" type="Error" toc={true}>
1025+
1026+
- The request contains too many custom variables. A maximum of 20 keys is allowed.
1027+
</ParamField>
1028+
9941029
<ParamField path="too_many_headers" type="Error" toc={true}>
9951030

9961031
- The number of headers exceeds the maximum allowed.

fern/products/server-sdks/pages/reference/python/relay/actions/transcribe-action/index.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: "TranscribeAction"
33
slug: /reference/python/relay/actions/transcribe-action
44
description: Action handle for an active transcription operation.
55
max-toc-depth: 3
6-
hidden: true
76
---
87

98
[call-transcribe]: /docs/server-sdks/reference/python/relay/call/transcribe

fern/products/server-sdks/pages/reference/python/relay/actions/transcribe-action/stop.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: "stop"
33
slug: /reference/python/relay/actions/transcribe-action/stop
44
description: Stop transcription.
55
max-toc-depth: 3
6-
hidden: true
76
---
87

98
Stop transcription.

fern/products/server-sdks/pages/reference/python/relay/call/transcribe.mdx

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,21 @@ title: "transcribe"
33
slug: /reference/python/relay/call/transcribe
44
description: "Start transcribing call audio."
55
max-toc-depth: 3
6-
hidden: true
76
---
87

98
[transcribeaction]: /docs/server-sdks/reference/python/relay/actions
109
[live-transcribe]: /docs/server-sdks/reference/python/relay/call/live-transcribe
1110
[calling-call-transcribe]: /docs/server-sdks/reference/python/relay/call#events
1211
[call-events]: /docs/server-sdks/reference/python/relay/call#events
1312

14-
Start transcribing call audio. Returns a
13+
Transcribe the entire call in the background. Returns a
1514
[`TranscribeAction`][transcribeaction] that you can use
1615
to stop the transcription or wait for it to complete.
1716

1817
<Info>
19-
For real-time transcription with immediate text output, see
20-
[`live_transcribe()`][live-transcribe].
21-
The `transcribe()` method starts a background transcription that resolves when the operation finishes.
18+
The `transcribe()` method transcribes the whole call and resolves when it finishes.
19+
For real-time transcription delivered as the call happens, see
20+
[`live_transcribe()`][live-transcribe] instead.
2221
</Info>
2322

2423
<Info>
@@ -36,8 +35,8 @@ This method emits [`calling.call.transcribe`][calling-call-transcribe] events. S
3635
</ParamField>
3736

3837
<ParamField path="on_completed" type="Optional[Callable[[RelayEvent], Any]]" toc={true}>
39-
Callback invoked when transcription completes. The event contains the
40-
transcription `url`, `duration`, and `size`.
38+
Callback invoked when transcription completes. The event carries the
39+
recording's `url`, `duration`, and `size`.
4140
</ParamField>
4241

4342
## **Returns**
@@ -66,13 +65,8 @@ async def handle_call(call):
6665
status_url="https://example.com/transcription-status",
6766
)
6867

69-
# Let the call proceed...
68+
# Transcription runs in the background until the call ends
7069
await call.wait_for_ended()
7170

72-
# The transcription result is available after the call ends
73-
if action.result:
74-
url = action.result.params.get("url", "")
75-
print(f"Transcription available at: {url}")
76-
7771
client.run()
7872
```

fern/products/server-sdks/pages/reference/python/relay/events.mdx

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,10 @@ client.run()
10861086

10871087
Emitted when a transcribe operation changes state.
10881088

1089+
<Info>
1090+
Background transcription is implemented as a recording with transcription enabled, so this event reports the underlying recording (its `url`, `recording_id`, `duration`, and `size`).
1091+
</Info>
1092+
10891093
#### TranscribeEvent
10901094

10911095
Handlers for this event receive a `TranscribeEvent` with the following properties:
@@ -1097,25 +1101,32 @@ Handlers for this event receive a `TranscribeEvent` with the following propertie
10971101
<ParamField path="state" type="str" default="" toc={true}>
10981102
Transcription state.
10991103

1100-
- `"finished"` -- transcription completed successfully
1104+
- `"transcribing"` -- transcription has started
1105+
- `"finished"` -- transcription completed; `duration`, `size`, `start_time`, and `end_time` are included
11011106
</ParamField>
11021107

11031108
<ParamField path="url" type="str" default="" toc={true}>
1104-
URL of the transcription result.
1109+
URL where the recording is hosted. Present once available.
11051110
</ParamField>
11061111

11071112
<ParamField path="recording_id" type="str" default="" toc={true}>
1108-
Associated recording ID.
1113+
ID of the recording.
11091114
</ParamField>
11101115

11111116
<ParamField path="duration" type="float" default="0.0" toc={true}>
1112-
Duration of the transcribed audio in seconds.
1117+
Duration of the recording in seconds. Present on the `finished` event.
11131118
</ParamField>
11141119

11151120
<ParamField path="size" type="int" default="0" toc={true}>
1116-
Size of the transcription data in bytes.
1121+
Size of the recording in bytes. Present on the `finished` event.
11171122
</ParamField>
11181123

1124+
<Info>
1125+
The raw event payload (`event.params`) also carries `status_url` (when a status URL
1126+
was set) and, on the `finished` event, `start_time` and `end_time` (Unix epoch seconds).
1127+
These are not yet exposed as typed attributes on `TranscribeEvent`.
1128+
</Info>
1129+
11191130
#### Example
11201131

11211132
```python

fern/products/server-sdks/pages/reference/python/rest/calling/transcribe-stop.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Stop an active transcription.
1111

1212
## **Request**
1313

14-
<Schema type="Calling.CallLiveTranscribeRequest" api="signalwire-rest" exclude={["command"]} />
14+
<Schema type="Calling.CallTranscribeStopRequest" api="signalwire-rest" exclude={["command"]} />
1515

1616
## **Response**
1717

fern/products/server-sdks/pages/reference/python/rest/calling/transcribe.mdx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@ description: Start transcribing speech on an active call via REST.
55
max-toc-depth: 3
66
---
77

8-
Start transcribing speech on an active call. Transcription results are delivered
9-
via events. Returns a `control_id` for stopping the transcription.
8+
Start transcribing an active call in the background. The transcription covers the whole
9+
call and completes when the call ends. For real-time transcription, use live transcription.
10+
Status updates are delivered to the optional `status_url`. Supply a `control_id` so you
11+
can stop the transcription later with
12+
[`transcribe_stop`](/docs/server-sdks/reference/python/rest/calling/transcribe-stop).
1013

1114
## **Request**
1215

13-
<Schema type="Calling.CallLiveTranscribeRequest" api="signalwire-rest" exclude={["command"]} />
16+
<Schema type="Calling.CallTranscribeRequest" api="signalwire-rest" exclude={["command"]} />
1417

1518
## **Response**
1619

@@ -27,8 +30,9 @@ client = RestClient(
2730
host="your-space.signalwire.com",
2831
)
2932

30-
result = client.calling.transcribe(
33+
client.calling.transcribe(
3134
call_id="call-id-xxx",
35+
control_id="transcribe-1",
36+
status_url="https://example.com/transcribe-status",
3237
)
33-
control_id = result.get("control_id")
3438
```

fern/products/server-sdks/pages/reference/typescript/relay/actions/transcribe-action/index.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: "TranscribeAction"
33
slug: /reference/typescript/relay/actions/transcribe-action
44
description: Action handle for an active transcription operation.
55
max-toc-depth: 3
6-
hidden: true
76
---
87

98
[call-transcribe]: /docs/server-sdks/reference/typescript/relay/call/transcribe

0 commit comments

Comments
 (0)