Skip to content

Commit 3505c5a

Browse files
authored
Merge pull request #158 from DeepLcom/acl/acl-2127-rework-voice-docs
feat(voice): [ACL-2127] Remove copyable request code block
2 parents 24ebbee + cd31fec commit 3505c5a

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

api-reference/voice.mdx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,12 @@ The Voice API uses a two-step flow to initiate streaming.
124124

125125
<Steps>
126126
<Step title="Request Stream">
127-
Make a POST request to obtain an ephemeral streaming URL and authentication token:
127+
Make a POST request `v1/voice/realtime` to obtain an ephemeral streaming URL and authentication token. The response will look like this:
128128

129-
```http
130-
POST https://api.deepl.com/v1/voice/realtime
131-
```
132-
Response:
133129
```json
134130
{
135131
"streaming_url": "wss://api.deepl.com/v1/voice/realtime/connect",
136-
"token": "VGhpcyBpcyBhIGZha2UgdG9rZW4K",
132+
"token": <secure access token>,
137133
}
138134
```
139135

@@ -148,10 +144,7 @@ The Voice API uses a two-step flow to initiate streaming.
148144
See the [Request Stream](/api-reference/voice/request-stream) documentation for details.
149145
</Step>
150146
<Step title="Streaming Audio and Text (WebSocket)">
151-
Use the received URL to establish a WebSocket connection:
152-
```http
153-
CONNECT wss://api.deepl.com/v1/voice/realtime/connect?token=VGhpcyBpcyBhIGZha2UgdG9rZW4K
154-
```
147+
Use the received URL to establish a WebSocket connection to `wss://api.deepl.com/v1/voice/realtime/connect?token=<secure access token>`.
155148
This step handles exchanging JSON messages on the WebSocket connection:
156149
* Sending audio data
157150
* Receiving transcriptions and translations in real-time

0 commit comments

Comments
 (0)