mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-16 08:25:18 +02:00
feat: add gladia stt support
This commit is contained in:
parent
03df5595c3
commit
c4c4b591db
3 changed files with 141 additions and 0 deletions
|
|
@ -24,6 +24,7 @@ from pipecat.services.dograh.llm import DograhLLMService
|
|||
from pipecat.services.dograh.stt import DograhSTTService, DograhSTTSettings
|
||||
from pipecat.services.dograh.tts import DograhTTSService, DograhTTSSettings
|
||||
from pipecat.services.elevenlabs.tts import ElevenLabsTTSService, ElevenLabsTTSSettings
|
||||
from pipecat.services.gladia.stt import GladiaSTTService, GladiaSTTSettings
|
||||
from pipecat.services.google.llm import GoogleLLMService, GoogleLLMSettings
|
||||
from pipecat.services.groq.llm import GroqLLMService, GroqLLMSettings
|
||||
from pipecat.services.openai.base_llm import OpenAILLMSettings
|
||||
|
|
@ -167,6 +168,21 @@ def create_stt_service(
|
|||
settings=AssemblyAISTTSettings(**settings_kwargs),
|
||||
sample_rate=audio_config.transport_in_sample_rate,
|
||||
)
|
||||
elif user_config.stt.provider == ServiceProviders.GLADIA.value:
|
||||
from pipecat.services.gladia.config import LanguageConfig
|
||||
|
||||
language = getattr(user_config.stt, "language", None) or "en"
|
||||
settings_kwargs = {
|
||||
"model": user_config.stt.model,
|
||||
"language_config": LanguageConfig(
|
||||
languages=[language], code_switching=False
|
||||
),
|
||||
}
|
||||
return GladiaSTTService(
|
||||
api_key=user_config.stt.api_key,
|
||||
settings=GladiaSTTSettings(**settings_kwargs),
|
||||
sample_rate=audio_config.transport_in_sample_rate,
|
||||
)
|
||||
elif user_config.stt.provider == ServiceProviders.SPEECHMATICS.value:
|
||||
from pipecat.services.speechmatics.stt import (
|
||||
AdditionalVocabEntry,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue