Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19,277 changes: 2,442 additions & 16,835 deletions .fern/replay.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class StartAgentsRequestPropertiesAvatar(UncheckedBaseModel):
- `liveavatar`: LiveAvatar (Beta)
- `anam`: Anam (Beta)
- `generic`: Generic (Beta)
- `sensetime`: SenseTime Avatar
"""

params: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
import typing

StartAgentsRequestPropertiesAvatarVendor = typing.Union[
typing.Literal["akool", "liveavatar", "anam", "generic", "heygen"], typing.Any
typing.Literal["akool", "liveavatar", "anam", "generic", "sensetime", "heygen"], typing.Any
]
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2
from ...core.unchecked_base_model import UncheckedBaseModel
from ...types.asr_language import AsrLanguage
from .start_agents_request_properties_turn_detection_config import StartAgentsRequestPropertiesTurnDetectionConfig
from .start_agents_request_properties_turn_detection_eagerness import StartAgentsRequestPropertiesTurnDetectionEagerness
from .start_agents_request_properties_turn_detection_interrupt_mode import (
Expand All @@ -19,11 +18,6 @@ class StartAgentsRequestPropertiesTurnDetection(UncheckedBaseModel):
Conversation turn detection settings. Controls the logic for voice activity detection and conversation turn determination. This object has no effect when `mllm.enable` is true; use `mllm.turn_detection` instead.
"""

language: typing.Optional[AsrLanguage] = pydantic.Field(default=None)
"""
BCP-47 language tag identifying the primary language used for agent interaction.
"""

mode: typing.Optional[typing.Literal["default"]] = pydantic.Field(default=None)
"""
Conversation turn detection mode:
Expand Down
4 changes: 2 additions & 2 deletions src/agora_agent/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ def __init__(

def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"User-Agent": "agora-agents/v2.2.0",
"User-Agent": "agora-agents/v2.2.1",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "agora-agents",
"X-Fern-SDK-Version": "v2.2.0",
"X-Fern-SDK-Version": "v2.2.1",
**(self.get_custom_headers() or {}),
}
headers["Authorization"] = httpx.BasicAuth(self._get_username(), self._get_password())._auth_header
Expand Down
84 changes: 84 additions & 0 deletions src/agora_agent/types/asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
from .open_ai_asr_params import OpenAiAsrParams
from .sarvam_asr_params import SarvamAsrParams
from .speechmatics_asr_params import SpeechmaticsAsrParams
from .tencent_asr_params import TencentAsrParams
from .xfyun_asr_params import XfyunAsrParams
from .xfyun_bigmodel_asr_params import XfyunBigmodelAsrParams
from .xfyun_dialect_asr_params import XfyunDialectAsrParams


class Asr_Ares(UncheckedBaseModel):
Expand All @@ -35,6 +39,36 @@ class Config:
extra = pydantic.Extra.allow


class Asr_Fengming(UncheckedBaseModel):
vendor: typing.Literal["fengming"] = "fengming"
language: typing.Optional[AsrLanguage] = None
params: typing.Optional[typing.Dict[str, typing.Any]] = None

if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:

class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow


class Asr_Tencent(UncheckedBaseModel):
vendor: typing.Literal["tencent"] = "tencent"
language: typing.Optional[AsrLanguage] = None
params: TencentAsrParams

if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:

class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow


class Asr_Microsoft(UncheckedBaseModel):
vendor: typing.Literal["microsoft"] = "microsoft"
language: typing.Optional[AsrLanguage] = None
Expand Down Expand Up @@ -155,9 +189,56 @@ class Config:
extra = pydantic.Extra.allow


class Asr_Xfyun(UncheckedBaseModel):
vendor: typing.Literal["xfyun"] = "xfyun"
language: typing.Optional[AsrLanguage] = None
params: XfyunAsrParams

if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:

class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow


class Asr_XfyunBigmodel(UncheckedBaseModel):
vendor: typing.Literal["xfyun_bigmodel"] = "xfyun_bigmodel"
language: typing.Optional[AsrLanguage] = None
params: XfyunBigmodelAsrParams

if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:

class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow


class Asr_XfyunDialect(UncheckedBaseModel):
vendor: typing.Literal["xfyun_dialect"] = "xfyun_dialect"
language: typing.Optional[AsrLanguage] = None
params: XfyunDialectAsrParams

if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:

class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow


Asr = typing_extensions.Annotated[
typing.Union[
Asr_Ares,
Asr_Fengming,
Asr_Tencent,
Asr_Microsoft,
Asr_Deepgram,
Asr_Openai,
Expand All @@ -166,6 +247,9 @@ class Config:
Asr_Assemblyai,
Asr_Speechmatics,
Asr_Sarvam,
Asr_Xfyun,
Asr_XfyunBigmodel,
Asr_XfyunDialect,
],
UnionMetadata(discriminant="vendor"),
]
29 changes: 29 additions & 0 deletions src/agora_agent/types/bytedance_duplex_tts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .bytedance_duplex_tts_params import BytedanceDuplexTtsParams


class BytedanceDuplexTts(UncheckedBaseModel):
"""
Bytedance duplex streaming Text-to-Speech configuration.
"""

params: BytedanceDuplexTtsParams
skip_patterns: typing.Optional[typing.List[int]] = pydantic.Field(default=None)
"""
Controls whether the TTS module skips bracketed content when reading LLM response text.
"""

if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:

class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow
37 changes: 37 additions & 0 deletions src/agora_agent/types/bytedance_duplex_tts_params.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel


class BytedanceDuplexTtsParams(UncheckedBaseModel):
"""
Bytedance duplex streaming TTS configuration parameters.
"""

app_id: str = pydantic.Field()
"""
Bytedance application ID.
"""

token: str = pydantic.Field()
"""
Bytedance API token.
"""

speaker: str = pydantic.Field()
"""
Duplex TTS speaker identifier.
"""

if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:

class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow
29 changes: 29 additions & 0 deletions src/agora_agent/types/bytedance_tts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .bytedance_tts_params import BytedanceTtsParams


class BytedanceTts(UncheckedBaseModel):
"""
Bytedance Volcano Engine Text-to-Speech configuration.
"""

params: BytedanceTtsParams
skip_patterns: typing.Optional[typing.List[int]] = pydantic.Field(default=None)
"""
Controls whether the TTS module skips bracketed content when reading LLM response text.
"""

if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:

class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow
62 changes: 62 additions & 0 deletions src/agora_agent/types/bytedance_tts_params.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel


class BytedanceTtsParams(UncheckedBaseModel):
"""
Bytedance Volcano Engine TTS configuration parameters.
"""

token: str = pydantic.Field()
"""
Bytedance API token.
"""

app_id: str = pydantic.Field()
"""
Bytedance application ID.
"""

cluster: str = pydantic.Field()
"""
Bytedance cluster name.
"""

voice_type: str = pydantic.Field()
"""
Bytedance voice type.
"""

speed_ratio: typing.Optional[float] = pydantic.Field(default=None)
"""
Speech speed ratio.
"""

volume_ratio: typing.Optional[float] = pydantic.Field(default=None)
"""
Volume ratio.
"""

pitch_ratio: typing.Optional[float] = pydantic.Field(default=None)
"""
Pitch ratio.
"""

emotion: typing.Optional[str] = pydantic.Field(default=None)
"""
Emotion preset.
"""

if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:

class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow
29 changes: 29 additions & 0 deletions src/agora_agent/types/cosyvoice_tts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .cosyvoice_tts_params import CosyvoiceTtsParams


class CosyvoiceTts(UncheckedBaseModel):
"""
Alibaba Cloud CosyVoice Text-to-Speech configuration.
"""

params: CosyvoiceTtsParams
skip_patterns: typing.Optional[typing.List[int]] = pydantic.Field(default=None)
"""
Controls whether the TTS module skips bracketed content when reading LLM response text.
"""

if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:

class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow
42 changes: 42 additions & 0 deletions src/agora_agent/types/cosyvoice_tts_params.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel


class CosyvoiceTtsParams(UncheckedBaseModel):
"""
CosyVoice TTS configuration parameters.
"""

api_key: str = pydantic.Field()
"""
CosyVoice API key.
"""

model: str = pydantic.Field()
"""
CosyVoice model identifier.
"""

sample_rate: int = pydantic.Field()
"""
Audio sample rate in Hz.
"""

voice: str = pydantic.Field()
"""
CosyVoice speaker voice.
"""

if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:

class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow
Loading
Loading