Skip to content

feat: add optional headers support to WebSocket connection#83

Open
sam-s10s wants to merge 2 commits intomainfrom
fix/websocket-headers
Open

feat: add optional headers support to WebSocket connection#83
sam-s10s wants to merge 2 commits intomainfrom
fix/websocket-headers

Conversation

@sam-s10s
Copy link
Member

@sam-s10s sam-s10s commented Feb 11, 2026

Introduce an optional ws_headers parameter to the connect method in VoiceAgentClient and the underlying AsyncClient. This allows users to pass custom headers when establishing the WebSocket connection to the Speechmatics API.

Test tests/voice/test_06_stt_config.py tests for valid and invalid ws_headers passed to the connect method.

Introduce an optional `ws_headers` parameter to the `connect` method in
`VoiceAgentClient`. This allows users to pass custom headers when
establishing the WebSocket connection to the Speechmatics API.
@LArmstrongDev
Copy link
Contributor

Looks good. Can you add a comment with the testing you've done? Thanks.

Introduce two new tests to validate header
handling in the STT client. `test_with_headers`
checks successful connection using valid headers,
while `test_with_corrupted_headers` ensures
connection failure with invalid header format.
@sam-s10s
Copy link
Member Author

sam-s10s commented Mar 3, 2026

Looks good. Can you add a comment with the testing you've done? Thanks.

@LArmstrongDev - new test has been added to include valid and invalid header testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants