BACK TO CHANGELOG

Configure Numeral Formatting in Real Time

BY Shir Goldberg  | October 27 2022

Deepgram’s real-time API has been updated for enhanced usability.

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.

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": True
    }
}))

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!

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: [email protected]