mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-05 07:37:50 +00:00
chore(cost-map): add Deepgram Aura-2 and Aura-1 text-to-speech rates
Deepgram bills streaming text-to-speech per input character, at $0.030 per 1k characters for Aura-2 voices and $0.0150 per 1k for Aura-1 voices on pay as you go (https://deepgram.com/pricing). One row per voice family keeps the map small, since every voice in a family costs the same The upcoming /deepgram/v1/speak WebSocket passthrough prices sessions from these rows and refuses voices that have none Refs LIT-10070
This commit is contained in:
parent
ddb8a14ee9
commit
763cb04df2
4 changed files with 73 additions and 0 deletions
|
|
@ -22775,6 +22775,32 @@
|
|||
"output_cost_per_token_batches": 1e-06,
|
||||
"source": "https://developers.openai.com/api/docs/pricing"
|
||||
},
|
||||
"deepgram/aura": {
|
||||
"input_cost_per_character": 1.5e-05,
|
||||
"litellm_provider": "deepgram",
|
||||
"metadata": {
|
||||
"calculation": "$0.0150/1000 characters = $0.000015 per character",
|
||||
"note": "Aura-1 text-to-speech voices (aura-<voice>-<lang>), pay as you go"
|
||||
},
|
||||
"mode": "audio_speech",
|
||||
"source": "https://deepgram.com/pricing",
|
||||
"supported_endpoints": [
|
||||
"/v1/speak"
|
||||
]
|
||||
},
|
||||
"deepgram/aura-2": {
|
||||
"input_cost_per_character": 3e-05,
|
||||
"litellm_provider": "deepgram",
|
||||
"metadata": {
|
||||
"calculation": "$0.030/1000 characters = $0.00003 per character",
|
||||
"note": "Aura-2 text-to-speech voices (aura-2-<voice>-<lang>), pay as you go"
|
||||
},
|
||||
"mode": "audio_speech",
|
||||
"source": "https://deepgram.com/pricing",
|
||||
"supported_endpoints": [
|
||||
"/v1/speak"
|
||||
]
|
||||
},
|
||||
"deepgram/base": {
|
||||
"input_cost_per_second": 0.00020833,
|
||||
"litellm_provider": "deepgram",
|
||||
|
|
|
|||
|
|
@ -22775,6 +22775,32 @@
|
|||
"output_cost_per_token_batches": 1e-06,
|
||||
"source": "https://developers.openai.com/api/docs/pricing"
|
||||
},
|
||||
"deepgram/aura": {
|
||||
"input_cost_per_character": 1.5e-05,
|
||||
"litellm_provider": "deepgram",
|
||||
"metadata": {
|
||||
"calculation": "$0.0150/1000 characters = $0.000015 per character",
|
||||
"note": "Aura-1 text-to-speech voices (aura-<voice>-<lang>), pay as you go"
|
||||
},
|
||||
"mode": "audio_speech",
|
||||
"source": "https://deepgram.com/pricing",
|
||||
"supported_endpoints": [
|
||||
"/v1/speak"
|
||||
]
|
||||
},
|
||||
"deepgram/aura-2": {
|
||||
"input_cost_per_character": 3e-05,
|
||||
"litellm_provider": "deepgram",
|
||||
"metadata": {
|
||||
"calculation": "$0.030/1000 characters = $0.00003 per character",
|
||||
"note": "Aura-2 text-to-speech voices (aura-2-<voice>-<lang>), pay as you go"
|
||||
},
|
||||
"mode": "audio_speech",
|
||||
"source": "https://deepgram.com/pricing",
|
||||
"supported_endpoints": [
|
||||
"/v1/speak"
|
||||
]
|
||||
},
|
||||
"deepgram/base": {
|
||||
"input_cost_per_second": 0.00020833,
|
||||
"litellm_provider": "deepgram",
|
||||
|
|
|
|||
|
|
@ -324,3 +324,23 @@ def test_deepgram_listen_is_priced(
|
|||
)
|
||||
def test_deepgram_listen_addon_pricing_models(upstream_url: str, expected: tuple[str, ...]):
|
||||
assert deepgram_listen_addon_pricing_models(upstream_url) == expected
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("local_model_cost_map")
|
||||
@pytest.mark.parametrize(
|
||||
("pricing_model", "usd_per_thousand_characters"),
|
||||
[
|
||||
pytest.param("aura-2", 0.030, id="aura-2"),
|
||||
pytest.param("aura", 0.015, id="aura-1"),
|
||||
],
|
||||
)
|
||||
def test_aura_rows_bill_speech_per_character_at_the_published_rate(
|
||||
pricing_model: str, usd_per_thousand_characters: float
|
||||
):
|
||||
"""Pay as you go rates from https://deepgram.com/pricing, checked 2026-10-26"""
|
||||
prompt_cost, completion_cost = litellm.cost_per_token(
|
||||
model=pricing_model, custom_llm_provider="deepgram", call_type="speech", prompt_characters=1000
|
||||
)
|
||||
|
||||
assert prompt_cost == pytest.approx(usd_per_thousand_characters)
|
||||
assert completion_cost == 0.0
|
||||
|
|
|
|||
|
|
@ -1252,6 +1252,7 @@ _COST_MAP_ROW_SCHEMA: Final = {
|
|||
"/v1/videos",
|
||||
"/vertex_ai/live",
|
||||
"/v1/listen",
|
||||
"/v1/speak",
|
||||
"/v1/systemone",
|
||||
"/v1/decisions",
|
||||
"/v1beta/interactions",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue