mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-07 07:55:16 +02:00
feat: add voices in Dograh configuration
This commit is contained in:
parent
3b614b8b82
commit
c58aa557de
2 changed files with 38 additions and 0 deletions
|
|
@ -368,6 +368,39 @@ class OpenAISTTConfiguration(BaseSTTConfiguration):
|
|||
|
||||
# Dograh STT Service
|
||||
DOGRAH_STT_MODELS = ["default"]
|
||||
DOGRAH_STT_LANGUAGES = [
|
||||
"multi",
|
||||
"en",
|
||||
"en-US",
|
||||
"en-GB",
|
||||
"en-AU",
|
||||
"en-IN",
|
||||
"es",
|
||||
"es-419",
|
||||
"fr",
|
||||
"fr-CA",
|
||||
"de",
|
||||
"it",
|
||||
"pt",
|
||||
"pt-BR",
|
||||
"nl",
|
||||
"hi",
|
||||
"ja",
|
||||
"ko",
|
||||
"zh-CN",
|
||||
"zh-TW",
|
||||
"ru",
|
||||
"pl",
|
||||
"tr",
|
||||
"uk",
|
||||
"vi",
|
||||
"sv",
|
||||
"da",
|
||||
"no",
|
||||
"fi",
|
||||
"id",
|
||||
"th",
|
||||
]
|
||||
|
||||
|
||||
@register_stt
|
||||
|
|
@ -376,6 +409,9 @@ class DograhSTTService(BaseSTTConfiguration):
|
|||
model: str = Field(
|
||||
default="default", json_schema_extra={"examples": DOGRAH_STT_MODELS}
|
||||
)
|
||||
language: str = Field(
|
||||
default="multi", json_schema_extra={"examples": DOGRAH_STT_LANGUAGES}
|
||||
)
|
||||
api_key: str
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -54,10 +54,12 @@ def create_stt_service(user_config):
|
|||
return CartesiaSTTService(api_key=user_config.stt.api_key)
|
||||
elif user_config.stt.provider == ServiceProviders.DOGRAH.value:
|
||||
base_url = MPS_API_URL.replace("http://", "ws://").replace("https://", "wss://")
|
||||
language = getattr(user_config.stt, "language", None) or "multi"
|
||||
return DograhSTTService(
|
||||
base_url=base_url,
|
||||
api_key=user_config.stt.api_key,
|
||||
model=user_config.stt.model,
|
||||
language=language,
|
||||
)
|
||||
elif user_config.stt.provider == ServiceProviders.SARVAM.value:
|
||||
# Map Sarvam language code to pipecat Language enum
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue