Credit Usage Calculation

Prev Next

This article explains how Speech Recognition counts credits on a credit-based license, and how a channel-based license differs.

1. Credit-Based Licenses

The rule depends on how you connect: over HTTP (REST) or over WebSocket.

Connection What is counted Credit Consumption
HTTP (REST) Duration of the audio sent in the request 1 credit per second of audio
WebSocket Time the connection stays open 1 credit per whole second open

Cloud and on-premise deployments count credits the same way.

When Credits Are Counted?

HTTP (REST)

Each request is counted on the duration of the audio it sends.
1 credit = 1 second of audio processed.

To estimate your usage, add up the duration of the audio you send.

WebSocket

Credits are counted on the time the connection stays open, from the moment it connects until it closes. How much audio or speech you send does not change the count. Silence, idle time and any wait before the first recognition request all count.

  • You use 1 credit for each whole second the connection was open. A partial final second is not counted.
  • A connection that sends at least one recognition request uses at least 1 credit.
  • A connection that opens and closes without sending any recognition request is not charged.

For example, with per-second counting, a connection that stays open for 90.5 seconds and carries 20 seconds of speech uses 90 credits.

A connection left open keeps consuming credits

Close the connection as soon as recognition is finished. A connection left open keeps consuming credits, even when no audio is being sent.

Rounding

Depending on your license, usage can be rounded up to fixed blocks instead of being counted per second. For example, every started 15 seconds counts as one block.

2. Channel-Based Licenses

A channel-based (concurrent) license uses no credits and has no time-based charge. Each active request holds one channel, and when all channels are in use, further requests can be refused.

Connection When a channel is held
HTTP (REST) Only while the request is being processed
WebSocket From the first recognition request until the connection closes

A WebSocket connection left open keeps its channel busy, even when it is idle.