Skip to content

Commit ffcc357

Browse files
committed
Support sample_rate and opus_bitrate
1 parent 295f34d commit ffcc357

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/fish_audio_sdk/schemas.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import decimal
33
from typing import Annotated, Generic, Literal, TypeVar
44

5-
from pydantic import BaseModel, Field, conint
5+
from pydantic import BaseModel, Field
66

77
Item = TypeVar("Item")
88

@@ -24,9 +24,11 @@ class Prosody(BaseModel):
2424

2525
class TTSRequest(BaseModel):
2626
text: str
27-
chunk_length: Annotated[int, conint(ge=100, le=300, strict=True)] = 200
27+
chunk_length: Annotated[int, Field(ge=100, le=300, strict=True)] = 200
2828
format: Literal["wav", "pcm", "mp3"] = "mp3"
29+
sample_rate: int | None = None
2930
mp3_bitrate: Literal[64, 128, 192] = 128
31+
opus_bitrate: Literal[-1000, 24, 32, 48, 64] = 32
3032
references: list[ReferenceAudio] = []
3133
reference_id: str | None = None
3234
normalize: bool = True

0 commit comments

Comments
 (0)