Skip to content

Commit

Permalink
Merge pull request #639 from pipecat-ai/aleix/daily-transcription-model
Browse files Browse the repository at this point in the history
transport(daily): use "nova-2-general" for transcription
  • Loading branch information
aconchillo authored Oct 22, 2024
2 parents e556f34 + 951255d commit 61d73f8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

- Changed `DailyTransport` transcription model to `nova-2-general`.

### Fixed

- Fixed `enable_usage_metrics` to control LLM/TTS usage metrics separately
Expand All @@ -36,6 +38,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Changed `DeepgramSTTService` model to `nova-2-general`.

- Moved `SileroVAD` audio processor to `processors.audio.vad`.

- Module `utils.audio` is now `audio.utils`. A new `resample_audio` function has
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ classifiers = [
]
dependencies = [
"aiohttp~=3.10.3",
"loguru~=0.7.2",
"Markdown~=3.7",
"numpy~=1.26.4",
"loguru~=0.7.2",
"Pillow~=10.4.0",
"protobuf~=4.25.4",
"pydantic~=2.8.2",
Expand Down
15 changes: 12 additions & 3 deletions src/pipecat/transports/services/daily.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import asyncio
import time
import warnings
from concurrent.futures import ThreadPoolExecutor
from dataclasses import dataclass
from typing import Any, Awaitable, Callable, Mapping, Optional
Expand All @@ -20,7 +21,7 @@
VirtualSpeakerDevice,
)
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.frames.frames import (
Expand Down Expand Up @@ -93,15 +94,23 @@ class DailyDialinSettings(BaseModel):

class DailyTranscriptionSettings(BaseModel):
language: str = "en"
tier: str = "nova"
model: str = "2-conversationalai"
tier: Optional[str] = None
model: str = "nova-2-general"
profanity_filter: bool = True
redact: bool = False
endpointing: bool = True
punctuate: bool = True
includeRawResponse: bool = 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):
api_url: str = "https://api.daily.co/v1"
Expand Down

0 comments on commit 61d73f8

Please sign in to comment.