Numerals

Learn about Deepgram's numerals feature, which converts numbers from written format to numerical format.

❗️

Deprecated

This feature is deprecated. Please use Smart Formatting instead.

Deepgram’s Numerals feature converts numbers from written format to numerical format. For example, the number "nine hundred" would appear in your transcript as "900".

⚠️

This feature is available for English only (all available regions).

Use Cases

Some examples of use cases for numerals include:

  • Customers who handle long strings of numbers, such as product numbers or account numbers.
  • Customers who want general customer information, such as addresses and phone numbers, and dates to show up in a more readable format in transcripts.

ℹ️

When punctuation is enabled, converted numbers do not include it. For example, 999,999 will always be transcribed as 999999.

Enable Feature

To enable numerals, when you call Deepgram’s API, add a numerals parameter set to true in the query string:

numerals=true

To transcribe audio from a file on your computer, run the following cURL command in a terminal or your favorite API client.

ℹ️

Be sure to replace the placeholder YOUR_DEEPGRAM_API_KEY with your Deepgram API Key. You can create an API Key in the Deepgram Console.

curl \
  --request POST \
  --header 'Authorization: Token YOUR_DEEPGRAM_API_KEY' \
  --header 'Content-Type: audio/wav' \
  --data-binary @youraudio.wav \
  --url 'https://api.deepgram.com/v1/listen?numerals=true'

Toggling Numerals during a real-time stream

In addition to the query string parameter, if you're sending real-time streaming data, you can turn Numerals on or off at any point during the stream. To do so, send the following JSON message to the websocket:

{
  "type": "Configure",
  "features": {
    "numerals": true (or false)
  }
}

Numerals can be turned on and off multiple times during a stream if desired.

Results

Once applied, results will appear in the transcript.

TruthBefore numeralsAfter numerals
My account number is nine two eight four seven three seven three nine two three sevenMy account number is nine two eight four seven three seven three nine two three sevenMy account number is 9 2 8 4 7 3 7 3 9 2 3 7


TruthBefore numeralsAfter numerals
My customer ID code is five one y w capital k capital p capital o six four one five lowercase d as in dog capital q lowercase p capital l z lowercase a m and then twenty threeMy customer ID code is five one y w capital k capital p capital o six four one five lowercase d as in dog capital q lowercase p capital l z lowercase a m and then twenty threeMy customer ID code is 5 1 y w capital k capital p capital o 6 4 1 5 lowercase d as in dog capital q lowercase p capital l z lowercase a m and then 23


TruthBefore numeralsAfter numerals
My phone number is five five five two one two four three nine four and I live at five five five main street new york new york one zero zero zero fiveMy phone number is five five five two one two four three nine four and I live at five five five main street new york new york one zero zero zero fiveMy phone number is 5 5 5 2 1 2 4 3 9 4 and I live at 5 5 5 main street new york new york 1 0 0 0 5

ℹ️

By default, Deepgram applies its general AI model, which is a good, general purpose model for everyday situations. To learn more about the customization possible with Deepgram's API, check out the Deepgram API Reference.