mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-10 08:05:22 +02:00
parent
97fbd9b37b
commit
11e033c72d
7 changed files with 78 additions and 18 deletions
|
|
@ -10,7 +10,6 @@ from typing import Optional
|
|||
|
||||
from fastapi import APIRouter, Depends, Header, HTTPException, Request, WebSocket
|
||||
from loguru import logger
|
||||
from pipecat.utils.context import set_current_run_id
|
||||
from pydantic import BaseModel
|
||||
from sqlalchemy import text
|
||||
from sqlalchemy.future import select
|
||||
|
|
@ -37,6 +36,7 @@ from api.utils.telephony_helper import (
|
|||
parse_webhook_request,
|
||||
)
|
||||
from api.utils.tunnel import TunnelURLProvider
|
||||
from pipecat.utils.context import set_current_run_id
|
||||
|
||||
router = APIRouter(prefix="/telephony")
|
||||
|
||||
|
|
|
|||
|
|
@ -138,6 +138,6 @@ class UserConfigurationValidator:
|
|||
|
||||
def _check_sarvam_api_key(self, model: str, api_key: str) -> bool:
|
||||
return True
|
||||
|
||||
|
||||
def _check_speechmatics_api_key(self, model: str, api_key: str) -> bool:
|
||||
return True
|
||||
|
|
|
|||
|
|
@ -408,7 +408,9 @@ SPEECHMATICS_STT_LANGUAGES = [
|
|||
@register_stt
|
||||
class SpeechmaticsSTTConfiguration(BaseSTTConfiguration):
|
||||
provider: Literal[ServiceProviders.SPEECHMATICS] = ServiceProviders.SPEECHMATICS
|
||||
model: str = Field(default="enhanced", description="Operating point: standard or enhanced")
|
||||
model: str = Field(
|
||||
default="enhanced", description="Operating point: standard or enhanced"
|
||||
)
|
||||
language: str = Field(
|
||||
default="en", json_schema_extra={"examples": SPEECHMATICS_STT_LANGUAGES}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -567,7 +567,7 @@ async def _run_pipeline(
|
|||
|
||||
# Now set the task on the engine
|
||||
engine.set_task(task)
|
||||
|
||||
|
||||
# Initialize the engine to set the initial context
|
||||
await engine.initialize()
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,12 @@ Telephony helper utilities.
|
|||
Common functions used across telephony operations.
|
||||
"""
|
||||
|
||||
from dograh.api.constants import COUNTRY_CODES
|
||||
from fastapi import Request
|
||||
from loguru import logger
|
||||
from starlette.responses import HTMLResponse
|
||||
|
||||
from api.constants import COUNTRY_CODES
|
||||
|
||||
|
||||
def numbers_match(
|
||||
incoming_number: str,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue