Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion livekit-plugins/livekit-plugins-phonic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ Set the `PHONIC_API_KEY` environment variable, or pass `api_key` directly to `Re
| `welcome_message` | `str` | Message the agent says when the conversation starts. Ignored when `generate_welcome_message` is True |
| `generate_welcome_message` | `bool` | Auto-generate the welcome message (ignores `welcome_message`) |
| `project` | `str` | Project name (default: `main`) |
| `languages` | `list[str]` | ISO 639-1 language codes the agent should recognize and speak |
| `default_language` | `str` | ISO 639-1 default language for recognition and speech |
| `additional_languages` | `list[str]` | Further ISO 639-1 codes (must not repeat `default_language`) |
| `multilingual_mode` | `"auto"` \| `"request"` | Per-utterance language detection vs. change on user request (recommended: `request`) |
| `audio_speed` | `float` | Audio playback speed |
| `phonic_tools` | `list[str]` | [Phonic Webhook tool](https://docs.phonic.co/docs/using-tools/tools_overview#webhook-tools) names available to the assistant |
| `boosted_keywords` | `list[str]` | Keywords to boost in speech recognition |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ class _RealtimeOptions:
welcome_message: NotGivenOr[str | None]
generate_welcome_message: NotGivenOr[bool | None]
project: NotGivenOr[str | None]
languages: NotGivenOr[list[str]]
default_language: NotGivenOr[str]
additional_languages: NotGivenOr[list[str]]
multilingual_mode: NotGivenOr[Literal["auto", "request"]]
audio_speed: NotGivenOr[float]
phonic_tools: NotGivenOr[list[str]]
boosted_keywords: NotGivenOr[list[str]]
Expand Down Expand Up @@ -100,7 +102,9 @@ def __init__(
welcome_message: NotGivenOr[str | None] = NOT_GIVEN,
generate_welcome_message: NotGivenOr[bool] = NOT_GIVEN,
project: NotGivenOr[str | None] = NOT_GIVEN,
languages: NotGivenOr[list[str]] = NOT_GIVEN,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question re: backwards compatibility on patch versions

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, let me update that.

default_language: NotGivenOr[str] = NOT_GIVEN,
additional_languages: NotGivenOr[list[str]] = NOT_GIVEN,
multilingual_mode: NotGivenOr[Literal["auto", "request"]] = NOT_GIVEN,
audio_speed: NotGivenOr[float] = NOT_GIVEN,
phonic_tools: NotGivenOr[list[str]] = NOT_GIVEN,
boosted_keywords: NotGivenOr[list[str]] = NOT_GIVEN,
Expand All @@ -123,7 +127,11 @@ def __init__(
generate_welcome_message: When True, the welcome message is automatically generated
and ``welcome_message`` is ignored.
project: Project name to use for the conversation.
languages: ISO 639-1 language codes the agent should recognize and speak.
default_language: ISO 639-1 default language for recognition and speech.
additional_languages: Further ISO 639-1 codes the agent may use (must not include
``default_language``).
multilingual_mode: ``\"auto\"`` to detect language per utterance, ``\"request\"`` to
switch only when the user asks (recommended).
audio_speed: Audio playback speed multiplier.
phonic_tools: Phonic tool names available to the assistant.
boosted_keywords: Keywords to boost in speech recognition.
Expand Down Expand Up @@ -159,7 +167,9 @@ def __init__(
welcome_message=welcome_message,
generate_welcome_message=generate_welcome_message,
project=project,
languages=languages,
default_language=default_language,
additional_languages=additional_languages,
multilingual_mode=multilingual_mode,
audio_speed=audio_speed,
phonic_tools=phonic_tools,
boosted_keywords=boosted_keywords,
Expand Down Expand Up @@ -491,7 +501,9 @@ async def _main_task(self) -> None:
"voice_id": self._opts.voice,
"input_format": "pcm_44100",
"output_format": "pcm_44100",
"recognized_languages": self._opts.languages,
"default_language": self._opts.default_language,
"additional_languages": self._opts.additional_languages,
"multilingual_mode": self._opts.multilingual_mode,
"audio_speed": self._opts.audio_speed,
"tools": tools_payload if len(tools_payload) > 0 else NOT_GIVEN,
"boosted_keywords": self._opts.boosted_keywords,
Expand Down
2 changes: 1 addition & 1 deletion livekit-plugins/livekit-plugins-phonic/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies = [
"livekit-agents>=1.5.1",
"websockets>=11.0",
"aiohttp>=3.8.0",
"phonic>=0.31.5"
"phonic>=0.31.8"
]

[project.urls]
Expand Down
Loading