Skip to content

Real Time transcription of Twilio call: transaction_key":"deprecated" #157

Closed Answered by nikolawhallon
Henzelix asked this question in General help
Discussion options

You must be logged in to vote

While the above advice is reasonable, I think it may not be the core issue - I tried out snippets of the code, and the websocket-client library is doing something interesting here.

the line:

webs.send(payload)

will send the payload as a text websocket message. When I use it to send some audio to Deepgram, it prints in my terminal something like:

++Sent raw: b'\x81\xfe\x03\xe8)t\x0f....'
++Sent decoded: fin=1 opcode=1 data=b'RIFFF\xc4\t\x00WAVEfmt \x10\x00\x00\x00....'

it is sending the binary as text (opcode=1) (also one can see that I'm sending a containerized WAV file in this example...)
If I instead do:

webs.send(payload, websocket.ABNF.OPCODE_BINARY)

I get the following output:

++S…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@nikolawhallon
Comment options

@nikolawhallon
Comment options

Answer selected by Henzelix
@Henzelix
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants