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
1 change: 1 addition & 0 deletions examples/Dockerfile-example
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ RUN apt-get update && \
gcc \
g++ \
python3-dev \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*

USER appuser
Expand Down
8 changes: 8 additions & 0 deletions livekit-agents/livekit/agents/inference/tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,14 @@ async def _sentence_stream_task(ws: aiohttp.ClientWebSocketResponse) -> None:
async for ev in sent_tokenizer_stream:
token_pkt = base_pkt.copy()
token_pkt["transcript"] = ev.token + " "
generation_config: dict[str, Any] = {}
if self._opts.voice:
generation_config["voice"] = self._opts.voice
if self._opts.model:
generation_config["model"] = self._opts.model
if self._opts.language:
generation_config["language"] = self._opts.language
token_pkt["generation_config"] = generation_config
token_pkt["extra"] = self._opts.extra_kwargs if self._opts.extra_kwargs else {}
self._mark_started()
await ws.send_str(json.dumps(token_pkt))
Expand Down
2 changes: 1 addition & 1 deletion livekit-agents/livekit/agents/ipc/mock_room.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def create_mock_room() -> Any:
MockRoom.local_participant = create_autospec(rtc.LocalParticipant, instance=True)
MockRoom._info = create_autospec(rtc.room.proto_room.RoomInfo, instance=True) # type: ignore
MockRoom.isconnected.return_value = True
MockRoom.name = "mock_room"
MockRoom.name = "console"
MockRoom.metadata = ""
MockRoom.num_participants = 2
MockRoom.num_publishers = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def __init__(

@property
def model(self) -> str:
return "Universal-Streaming"
return self._opts.speech_model

@property
def provider(self) -> str:
Expand Down
Loading