transport(daily): use "nova-2-general" for transcription
This commit is contained in:
@@ -19,6 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
- Updated `GladiaSTTService` to use the V2 API.
|
- Updated `GladiaSTTService` to use the V2 API.
|
||||||
|
|
||||||
|
- Changed `DailyTransport` transcription model to `nova-2-general`.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fixed `enable_usage_metrics` to control LLM/TTS usage metrics separately
|
- Fixed `enable_usage_metrics` to control LLM/TTS usage metrics separately
|
||||||
@@ -36,6 +38,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
- Changed `DeepgramSTTService` model to `nova-2-general`.
|
||||||
|
|
||||||
- Moved `SileroVAD` audio processor to `processors.audio.vad`.
|
- Moved `SileroVAD` audio processor to `processors.audio.vad`.
|
||||||
|
|
||||||
- Module `utils.audio` is now `audio.utils`. A new `resample_audio` function has
|
- Module `utils.audio` is now `audio.utils`. A new `resample_audio` function has
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ classifiers = [
|
|||||||
]
|
]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aiohttp~=3.10.3",
|
"aiohttp~=3.10.3",
|
||||||
|
"loguru~=0.7.2",
|
||||||
"Markdown~=3.7",
|
"Markdown~=3.7",
|
||||||
"numpy~=1.26.4",
|
"numpy~=1.26.4",
|
||||||
"loguru~=0.7.2",
|
|
||||||
"Pillow~=10.4.0",
|
"Pillow~=10.4.0",
|
||||||
"protobuf~=4.25.4",
|
"protobuf~=4.25.4",
|
||||||
"pydantic~=2.8.2",
|
"pydantic~=2.8.2",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
import time
|
import time
|
||||||
|
import warnings
|
||||||
from concurrent.futures import ThreadPoolExecutor
|
from concurrent.futures import ThreadPoolExecutor
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import Any, Awaitable, Callable, Mapping, Optional
|
from typing import Any, Awaitable, Callable, Mapping, Optional
|
||||||
@@ -20,7 +21,7 @@ from daily import (
|
|||||||
VirtualSpeakerDevice,
|
VirtualSpeakerDevice,
|
||||||
)
|
)
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
from pydantic.main import BaseModel
|
from pydantic import BaseModel, model_validator
|
||||||
|
|
||||||
from pipecat.audio.vad.vad_analyzer import VADAnalyzer, VADParams
|
from pipecat.audio.vad.vad_analyzer import VADAnalyzer, VADParams
|
||||||
from pipecat.frames.frames import (
|
from pipecat.frames.frames import (
|
||||||
@@ -93,8 +94,8 @@ class DailyDialinSettings(BaseModel):
|
|||||||
|
|
||||||
class DailyTranscriptionSettings(BaseModel):
|
class DailyTranscriptionSettings(BaseModel):
|
||||||
language: str = "en"
|
language: str = "en"
|
||||||
tier: str = "nova"
|
tier: Optional[str] = None
|
||||||
model: str = "2-conversationalai"
|
model: str = "nova-2-general"
|
||||||
profanity_filter: bool = True
|
profanity_filter: bool = True
|
||||||
redact: bool = False
|
redact: bool = False
|
||||||
endpointing: bool = True
|
endpointing: bool = True
|
||||||
@@ -102,6 +103,14 @@ class DailyTranscriptionSettings(BaseModel):
|
|||||||
includeRawResponse: bool = True
|
includeRawResponse: bool = True
|
||||||
extra: Mapping[str, Any] = {"interim_results": True}
|
extra: Mapping[str, Any] = {"interim_results": True}
|
||||||
|
|
||||||
|
@model_validator(mode="before")
|
||||||
|
def check_deprecated_fields(cls, values):
|
||||||
|
with warnings.catch_warnings():
|
||||||
|
warnings.simplefilter("always")
|
||||||
|
if "tier" in values:
|
||||||
|
warnings.warn("'tier' is deprecated, use 'model' instead", DeprecationWarning)
|
||||||
|
return values
|
||||||
|
|
||||||
|
|
||||||
class DailyParams(TransportParams):
|
class DailyParams(TransportParams):
|
||||||
api_url: str = "https://api.daily.co/v1"
|
api_url: str = "https://api.daily.co/v1"
|
||||||
|
|||||||
Reference in New Issue
Block a user