Numeric Formatting

View as MarkdownOpen in Claude
Real-Time

Numeric Formatting allows you to control how numbers, dates, and numerical values are represented in transcription output. You can choose between spelled-out numbers or numeric digits based on your application’s requirements.

Enabling Numeric Formatting

Numeric Formatting is currently only available for the Real-Time WebSocket API.

Add a numerals parameter in the query string set to true, false, or auto to control numeric formatting. The default is auto, which enables automatic detection based on context.

Real-Time WebSocket API

1const url = new URL("wss://waves-api.smallest.ai/api/v1/pulse/get_text");
2url.searchParams.append("language", "en");
3url.searchParams.append("encoding", "linear16");
4url.searchParams.append("sample_rate", "16000");
5url.searchParams.append("numerals", "true"); // or "false" or "auto"
6
7const ws = new WebSocket(url.toString(), {
8 headers: {
9 Authorization: `Bearer ${API_KEY}`,
10 },
11});

Formatting Options

numerals=true (Numeric Format)

When enabled, numbers are transcribed as digits:

  • “25” instead of “twenty-five”
  • “$1,234.56” instead of “one thousand two hundred thirty-four dollars and fifty-six cents”
  • “3:45 PM” instead of “three forty-five P M”
  • “2024” instead of “twenty twenty-four”
  • “1.5” instead of “one point five”

numerals=false (Spelled-Out Format)

When disabled, numbers are transcribed as words:

  • “twenty-five” instead of “25”
  • “one thousand two hundred thirty-four” instead of “1234”
  • “three forty-five” instead of “3:45”
  • “twenty twenty-four” instead of “2024”

numerals=auto (Automatic Detection)

When set to auto (default), the system automatically detects the appropriate format based on context. This is recommended for most use cases.

Sample Response

With numerals=true

1{
2 // other fields
3 "transcript": "The price is $25.99 and we have 42 items in stock. Call us at 555-1234.",
4 "is_final": true,
5 "is_last": false,
6 "language": "en"
7}

With numerals=false

1{
2 // other fields
3 "transcript": "The price is twenty-five dollars and ninety-nine cents and we have forty-two items in stock. Call us at five five five one two three four.",
4 "is_final": true,
5 "is_last": false,
6 "language": "en"
7}

If not specified, numerals=auto (automatic detection) is used by default.