Skip to content
Open
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
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ name = "pipecat-examples"
version = "0.0.0"
description = "Examples for Pipecat AI framework"
requires-python = ">=3.10"
dependencies = []
dependencies = [
"loguru>=0.7.3",
"pillow>=11.3.0",
]

[dependency-groups]
dev = [
Expand Down
2 changes: 2 additions & 0 deletions simple-chatbot/client/react/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { PipecatProvider } from "./providers/PipecatProvider";
import { ConnectButton } from "./components/ConnectButton";
import { StatusDisplay } from "./components/StatusDisplay";
import { DebugDisplay } from "./components/DebugDisplay";
import { MicrophoneSelector } from "./components/MicrophoneSelector";
import "./App.css";

function BotVideo() {
Expand All @@ -27,6 +28,7 @@ function AppContent() {
<div className="app">
<div className="status-bar">
<StatusDisplay />
<MicrophoneSelector />
<ConnectButton />
</div>

Expand Down
27 changes: 27 additions & 0 deletions simple-chatbot/client/react/src/components/MicrophoneSelector.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { usePipecatClientMediaDevices } from "@pipecat-ai/client-react";

export function MicrophoneSelector() {
const { availableMics, selectedMic, updateMic } =
usePipecatClientMediaDevices();

if (!availableMics || availableMics.length === 0) {
return null;
}

return (
<div className="microphone-selector">
<label htmlFor="mic-select">Microphone: </label>
<select
id="mic-select"
onChange={(ev) => updateMic(ev.target.value)}
value={selectedMic?.deviceId || ""}
>
{availableMics.map((mic) => (
<option key={mic.deviceId} value={mic.deviceId}>
{mic.label || `Microphone ${mic.deviceId.substring(0, 8)}`}
</option>
))}
</select>
</div>
);
}
19 changes: 19 additions & 0 deletions simple-chatbot/server/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[project]
name = "simple-chatbot"
version = "0.1.0"
description = "Simple chatbot example"
requires-python = ">=3.10"
dependencies = [
"pipecat-ai[daily,deepgram,openai,google,silero,cartesia,runner,webrtc]>=0.0.82",
"pipecatcloud>=0.2.4"
]

[dependency-groups]
dev = [
"ruff~=0.12.1",
]

[tool.ruff]
line-length = 100
[tool.ruff.lint]
select = ["I"]