Enable Numeral Formatting in Real-Time
in Product News
October 27, 2022Here at Deepgram, we’re making our real-time streaming API as dynamic as our customers’ needs.
In addition to enabling numeral formatting at the start of a stream via query parameter, numeral formatting can now be turned on and off at any point in an audio stream by sending a JSON Configure
message.
Want to give this a try? Here’s a script that transcribes audio from your microphone using DG. If you say “turn numerals on” or “turn numerals off”, numeral formatting will be enabled or disabled. Try saying a string of numbers to see the difference.
Here’s an example of sending a configuration message in Javascript:
socket.send(JSON.stringify({
"type": "Configure",
"features": {
"numerals": false
}
}))
And an example in Python:
await ws.send(json.dumps({
"type": "Configure",
"features": {
"numerals": False
}
}))
To enable numeral formatting, specify numerals: true
; to disable it, specify numerals: false
. As many configuration messages can be sent as desired during the stream.
Currently, numerals is the only feature that can be turned on and off mid-stream, but we're excited to continue adding greater flexibility to our real-time API. Stay tuned for more soon.
Hi, I'm Shir! I'm the product manager for Deepgram's real-time transcription API. If you have any feedback about this change, or anything else in our product, I'd love to hear about it. Drop me an email: shir.goldberg@deepgram.com.
If you have any feedback about this post, or anything else around Deepgram, we'd love to hear from you. Please let us know in our GitHub discussions .
More with these tags:
Share your feedback
Was this article useful or interesting to you?
Thank you!
We appreciate your response.