Compare commits
83 Commits
aleix/exam
...
mb/pyproje
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d80c8d19e | ||
|
|
c93f2900e8 | ||
|
|
a21a65587e | ||
|
|
a80002d3bd | ||
|
|
ac6b59cae2 | ||
|
|
12e168e740 | ||
|
|
ac354f66ed | ||
|
|
eead793927 | ||
|
|
2337a2d92d | ||
|
|
b3e2603553 | ||
|
|
29229df719 | ||
|
|
61f4dd2ff2 | ||
|
|
42094fb206 | ||
|
|
58c41f112a | ||
|
|
fa55e2ca9b | ||
|
|
313fdc92a1 | ||
|
|
d22d2da03d | ||
|
|
de2ae9a2ec | ||
|
|
52a6d8013c | ||
|
|
f14cbae9b5 | ||
|
|
8fe906438a | ||
|
|
d8f4db8827 | ||
|
|
a5ea6e1642 | ||
|
|
e777e78510 | ||
|
|
49a5a1e375 | ||
|
|
61cb45d61b | ||
|
|
6c6deb4e85 | ||
|
|
66ad29b2b1 | ||
|
|
21e4f0d56d | ||
|
|
627b44bac2 | ||
|
|
e2a576beca | ||
|
|
2981afb117 | ||
|
|
d422c57b52 | ||
|
|
06d8bbd154 | ||
|
|
35108afeb8 | ||
|
|
a0e2a2754a | ||
|
|
b8d620c8bb | ||
|
|
f26bbe4092 | ||
|
|
52cb23f8d5 | ||
|
|
17e7f8a2cd | ||
|
|
efddc4732c | ||
|
|
4476a76ad7 | ||
|
|
64592b274b | ||
|
|
95c661bdaa | ||
|
|
5546c8e01c | ||
|
|
14e02c1b08 | ||
|
|
ba5a5c7187 | ||
|
|
2378cba155 | ||
|
|
1138c92a00 | ||
|
|
fb82dc8308 | ||
|
|
c8a15f30fa | ||
|
|
72168070f1 | ||
|
|
50083d1144 | ||
|
|
64732518c6 | ||
|
|
c3d8ea210f | ||
|
|
98ed614f63 | ||
|
|
e43bdff31e | ||
|
|
42e48381fe | ||
|
|
df7ba64b4a | ||
|
|
ac9b2e67a7 | ||
|
|
c9918607cf | ||
|
|
cfda410a43 | ||
|
|
c773ddf83d | ||
|
|
54d5ebbc20 | ||
|
|
35002cd727 | ||
|
|
53d75faa47 | ||
|
|
2901dddc2b | ||
|
|
3a8d809837 | ||
|
|
1b3c2bee30 | ||
|
|
69f049cb63 | ||
|
|
f609971637 | ||
|
|
b9a2a9b729 | ||
|
|
55731df999 | ||
|
|
cc9950e72d | ||
|
|
6814c390ba | ||
|
|
c2d05ad23b | ||
|
|
91568eeddc | ||
|
|
165d6b4c1d | ||
|
|
519da9cc61 | ||
|
|
ead4e97ab5 | ||
|
|
1cbf7ae480 | ||
|
|
688031efd6 | ||
|
|
0f9e69d3c7 |
34
.github/workflows/build.yaml
vendored
34
.github/workflows/build.yaml
vendored
@@ -21,24 +21,20 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Python
|
|
||||||
id: setup_python
|
- name: Install uv
|
||||||
uses: actions/setup-python@v4
|
uses: astral-sh/setup-uv@v3
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
version: "latest"
|
||||||
- name: Setup virtual environment
|
|
||||||
run: |
|
- name: Set up Python
|
||||||
python -m venv .venv
|
run: uv python install 3.10
|
||||||
- name: Install basic Python dependencies
|
|
||||||
run: |
|
- name: Install development dependencies
|
||||||
source .venv/bin/activate
|
run: uv sync --group dev
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -r dev-requirements.txt
|
|
||||||
- name: Build project
|
- name: Build project
|
||||||
run: |
|
run: uv build
|
||||||
source .venv/bin/activate
|
|
||||||
python -m build
|
- name: Install project in editable mode
|
||||||
- name: Install project and other Python dependencies
|
run: uv pip install --editable .
|
||||||
run: |
|
|
||||||
source .venv/bin/activate
|
|
||||||
pip install --editable .
|
|
||||||
37
.github/workflows/coverage.yaml
vendored
37
.github/workflows/coverage.yaml
vendored
@@ -18,35 +18,28 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install uv
|
||||||
|
uses: astral-sh/setup-uv@v3
|
||||||
|
with:
|
||||||
|
version: "latest"
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
id: setup_python
|
run: uv python install 3.10
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: "3.10"
|
|
||||||
- name: Cache virtual environment
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
# We are hashing dev-requirements.txt and test-requirements.txt which
|
|
||||||
# contain all dependencies needed to run the tests.
|
|
||||||
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('dev-requirements.txt') }}-${{ hashFiles('test-requirements.txt') }}
|
|
||||||
path: .venv
|
|
||||||
- name: Install system packages
|
- name: Install system packages
|
||||||
id: install_system_packages
|
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install -y portaudio19-dev
|
sudo apt-get install -y portaudio19-dev
|
||||||
- name: Setup virtual environment
|
|
||||||
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m venv .venv
|
uv sync --group dev --extra anthropic --extra aws --extra google --extra langchain
|
||||||
- name: Install basic Python dependencies
|
|
||||||
run: |
|
|
||||||
source .venv/bin/activate
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -r dev-requirements.txt -r test-requirements.txt
|
|
||||||
- name: Run tests with coverage
|
- name: Run tests with coverage
|
||||||
run: |
|
run: |
|
||||||
source .venv/bin/activate
|
uv run coverage run
|
||||||
coverage run
|
uv run coverage xml
|
||||||
coverage xml
|
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
uses: codecov/codecov-action@v5
|
uses: codecov/codecov-action@v5
|
||||||
with:
|
with:
|
||||||
|
|||||||
31
.github/workflows/format.yaml
vendored
31
.github/workflows/format.yaml
vendored
@@ -22,25 +22,22 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
- name: Install uv
|
||||||
|
uses: astral-sh/setup-uv@v3
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
version: "latest"
|
||||||
- name: Setup virtual environment
|
|
||||||
run: |
|
- name: Set up Python
|
||||||
python -m venv .venv
|
run: uv python install 3.10
|
||||||
- name: Install development Python dependencies
|
|
||||||
run: |
|
- name: Install development dependencies
|
||||||
source .venv/bin/activate
|
run: uv sync --group dev
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -r dev-requirements.txt
|
|
||||||
- name: Ruff formatter
|
- name: Ruff formatter
|
||||||
id: ruff-format
|
id: ruff-format
|
||||||
run: |
|
run: uv run ruff format --diff
|
||||||
source .venv/bin/activate
|
|
||||||
ruff format --diff
|
|
||||||
- name: Ruff linter (all rules)
|
- name: Ruff linter (all rules)
|
||||||
id: ruff-check
|
id: ruff-check
|
||||||
run: |
|
run: uv run ruff check
|
||||||
source .venv/bin/activate
|
|
||||||
ruff check
|
|
||||||
24
.github/workflows/publish.yaml
vendored
24
.github/workflows/publish.yaml
vendored
@@ -17,23 +17,17 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.inputs.gitref }}
|
ref: ${{ github.event.inputs.gitref }}
|
||||||
- name: Set up Python
|
|
||||||
id: setup_python
|
- name: Install uv
|
||||||
uses: actions/setup-python@v4
|
uses: astral-sh/setup-uv@v3
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
version: "latest"
|
||||||
- name: Setup virtual environment
|
- name: Set up Python
|
||||||
run: |
|
run: uv python install 3.10
|
||||||
python -m venv .venv
|
- name: Install development dependencies
|
||||||
- name: Install basic Python dependencies
|
run: uv sync --group dev
|
||||||
run: |
|
|
||||||
source .venv/bin/activate
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -r dev-requirements.txt
|
|
||||||
- name: Build project
|
- name: Build project
|
||||||
run: |
|
run: uv build
|
||||||
source .venv/bin/activate
|
|
||||||
python -m build
|
|
||||||
- name: Upload wheels
|
- name: Upload wheels
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
25
.github/workflows/publish_test.yaml
vendored
25
.github/workflows/publish_test.yaml
vendored
@@ -12,23 +12,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-tags: true
|
fetch-tags: true
|
||||||
fetch-depth: 100
|
fetch-depth: 100
|
||||||
- name: Set up Python
|
- name: Install uv
|
||||||
id: setup_python
|
uses: astral-sh/setup-uv@v3
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
version: "latest"
|
||||||
- name: Setup virtual environment
|
- name: Set up Python
|
||||||
run: |
|
run: uv python install 3.10
|
||||||
python -m venv .venv
|
- name: Install development dependencies
|
||||||
- name: Install basic Python dependencies
|
run: uv sync --group dev
|
||||||
run: |
|
|
||||||
source .venv/bin/activate
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -r dev-requirements.txt
|
|
||||||
- name: Build project
|
- name: Build project
|
||||||
run: |
|
run: uv build
|
||||||
source .venv/bin/activate
|
|
||||||
python -m build
|
|
||||||
- name: Upload wheels
|
- name: Upload wheels
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -38,7 +31,7 @@ jobs:
|
|||||||
publish-to-test-pypi:
|
publish-to-test-pypi:
|
||||||
name: "Publish to Test PyPI"
|
name: "Publish to Test PyPI"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [ build ]
|
needs: [build]
|
||||||
environment:
|
environment:
|
||||||
name: testpypi
|
name: testpypi
|
||||||
url: https://pypi.org/p/pipecat-ai
|
url: https://pypi.org/p/pipecat-ai
|
||||||
|
|||||||
50
.github/workflows/python-compatibility.yaml
vendored
Normal file
50
.github/workflows/python-compatibility.yaml
vendored
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
name: Python Compatibility Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main, develop]
|
||||||
|
paths: ["pyproject.toml"]
|
||||||
|
pull_request:
|
||||||
|
branches: [main, develop]
|
||||||
|
paths: ["pyproject.toml"]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-compatibility:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
python-version: ["3.10.18", "3.11.13", "3.12.11", "3.13.4"]
|
||||||
|
|
||||||
|
name: Python ${{ matrix.python-version }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install system dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y \
|
||||||
|
portaudio19-dev \
|
||||||
|
libcairo2-dev \
|
||||||
|
libgirepository1.0-dev \
|
||||||
|
pkg-config
|
||||||
|
|
||||||
|
- name: Install uv
|
||||||
|
uses: astral-sh/setup-uv@v4
|
||||||
|
with:
|
||||||
|
version: "latest"
|
||||||
|
|
||||||
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
run: |
|
||||||
|
uv python install ${{ matrix.python-version }}
|
||||||
|
uv python pin ${{ matrix.python-version }}
|
||||||
|
|
||||||
|
- name: Test uv sync with all extras
|
||||||
|
run: |
|
||||||
|
uv sync --group dev --all-extras --no-extra krisp
|
||||||
|
|
||||||
|
- name: Verify installation
|
||||||
|
run: |
|
||||||
|
uv run python --version
|
||||||
|
uv run python -c "import pipecat; print('✅ Pipecat imports successfully')"
|
||||||
34
.github/workflows/tests.yaml
vendored
34
.github/workflows/tests.yaml
vendored
@@ -22,31 +22,23 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install uv
|
||||||
|
uses: astral-sh/setup-uv@v3
|
||||||
|
with:
|
||||||
|
version: "latest"
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
id: setup_python
|
run: uv python install 3.10
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: "3.10"
|
|
||||||
- name: Cache virtual environment
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
# We are hashing dev-requirements.txt and test-requirements.txt which
|
|
||||||
# contain all dependencies needed to run the tests.
|
|
||||||
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('dev-requirements.txt') }}-${{ hashFiles('test-requirements.txt') }}
|
|
||||||
path: .venv
|
|
||||||
- name: Install system packages
|
- name: Install system packages
|
||||||
id: install_system_packages
|
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install -y portaudio19-dev
|
sudo apt-get install -y portaudio19-dev
|
||||||
- name: Setup virtual environment
|
|
||||||
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m venv .venv
|
uv sync --group dev --extra anthropic --extra aws --extra google --extra langchain
|
||||||
- name: Install basic Python dependencies
|
|
||||||
run: |
|
|
||||||
source .venv/bin/activate
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -r dev-requirements.txt -r test-requirements.txt
|
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: |
|
run: |
|
||||||
source .venv/bin/activate
|
uv run pytest
|
||||||
pytest
|
|
||||||
|
|||||||
@@ -9,22 +9,14 @@ build:
|
|||||||
- python3-dev
|
- python3-dev
|
||||||
- libasound2-dev
|
- libasound2-dev
|
||||||
jobs:
|
jobs:
|
||||||
pre_build:
|
post_install:
|
||||||
- python -m pip install --upgrade pip
|
- pip install uv
|
||||||
- pip install wheel setuptools
|
- UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH uv sync --group docs --all-extras --no-extra krisp --no-extra gstreamer --no-extra ultravox --no-extra local_smart_turn --no-extra moondream --no-extra riva --no-extra mlx-whisper
|
||||||
post_build:
|
|
||||||
- echo "Build completed"
|
|
||||||
|
|
||||||
sphinx:
|
sphinx:
|
||||||
configuration: docs/api/conf.py
|
configuration: docs/api/conf.py
|
||||||
fail_on_warning: false
|
fail_on_warning: false
|
||||||
|
|
||||||
python:
|
|
||||||
install:
|
|
||||||
- requirements: docs/api/requirements.txt
|
|
||||||
- method: pip
|
|
||||||
path: .
|
|
||||||
|
|
||||||
search:
|
search:
|
||||||
ranking:
|
ranking:
|
||||||
api/*: 5
|
api/*: 5
|
||||||
|
|||||||
77
CHANGELOG.md
77
CHANGELOG.md
@@ -7,15 +7,83 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added new `handle_sigint` and `handle_sigterm` to `RunnerArguments`. This
|
||||||
|
allows applications to know what settings they should use for the environment
|
||||||
|
they are running on.
|
||||||
|
|
||||||
|
- Added `processor` field to `ErrorFrame` to indicate `FrameProcessor` that
|
||||||
|
generated the error.
|
||||||
|
|
||||||
|
- Added new language support for `AWSTranscribeSTTService`. All languages
|
||||||
|
supporting streaming data input are now supported:
|
||||||
|
https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html
|
||||||
|
|
||||||
|
- Added support for Simli Trinity Avatars. A new `is_trinity_avatar` parameter
|
||||||
|
has been introduced to specify whether the provided `faceId` corresponds to a
|
||||||
|
Trinity avatar, which is required for optimal Trinity avatar performance.
|
||||||
|
|
||||||
|
- The development runner how handles custom `body` data for `DailyTransport`.
|
||||||
|
The `body` data is passed to the Pipecat client. You can POST to the `/start`
|
||||||
|
endpoint with a request body of:
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"createDailyRoom": true,
|
||||||
|
"dailyRoomProperties": { "start_video_off": true },
|
||||||
|
"body": { "custom_data": "value" }
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
The `body` information is parsed and used in the application. The
|
||||||
|
`dailyRoomProperties` are currently not handled.
|
||||||
|
|
||||||
|
- Added detailed latency logging to `UserBotLatencyLogObserver`, capturing
|
||||||
|
average response time between user stop and bot start, as well as minimum and
|
||||||
|
maximum response latency.
|
||||||
|
|
||||||
|
- Added Chinese, Japanese, Korean word timestamp support to
|
||||||
|
`CartesiaTTSService`.
|
||||||
|
|
||||||
|
- Added `region` parameter to `GladiaSTTService`. Accepted values: eu-west (default), us-west.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
- System frames are now queued. Before, system frames could be generated from
|
||||||
|
any task and would not guarantee any order which was causing undesired
|
||||||
|
behavior. Also, it was possible to get into some rare recursion issues because
|
||||||
|
of the way system frames were executed (they were executed in-place, meaning
|
||||||
|
calling `push_frame()` would finish after the system frame traversed all the
|
||||||
|
pipeline). This makes system frames more deterministic.
|
||||||
|
|
||||||
|
- Changed the default model for both `ElevenLabsTTSService` and
|
||||||
|
`ElevenLabsHttpTTSService` to `eleven_turbo_v2_5`. The rationale for this
|
||||||
|
change is that the Turbo v2.5 model exhibits the most stable voice quality
|
||||||
|
along with very low latency TTFB; latencies are on par with the Flash v2.5
|
||||||
|
model. Also, the Turbo v2.5 model outputs word/timestamp alignment data with
|
||||||
|
correct spacing.
|
||||||
|
|
||||||
|
- The development runners `/connect` and `/start` endpoint now both return
|
||||||
|
`dailyRoom` and `dailyToken` in place of the previous `room_url` and `token`.
|
||||||
|
|
||||||
|
- Updated the `pipecat.runner.daily` utility to only a take `DAILY_API_URL` and
|
||||||
|
`DAILY_SAMPLE_ROOM_URL` environment variables instead of argparsing `-u` and
|
||||||
|
`-k`, respectively.
|
||||||
|
|
||||||
- Updated `daily-python` to 0.19.6.
|
- Updated `daily-python` to 0.19.6.
|
||||||
|
|
||||||
- Changed `TavusVideoService` to send audio or video frames only after the
|
- Changed `TavusVideoService` to send audio or video frames only after the
|
||||||
transport is ready, preventing warning messages at startup.
|
transport is ready, preventing warning messages at startup.
|
||||||
|
|
||||||
|
- The development runner now strips any provided protocol (e.g. https://) from
|
||||||
|
the proxy address and issues a warning. It also strips trailing `/`.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed an issue where `BotStartedSpeakingFrame` and `BotStoppedSpeakingFrame`
|
||||||
|
were not emitted when using `TavusVideoService` or `HeyGenVideoService`.
|
||||||
|
|
||||||
- Fixed an issue in `LiveKitTransport` where empty `AudioRawFrame`s were pushed
|
- Fixed an issue in `LiveKitTransport` where empty `AudioRawFrame`s were pushed
|
||||||
down the pipeline. This resulted in warnings by the STT processor.
|
down the pipeline. This resulted in warnings by the STT processor.
|
||||||
- Fixed `PiperTTSService` to send text as a JSON object in the request body,
|
- Fixed `PiperTTSService` to send text as a JSON object in the request body,
|
||||||
@@ -32,9 +100,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Fixed an issue in `TaskObserver` (a proxy to all observers) that was degrading
|
- Fixed an issue in `TaskObserver` (a proxy to all observers) that was degrading
|
||||||
global performance.
|
global performance.
|
||||||
|
|
||||||
### Other
|
### Deprecated
|
||||||
|
|
||||||
- Allow Daily transport to quickstart bot example.
|
- In the `pipecat.runner.daily`, the `configure_with_args()` function is
|
||||||
|
deprecated. Use the `configure()` function instead.
|
||||||
|
|
||||||
|
- The development runner's `/connect` endpoint is deprecated and will be
|
||||||
|
removed in a future version. Use the `/start` endpoint in its place. In the
|
||||||
|
meantime, both endpoints work and deliver equivalent functionality.
|
||||||
|
|
||||||
## [0.0.77] - 2025-07-31
|
## [0.0.77] - 2025-07-31
|
||||||
|
|
||||||
|
|||||||
98
README.md
98
README.md
@@ -59,7 +59,7 @@ You can connect to Pipecat from any platform using our official SDKs:
|
|||||||
| Speech-to-Speech | [AWS Nova Sonic](https://docs.pipecat.ai/server/services/s2s/aws), [Gemini Multimodal Live](https://docs.pipecat.ai/server/services/s2s/gemini), [OpenAI Realtime](https://docs.pipecat.ai/server/services/s2s/openai) |
|
| Speech-to-Speech | [AWS Nova Sonic](https://docs.pipecat.ai/server/services/s2s/aws), [Gemini Multimodal Live](https://docs.pipecat.ai/server/services/s2s/gemini), [OpenAI Realtime](https://docs.pipecat.ai/server/services/s2s/openai) |
|
||||||
| Transport | [Daily (WebRTC)](https://docs.pipecat.ai/server/services/transport/daily), [FastAPI Websocket](https://docs.pipecat.ai/server/services/transport/fastapi-websocket), [SmallWebRTCTransport](https://docs.pipecat.ai/server/services/transport/small-webrtc), [WebSocket Server](https://docs.pipecat.ai/server/services/transport/websocket-server), Local |
|
| Transport | [Daily (WebRTC)](https://docs.pipecat.ai/server/services/transport/daily), [FastAPI Websocket](https://docs.pipecat.ai/server/services/transport/fastapi-websocket), [SmallWebRTCTransport](https://docs.pipecat.ai/server/services/transport/small-webrtc), [WebSocket Server](https://docs.pipecat.ai/server/services/transport/websocket-server), Local |
|
||||||
| Serializers | [Plivo](https://docs.pipecat.ai/server/utilities/serializers/plivo), [Twilio](https://docs.pipecat.ai/server/utilities/serializers/twilio), [Telnyx](https://docs.pipecat.ai/server/utilities/serializers/telnyx) |
|
| Serializers | [Plivo](https://docs.pipecat.ai/server/utilities/serializers/plivo), [Twilio](https://docs.pipecat.ai/server/utilities/serializers/twilio), [Telnyx](https://docs.pipecat.ai/server/utilities/serializers/telnyx) |
|
||||||
| Video | [Tavus](https://docs.pipecat.ai/server/services/video/tavus), [Simli](https://docs.pipecat.ai/server/services/video/simli) |
|
| Video | [HeyGen](https://docs.pipecat.ai/server/services/video/heygen), [Tavus](https://docs.pipecat.ai/server/services/video/tavus), [Simli](https://docs.pipecat.ai/server/services/video/simli) |
|
||||||
| Memory | [mem0](https://docs.pipecat.ai/server/services/memory/mem0) |
|
| Memory | [mem0](https://docs.pipecat.ai/server/services/memory/mem0) |
|
||||||
| Vision & Image | [fal](https://docs.pipecat.ai/server/services/image-generation/fal), [Google Imagen](https://docs.pipecat.ai/server/services/image-generation/fal), [Moondream](https://docs.pipecat.ai/server/services/vision/moondream) |
|
| Vision & Image | [fal](https://docs.pipecat.ai/server/services/image-generation/fal), [Google Imagen](https://docs.pipecat.ai/server/services/image-generation/fal), [Moondream](https://docs.pipecat.ai/server/services/vision/moondream) |
|
||||||
| Audio Processing | [Silero VAD](https://docs.pipecat.ai/server/utilities/audio/silero-vad-analyzer), [Krisp](https://docs.pipecat.ai/server/utilities/audio/krisp-filter), [Koala](https://docs.pipecat.ai/server/utilities/audio/koala-filter), [Noisereduce](https://docs.pipecat.ai/server/utilities/audio/noisereduce-filter) |
|
| Audio Processing | [Silero VAD](https://docs.pipecat.ai/server/utilities/audio/silero-vad-analyzer), [Krisp](https://docs.pipecat.ai/server/utilities/audio/krisp-filter), [Koala](https://docs.pipecat.ai/server/utilities/audio/koala-filter), [Noisereduce](https://docs.pipecat.ai/server/utilities/audio/noisereduce-filter) |
|
||||||
@@ -69,80 +69,80 @@ You can connect to Pipecat from any platform using our official SDKs:
|
|||||||
|
|
||||||
## ⚡ Getting started
|
## ⚡ Getting started
|
||||||
|
|
||||||
You can get started with Pipecat running on your local machine, then move your agent processes to the cloud when you’re ready.
|
You can get started with Pipecat running on your local machine, then move your agent processes to the cloud when you're ready.
|
||||||
|
|
||||||
```shell
|
1. Install uv
|
||||||
# Install the module
|
|
||||||
pip install pipecat-ai
|
|
||||||
|
|
||||||
# Set up your environment
|
```bash
|
||||||
cp dot-env.template .env
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
```
|
```
|
||||||
|
|
||||||
To keep things lightweight, only the core framework is included by default. If you need support for third-party AI services, you can add the necessary dependencies with:
|
> **Need help?** Refer to the [uv install documentation](https://docs.astral.sh/uv/getting-started/installation/).
|
||||||
|
|
||||||
```shell
|
2. Install the module
|
||||||
pip install "pipecat-ai[option,...]"
|
|
||||||
```
|
```bash
|
||||||
|
# For new projects
|
||||||
|
uv init my-pipecat-app
|
||||||
|
cd my-pipecat-app
|
||||||
|
uv add pipecat-ai
|
||||||
|
|
||||||
|
# Or for existing projects
|
||||||
|
uv add pipecat-ai
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Set up your environment
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cp env.example .env
|
||||||
|
```
|
||||||
|
|
||||||
|
4. To keep things lightweight, only the core framework is included by default. If you need support for third-party AI services, you can add the necessary dependencies with:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
uv add "pipecat-ai[option,...]"
|
||||||
|
```
|
||||||
|
|
||||||
|
> **Using pip?** You can still use `pip install pipecat-ai` and `pip install "pipecat-ai[option,...]"` to get set up.
|
||||||
|
|
||||||
## 🧪 Code examples
|
## 🧪 Code examples
|
||||||
|
|
||||||
- [Foundational](https://github.com/pipecat-ai/pipecat/tree/main/examples/foundational) — small snippets that build on each other, introducing one or two concepts at a time
|
- [Foundational](https://github.com/pipecat-ai/pipecat/tree/main/examples/foundational) — small snippets that build on each other, introducing one or two concepts at a time
|
||||||
- [Example apps](https://github.com/pipecat-ai/pipecat-examples) — complete applications that you can use as starting points for development
|
- [Example apps](https://github.com/pipecat-ai/pipecat-examples) — complete applications that you can use as starting points for development
|
||||||
|
|
||||||
## 🛠️ Hacking on the framework itself
|
## 🛠️ Contributing to the framework
|
||||||
|
|
||||||
1. Set up a virtual environment before following these instructions. From the root of the repo:
|
1. Clone the repository and navigate to it:
|
||||||
|
|
||||||
```shell
|
```bash
|
||||||
python3 -m venv venv
|
git clone https://github.com/pipecat-ai/pipecat.git
|
||||||
source venv/bin/activate
|
cd pipecat
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Install the development dependencies:
|
2. Install development and testing dependencies:
|
||||||
|
|
||||||
```shell
|
```bash
|
||||||
pip install -r dev-requirements.txt
|
uv sync --group dev --all-extras --no-extra krisp
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Install the git pre-commit hooks (these help ensure your code follows project rules):
|
3. Install the git pre-commit hooks:
|
||||||
|
|
||||||
```shell
|
```bash
|
||||||
pre-commit install
|
uv run pre-commit install
|
||||||
```
|
|
||||||
|
|
||||||
4. Install the `pipecat-ai` package locally in editable mode:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
pip install -e .
|
|
||||||
```
|
|
||||||
|
|
||||||
> The `-e` or `--editable` option allows you to modify the code without reinstalling.
|
|
||||||
|
|
||||||
5. Include optional dependencies as needed. For example:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
pip install -e ".[daily,deepgram,cartesia,openai,silero]"
|
|
||||||
```
|
|
||||||
|
|
||||||
6. (Optional) If you want to use this package from another directory:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
pip install "path_to_this_repo[option,...]"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Running tests
|
### Running tests
|
||||||
|
|
||||||
Install the test dependencies:
|
To run all tests, from the root directory:
|
||||||
|
|
||||||
```shell
|
```bash
|
||||||
pip install -r test-requirements.txt
|
uv run pytest
|
||||||
```
|
```
|
||||||
|
|
||||||
From the root directory, run:
|
Run a specific test suite:
|
||||||
|
|
||||||
```shell
|
```bash
|
||||||
pytest
|
uv run pytest tests/test_name.py
|
||||||
```
|
```
|
||||||
|
|
||||||
### Setting up your editor
|
### Setting up your editor
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
build~=1.2.2
|
|
||||||
coverage~=7.9.1
|
|
||||||
grpcio-tools~=1.67.1
|
|
||||||
pip-tools~=7.4.1
|
|
||||||
pre-commit~=4.2.0
|
|
||||||
pyright~=1.1.402
|
|
||||||
pytest~=8.4.1
|
|
||||||
pytest-asyncio~=1.0.0
|
|
||||||
pytest-aiohttp==1.1.0
|
|
||||||
ruff~=0.12.1
|
|
||||||
setuptools~=78.1.1
|
|
||||||
setuptools_scm~=8.3.1
|
|
||||||
python-dotenv~=1.1.1
|
|
||||||
@@ -1,17 +1,27 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Check if sphinx-build is installed
|
# Build docs using uv
|
||||||
if ! command -v sphinx-build &> /dev/null; then
|
echo "Installing dependencies with uv..."
|
||||||
echo "Error: sphinx-build is not installed or not in PATH" >&2
|
uv sync --group docs --all-extras --no-extra krisp --no-extra gstreamer --no-extra ultravox --no-extra local_smart_turn --no-extra moondream --no-extra riva --no-extra mlx-whisper
|
||||||
echo "Please install Sphinx using: pip install -r requirements.txt" >&2
|
|
||||||
|
# Check if sphinx-build is available
|
||||||
|
if ! uv run sphinx-build --version &> /dev/null; then
|
||||||
|
echo "Error: sphinx-build is not available" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean previous build
|
# Clean previous build
|
||||||
rm -rf _build
|
rm -rf _build
|
||||||
|
|
||||||
|
echo "Building documentation..."
|
||||||
# Build docs matching ReadTheDocs configuration
|
# Build docs matching ReadTheDocs configuration
|
||||||
sphinx-build -b html -d _build/doctrees . _build/html -W --keep-going
|
uv run sphinx-build -b html -d _build/doctrees . _build/html -W --keep-going
|
||||||
|
|
||||||
# Open docs (MacOS)
|
if [ $? -eq 0 ]; then
|
||||||
open _build/html/index.html
|
echo "Documentation built successfully!"
|
||||||
|
# Open docs (MacOS)
|
||||||
|
open _build/html/index.html
|
||||||
|
else
|
||||||
|
echo "Documentation build failed!" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
154
docs/api/conf.py
154
docs/api/conf.py
@@ -1,4 +1,5 @@
|
|||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@@ -28,6 +29,7 @@ extensions = [
|
|||||||
|
|
||||||
suppress_warnings = [
|
suppress_warnings = [
|
||||||
"autodoc.mocked_object",
|
"autodoc.mocked_object",
|
||||||
|
"toc.not_included",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Napoleon settings
|
# Napoleon settings
|
||||||
@@ -45,85 +47,40 @@ autodoc_default_options = {
|
|||||||
|
|
||||||
# Mock imports for optional dependencies
|
# Mock imports for optional dependencies
|
||||||
autodoc_mock_imports = [
|
autodoc_mock_imports = [
|
||||||
"riva",
|
# Krisp - has build issues on some platforms
|
||||||
"livekit",
|
|
||||||
"pyht", # Base PlayHT package
|
|
||||||
"pyht.async_client", # PlayHT specific imports
|
|
||||||
"pyht.client",
|
|
||||||
"pyht.protos",
|
|
||||||
"pyht.protos.api_pb2",
|
|
||||||
"pipecat_ai_playht", # PlayHT wrapper
|
|
||||||
"aiortc",
|
|
||||||
"aiortc.mediastreams",
|
|
||||||
"cv2",
|
|
||||||
"av",
|
|
||||||
"pyneuphonic",
|
|
||||||
"mem0",
|
|
||||||
"mlx_whisper",
|
|
||||||
"anthropic",
|
|
||||||
"assemblyai",
|
|
||||||
"boto3",
|
|
||||||
"azure",
|
|
||||||
"cartesia",
|
|
||||||
"deepgram",
|
|
||||||
"elevenlabs",
|
|
||||||
"fal",
|
|
||||||
"gladia",
|
|
||||||
"google",
|
|
||||||
"krisp",
|
|
||||||
"langchain",
|
|
||||||
"lmnt",
|
|
||||||
"noisereduce",
|
|
||||||
"openpipe",
|
|
||||||
"simli",
|
|
||||||
"soundfile",
|
|
||||||
"soniox",
|
|
||||||
"pipecat_ai_krisp",
|
"pipecat_ai_krisp",
|
||||||
"pyaudio",
|
"krisp",
|
||||||
|
# System-specific GUI libraries
|
||||||
"_tkinter",
|
"_tkinter",
|
||||||
"tkinter",
|
"tkinter",
|
||||||
"daily",
|
# Platform-specific audio libraries (if needed)
|
||||||
"daily_python",
|
"gi",
|
||||||
# Moondream dependencies
|
"gi.require_version",
|
||||||
"torch",
|
"gi.repository",
|
||||||
"transformers",
|
# OpenCV - sometimes has import issues during docs build
|
||||||
"intel_extension_for_pytorch",
|
"cv2",
|
||||||
# Ultravox dependencies
|
# Heavy ML packages excluded from ReadTheDocs
|
||||||
"huggingface_hub",
|
# ultravox dependencies
|
||||||
"vllm",
|
"vllm",
|
||||||
"vllm.engine.arg_utils",
|
"vllm.engine.arg_utils",
|
||||||
|
# local-smart-turn dependencies
|
||||||
|
"coremltools",
|
||||||
|
"coremltools.models",
|
||||||
|
"coremltools.models.MLModel",
|
||||||
|
"torch",
|
||||||
|
"torch.nn",
|
||||||
|
"torch.nn.functional",
|
||||||
|
"torchaudio",
|
||||||
|
# moondream dependencies
|
||||||
|
"transformers",
|
||||||
"transformers.AutoTokenizer",
|
"transformers.AutoTokenizer",
|
||||||
# Langchain dependencies
|
"transformers.AutoFeatureExtractor",
|
||||||
"langchain_core",
|
"AutoFeatureExtractor",
|
||||||
"langchain_core.messages",
|
"timm",
|
||||||
"langchain_core.runnables",
|
"einops",
|
||||||
"langchain_core.messages.AIMessageChunk",
|
"intel_extension_for_pytorch",
|
||||||
"langchain_core.runnables.Runnable",
|
"huggingface_hub",
|
||||||
# LiveKit dependencies
|
# riva dependencies
|
||||||
"livekit",
|
|
||||||
"livekit.rtc",
|
|
||||||
"livekit_api",
|
|
||||||
"livekit_protocol",
|
|
||||||
"tenacity",
|
|
||||||
"tenacity.retry",
|
|
||||||
"tenacity.stop_after_attempt",
|
|
||||||
"tenacity.wait_exponential",
|
|
||||||
"rtc",
|
|
||||||
"rtc.Room",
|
|
||||||
"rtc.RoomOptions",
|
|
||||||
"rtc.AudioSource",
|
|
||||||
"rtc.LocalAudioTrack",
|
|
||||||
"rtc.TrackPublishOptions",
|
|
||||||
"rtc.TrackSource",
|
|
||||||
"rtc.AudioStream",
|
|
||||||
"rtc.AudioFrameEvent",
|
|
||||||
"rtc.AudioFrame",
|
|
||||||
"rtc.Track",
|
|
||||||
"rtc.TrackKind",
|
|
||||||
"rtc.RemoteParticipant",
|
|
||||||
"rtc.RemoteTrackPublication",
|
|
||||||
"rtc.DataPacket",
|
|
||||||
# Riva dependencies
|
|
||||||
"riva",
|
"riva",
|
||||||
"riva.client",
|
"riva.client",
|
||||||
"riva.client.Auth",
|
"riva.client.Auth",
|
||||||
@@ -133,57 +90,14 @@ autodoc_mock_imports = [
|
|||||||
"riva.client.AudioEncoding",
|
"riva.client.AudioEncoding",
|
||||||
"riva.client.proto.riva_tts_pb2",
|
"riva.client.proto.riva_tts_pb2",
|
||||||
"riva.client.SpeechSynthesisService",
|
"riva.client.SpeechSynthesisService",
|
||||||
# Local CoreML Smart Turn dependencies
|
# MLX dependencies (Apple Silicon specific)
|
||||||
"coremltools",
|
"mlx",
|
||||||
"coremltools.models",
|
"mlx_whisper", # Note: might need underscore format too
|
||||||
"coremltools.models.MLModel",
|
|
||||||
"torch",
|
|
||||||
"torch.nn",
|
|
||||||
"torch.nn.functional",
|
|
||||||
"transformers",
|
|
||||||
"transformers.AutoFeatureExtractor",
|
|
||||||
# Also add specific classes that are imported
|
|
||||||
"AutoFeatureExtractor",
|
|
||||||
# Sentry dependencies
|
|
||||||
"sentry_sdk",
|
|
||||||
# AWS Nova Sonic dependencies
|
|
||||||
"aws_sdk_bedrock_runtime",
|
|
||||||
"aws_sdk_bedrock_runtime.client",
|
|
||||||
"aws_sdk_bedrock_runtime.config",
|
|
||||||
"aws_sdk_bedrock_runtime.models",
|
|
||||||
"smithy_aws_core",
|
|
||||||
"smithy_aws_core.credentials_resolvers",
|
|
||||||
"smithy_aws_core.credentials_resolvers.static",
|
|
||||||
"smithy_aws_core.identity",
|
|
||||||
"smithy_core",
|
|
||||||
"smithy_core.aio",
|
|
||||||
"smithy_core.aio.eventstream",
|
|
||||||
# MCP dependencies (you may already have these)
|
|
||||||
"mcp",
|
|
||||||
"mcp.client",
|
|
||||||
"mcp.client.session_group",
|
|
||||||
"mcp.client.sse",
|
|
||||||
"mcp.client.stdio",
|
|
||||||
"mcp.ClientSession",
|
|
||||||
"mcp.StdioServerParameters",
|
|
||||||
# gstreamer
|
|
||||||
"gi",
|
|
||||||
"gi.require_version",
|
|
||||||
"gi.repository",
|
|
||||||
# Protobuf mocks
|
|
||||||
"pipecat.frames.protobufs.frames_pb2",
|
|
||||||
"pipecat.serializers.protobuf",
|
|
||||||
"google.protobuf",
|
|
||||||
"google.protobuf.descriptor",
|
|
||||||
"google.protobuf.descriptor_pool",
|
|
||||||
"google.protobuf.runtime_version",
|
|
||||||
"google.protobuf.symbol_database",
|
|
||||||
"google.protobuf.internal.builder",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# HTML output settings
|
# HTML output settings
|
||||||
html_theme = "sphinx_rtd_theme"
|
html_theme = "sphinx_rtd_theme"
|
||||||
html_static_path = ["_static"]
|
html_static_path = ["_static"] if os.path.exists("_static") else []
|
||||||
autodoc_typehints = "signature" # Show type hints in the signature only, not in the docstring
|
autodoc_typehints = "signature" # Show type hints in the signature only, not in the docstring
|
||||||
html_show_sphinx = False
|
html_show_sphinx = False
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ Quick Links
|
|||||||
* `Join our Community <https://discord.gg/pipecat>`_
|
* `Join our Community <https://discord.gg/pipecat>`_
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 3
|
:maxdepth: 2
|
||||||
:caption: API Reference
|
:caption: API Reference
|
||||||
:hidden:
|
:hidden:
|
||||||
|
|
||||||
|
|||||||
@@ -1,59 +0,0 @@
|
|||||||
# Sphinx dependencies
|
|
||||||
sphinx>=8.1.3
|
|
||||||
sphinx-rtd-theme
|
|
||||||
sphinx-markdown-builder
|
|
||||||
sphinx-autodoc-typehints
|
|
||||||
toml
|
|
||||||
|
|
||||||
# Install all extras individually to ensure they're properly resolved
|
|
||||||
pipecat-ai[anthropic]
|
|
||||||
pipecat-ai[assemblyai]
|
|
||||||
pipecat-ai[asyncai]
|
|
||||||
pipecat-ai[aws]
|
|
||||||
pipecat-ai[azure]
|
|
||||||
pipecat-ai[cartesia]
|
|
||||||
pipecat-ai[cerebras]
|
|
||||||
pipecat-ai[deepseek]
|
|
||||||
pipecat-ai[daily]
|
|
||||||
pipecat-ai[deepgram]
|
|
||||||
pipecat-ai[elevenlabs]
|
|
||||||
pipecat-ai[fal]
|
|
||||||
pipecat-ai[fireworks]
|
|
||||||
pipecat-ai[fish]
|
|
||||||
pipecat-ai[gladia]
|
|
||||||
pipecat-ai[google]
|
|
||||||
pipecat-ai[grok]
|
|
||||||
pipecat-ai[groq]
|
|
||||||
pipecat-ai[inworld]
|
|
||||||
# pipecat-ai[krisp] # Mocked
|
|
||||||
pipecat-ai[koala]
|
|
||||||
# pipecat-ai[langchain] # Mocked
|
|
||||||
# pipecat-ai[livekit] # Mocked
|
|
||||||
pipecat-ai[lmnt]
|
|
||||||
pipecat-ai[local]
|
|
||||||
# pipecat-ai[local-smart-turn] # Mocked
|
|
||||||
# pipecat-ai[mem0] # Mocked
|
|
||||||
# pipecat-ai[mlx-whisper] # Mocked
|
|
||||||
# pipecat-ai[moondream] # Mocked
|
|
||||||
pipecat-ai[nim]
|
|
||||||
# pipecat-ai[neuphonic] # Mocked
|
|
||||||
pipecat-ai[noisereduce]
|
|
||||||
pipecat-ai[openai]
|
|
||||||
# pipecat-ai[openpipe]
|
|
||||||
# pipecat-ai[playht] # Mocked due to grpcio conflict with riva
|
|
||||||
pipecat-ai[qwen]
|
|
||||||
pipecat-ai[remote-smart-turn]
|
|
||||||
# pipecat-ai[riva] # Mocked
|
|
||||||
pipecat-ai[runner]
|
|
||||||
pipecat-ai[sambanova]
|
|
||||||
pipecat-ai[silero]
|
|
||||||
pipecat-ai[simli]
|
|
||||||
pipecat-ai[soundfile]
|
|
||||||
pipecat-ai[soniox]
|
|
||||||
pipecat-ai[speechmatics]
|
|
||||||
pipecat-ai[tavus]
|
|
||||||
pipecat-ai[together]
|
|
||||||
# pipecat-ai[ultravox] # Mocked
|
|
||||||
# pipecat-ai[webrtc] # Mocked
|
|
||||||
pipecat-ai[websocket]
|
|
||||||
pipecat-ai[whisper]
|
|
||||||
@@ -44,6 +44,13 @@ FIREWORKS_API_KEY=...
|
|||||||
|
|
||||||
# Gladia
|
# Gladia
|
||||||
GLADIA_API_KEY=...
|
GLADIA_API_KEY=...
|
||||||
|
GLADIA_REGION=...
|
||||||
|
|
||||||
|
# Google
|
||||||
|
GOOGLE_API_KEY=...
|
||||||
|
GOOGLE_CLOUD_PROJECT_ID=...
|
||||||
|
GOOGLE_TEST_CREDENTIALS=...
|
||||||
|
GOOGLE_VERTEX_TEST_CREDENTIALS=...
|
||||||
|
|
||||||
# LMNT
|
# LMNT
|
||||||
LMNT_API_KEY=...
|
LMNT_API_KEY=...
|
||||||
@@ -122,7 +129,6 @@ SONIOX_API_KEY=
|
|||||||
# Speechmatics
|
# Speechmatics
|
||||||
SPEECHMATICS_API_KEY=...
|
SPEECHMATICS_API_KEY=...
|
||||||
|
|
||||||
|
|
||||||
# SambaNova
|
# SambaNova
|
||||||
SAMBANOVA_API_KEY=...
|
SAMBANOVA_API_KEY=...
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
# Create an HTTP session
|
# Create an HTTP session
|
||||||
@@ -50,7 +50,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def on_client_connected(transport, client):
|
async def on_client_connected(transport, client):
|
||||||
await task.queue_frames([TTSSpeakFrame(f"Hello there!"), EndFrame()])
|
await task.queue_frames([TTSSpeakFrame(f"Hello there!"), EndFrame()])
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
# Create an HTTP session
|
# Create an HTTP session
|
||||||
@@ -51,7 +51,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def on_client_connected(transport, client):
|
async def on_client_connected(transport, client):
|
||||||
await task.queue_frames([TTSSpeakFrame(f"Hello there!"), EndFrame()])
|
await task.queue_frames([TTSSpeakFrame(f"Hello there!"), EndFrame()])
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
tts = CartesiaTTSService(
|
tts = CartesiaTTSService(
|
||||||
@@ -48,7 +48,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def on_client_connected(transport, client):
|
async def on_client_connected(transport, client):
|
||||||
await task.queue_frames([TTSSpeakFrame(f"Hello there!"), EndFrame()])
|
await task.queue_frames([TTSSpeakFrame(f"Hello there!"), EndFrame()])
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
tts = FastPitchTTSService(api_key=os.getenv("NVIDIA_API_KEY"))
|
tts = FastPitchTTSService(api_key=os.getenv("NVIDIA_API_KEY"))
|
||||||
@@ -45,7 +45,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def on_client_connected(transport, client):
|
async def on_client_connected(transport, client):
|
||||||
await task.queue_frames([TTSSpeakFrame(f"Hello there!"), EndFrame()])
|
await task.queue_frames([TTSSpeakFrame(f"Hello there!"), EndFrame()])
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
tts = CartesiaTTSService(
|
tts = CartesiaTTSService(
|
||||||
@@ -58,7 +58,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def on_client_connected(transport, client):
|
async def on_client_connected(transport, client):
|
||||||
await task.queue_frames([LLMMessagesFrame(messages), EndFrame()])
|
await task.queue_frames([LLMMessagesFrame(messages), EndFrame()])
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
# Create an HTTP session
|
# Create an HTTP session
|
||||||
@@ -63,7 +63,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
imagegen = GoogleImageGenService(
|
imagegen = GoogleImageGenService(
|
||||||
@@ -66,7 +66,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ async def run_example(webrtc_connection: SmallWebRTCConnection):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import json
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from deepgram import LiveOptions
|
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
|
|
||||||
@@ -51,12 +50,7 @@ async def main():
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
stt = DeepgramSTTService(
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
api_key=os.getenv("DEEPGRAM_API_KEY"),
|
|
||||||
live_options=LiveOptions(
|
|
||||||
vad_events=True,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"))
|
llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"))
|
||||||
|
|
||||||
@@ -78,20 +72,20 @@ async def main():
|
|||||||
context = OpenAILLMContext(messages)
|
context = OpenAILLMContext(messages)
|
||||||
context_aggregator = llm.create_context_aggregator(context)
|
context_aggregator = llm.create_context_aggregator(context)
|
||||||
|
|
||||||
runner = PipelineRunner()
|
pipeline = Pipeline(
|
||||||
|
[
|
||||||
|
transport.input(), # Transport user input
|
||||||
|
stt,
|
||||||
|
context_aggregator.user(), # User responses
|
||||||
|
llm, # LLM
|
||||||
|
tts, # TTS
|
||||||
|
transport.output(), # Transport bot output
|
||||||
|
context_aggregator.assistant(), # Assistant spoken responses
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
task = PipelineTask(
|
task = PipelineTask(
|
||||||
Pipeline(
|
pipeline,
|
||||||
[
|
|
||||||
transport.input(),
|
|
||||||
stt,
|
|
||||||
context_aggregator.user(),
|
|
||||||
llm,
|
|
||||||
tts,
|
|
||||||
transport.output(),
|
|
||||||
context_aggregator.assistant(),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
params=PipelineParams(
|
params=PipelineParams(
|
||||||
enable_metrics=True,
|
enable_metrics=True,
|
||||||
enable_usage_metrics=True,
|
enable_usage_metrics=True,
|
||||||
@@ -132,6 +126,8 @@ async def main():
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
runner = PipelineRunner()
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
"""Run the Calendar Month Narration bot using WebRTC transport.
|
"""Run the Calendar Month Narration bot using WebRTC transport.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@@ -170,14 +170,14 @@ async def run_bot(transport: BaseTransport):
|
|||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
# Run the pipeline
|
# Run the pipeline
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
|
|
||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -133,14 +133,14 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
|
|
||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -150,14 +150,14 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
|
|
||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -102,7 +102,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -101,7 +101,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
"""Speechmatics STT Service Example
|
"""Speechmatics STT Service Example
|
||||||
|
|
||||||
This example demonstrates using Speechmatics Speech-to-Text service with speaker diarization and intelligent speaker management. Key features:
|
This example demonstrates using Speechmatics Speech-to-Text service with speaker diarization and intelligent speaker management. Key features:
|
||||||
@@ -160,7 +160,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -168,7 +168,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
"""Run example using Speechmatics STT.
|
"""Run example using Speechmatics STT.
|
||||||
|
|
||||||
This example will use diarization within our STT service and output the words spoken by
|
This example will use diarization within our STT service and output the words spoken by
|
||||||
@@ -143,7 +143,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = SonioxSTTService(
|
stt = SonioxSTTService(
|
||||||
@@ -100,7 +100,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
# Create an HTTP session
|
# Create an HTTP session
|
||||||
@@ -115,7 +115,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
# Create an HTTP session
|
# Create an HTTP session
|
||||||
@@ -107,7 +107,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -103,7 +103,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ from pipecat.processors.aggregators.llm_response import (
|
|||||||
LLMUserResponseAggregator,
|
LLMUserResponseAggregator,
|
||||||
)
|
)
|
||||||
from pipecat.processors.frameworks.langchain import LangchainProcessor
|
from pipecat.processors.frameworks.langchain import LangchainProcessor
|
||||||
|
from pipecat.runner.types import RunnerArguments
|
||||||
|
from pipecat.runner.utils import create_transport
|
||||||
from pipecat.services.cartesia.tts import CartesiaTTSService
|
from pipecat.services.cartesia.tts import CartesiaTTSService
|
||||||
from pipecat.services.deepgram.stt import DeepgramSTTService
|
from pipecat.services.deepgram.stt import DeepgramSTTService
|
||||||
from pipecat.transports.base_transport import BaseTransport, TransportParams
|
from pipecat.transports.base_transport import BaseTransport, TransportParams
|
||||||
@@ -65,7 +67,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -133,7 +135,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -141,7 +143,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(
|
stt = DeepgramSTTService(
|
||||||
@@ -114,7 +114,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -100,7 +100,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
# Create an HTTP session
|
# Create an HTTP session
|
||||||
@@ -107,7 +107,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -103,7 +103,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -103,7 +103,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -105,7 +105,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = AzureSTTService(
|
stt = AzureSTTService(
|
||||||
@@ -109,7 +109,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = OpenAISTTService(
|
stt = OpenAISTTService(
|
||||||
@@ -104,7 +104,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -108,7 +108,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
# Create an HTTP session
|
# Create an HTTP session
|
||||||
@@ -106,7 +106,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -50,11 +50,12 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = GladiaSTTService(
|
stt = GladiaSTTService(
|
||||||
api_key=os.getenv("GLADIA_API_KEY", ""),
|
api_key=os.getenv("GLADIA_API_KEY", ""),
|
||||||
|
region=os.getenv("GLADIA_REGION"),
|
||||||
params=GladiaInputParams(
|
params=GladiaInputParams(
|
||||||
language_config=LanguageConfig(
|
language_config=LanguageConfig(
|
||||||
languages=[Language.EN],
|
languages=[Language.EN],
|
||||||
@@ -111,14 +112,14 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
|
|
||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -99,7 +99,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = GroqSTTService(api_key=os.getenv("GROQ_API_KEY"))
|
stt = GroqSTTService(api_key=os.getenv("GROQ_API_KEY"))
|
||||||
@@ -104,7 +104,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = AWSTranscribeSTTService()
|
stt = AWSTranscribeSTTService()
|
||||||
@@ -105,7 +105,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = GoogleSTTService(
|
stt = GoogleSTTService(
|
||||||
@@ -112,7 +112,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = AssemblyAISTTService(
|
stt = AssemblyAISTTService(
|
||||||
@@ -105,7 +105,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -103,7 +103,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
# Create an HTTP session
|
# Create an HTTP session
|
||||||
@@ -108,7 +108,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -102,7 +102,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = RivaSTTService(api_key=os.getenv("NVIDIA_API_KEY"))
|
stt = RivaSTTService(api_key=os.getenv("NVIDIA_API_KEY"))
|
||||||
@@ -99,7 +99,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
llm = GoogleLLMService(
|
llm = GoogleLLMService(
|
||||||
@@ -280,7 +280,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -288,7 +288,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -103,7 +103,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
tts = CartesiaTTSService(
|
tts = CartesiaTTSService(
|
||||||
@@ -93,7 +93,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -101,7 +101,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
# Create an HTTP session
|
# Create an HTTP session
|
||||||
@@ -107,7 +107,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -102,7 +102,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = FalSTTService(
|
stt = FalSTTService(
|
||||||
@@ -105,7 +105,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
# Create an HTTP session
|
# Create an HTTP session
|
||||||
@@ -109,7 +109,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
# Create an HTTP session
|
# Create an HTTP session
|
||||||
@@ -108,7 +108,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
pipeline = Pipeline([transport.input(), MirrorProcessor(), transport.output()])
|
pipeline = Pipeline([transport.input(), MirrorProcessor(), transport.output()])
|
||||||
@@ -91,7 +91,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
tk_root = tk.Tk()
|
tk_root = tk.Tk()
|
||||||
@@ -115,7 +115,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await asyncio.gather(runner.run(task), run_tk())
|
await asyncio.gather(runner.run(task), run_tk())
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -105,7 +105,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -157,7 +157,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -165,7 +165,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
user_response = UserResponseAggregator()
|
user_response = UserResponseAggregator()
|
||||||
@@ -123,7 +123,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
user_response = UserResponseAggregator()
|
user_response = UserResponseAggregator()
|
||||||
@@ -129,7 +129,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
user_response = UserResponseAggregator()
|
user_response = UserResponseAggregator()
|
||||||
@@ -129,7 +129,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
user_response = UserResponseAggregator()
|
user_response = UserResponseAggregator()
|
||||||
@@ -129,7 +129,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = WhisperSTTService()
|
stt = WhisperSTTService()
|
||||||
@@ -67,7 +67,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
# SPDX-License-Identifier: BSD 2-Clause License
|
# SPDX-License-Identifier: BSD 2-Clause License
|
||||||
#
|
#
|
||||||
|
|
||||||
import argparse
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
@@ -15,6 +14,8 @@ from pipecat.pipeline.pipeline import Pipeline
|
|||||||
from pipecat.pipeline.runner import PipelineRunner
|
from pipecat.pipeline.runner import PipelineRunner
|
||||||
from pipecat.pipeline.task import PipelineTask
|
from pipecat.pipeline.task import PipelineTask
|
||||||
from pipecat.processors.frame_processor import FrameDirection, FrameProcessor
|
from pipecat.processors.frame_processor import FrameDirection, FrameProcessor
|
||||||
|
from pipecat.runner.types import RunnerArguments
|
||||||
|
from pipecat.runner.utils import create_transport
|
||||||
from pipecat.services.deepgram.stt import DeepgramSTTService, Language, LiveOptions
|
from pipecat.services.deepgram.stt import DeepgramSTTService, Language, LiveOptions
|
||||||
from pipecat.transports.base_transport import BaseTransport, TransportParams
|
from pipecat.transports.base_transport import BaseTransport, TransportParams
|
||||||
from pipecat.transports.network.fastapi_websocket import FastAPIWebsocketParams
|
from pipecat.transports.network.fastapi_websocket import FastAPIWebsocketParams
|
||||||
@@ -41,7 +42,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(
|
stt = DeepgramSTTService(
|
||||||
@@ -60,7 +61,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -68,7 +69,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -42,11 +42,12 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = GladiaSTTService(
|
stt = GladiaSTTService(
|
||||||
api_key=os.getenv("GLADIA_API_KEY"),
|
api_key=os.getenv("GLADIA_API_KEY"),
|
||||||
|
region=os.getenv("GLADIA_REGION"),
|
||||||
# live_options=LiveOptions(language=Language.FR),
|
# live_options=LiveOptions(language=Language.FR),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -61,7 +62,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -69,7 +70,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
# SPDX-License-Identifier: BSD 2-Clause License
|
# SPDX-License-Identifier: BSD 2-Clause License
|
||||||
#
|
#
|
||||||
|
|
||||||
import argparse
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
@@ -15,6 +14,8 @@ from pipecat.pipeline.pipeline import Pipeline
|
|||||||
from pipecat.pipeline.runner import PipelineRunner
|
from pipecat.pipeline.runner import PipelineRunner
|
||||||
from pipecat.pipeline.task import PipelineTask
|
from pipecat.pipeline.task import PipelineTask
|
||||||
from pipecat.processors.frame_processor import FrameDirection, FrameProcessor
|
from pipecat.processors.frame_processor import FrameDirection, FrameProcessor
|
||||||
|
from pipecat.runner.types import RunnerArguments
|
||||||
|
from pipecat.runner.utils import create_transport
|
||||||
from pipecat.services.gladia.config import (
|
from pipecat.services.gladia.config import (
|
||||||
GladiaInputParams,
|
GladiaInputParams,
|
||||||
LanguageConfig,
|
LanguageConfig,
|
||||||
@@ -50,11 +51,12 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = GladiaSTTService(
|
stt = GladiaSTTService(
|
||||||
api_key=os.getenv("GLADIA_API_KEY"),
|
api_key=os.getenv("GLADIA_API_KEY"),
|
||||||
|
region=os.getenv("GLADIA_REGION"),
|
||||||
params=GladiaInputParams(
|
params=GladiaInputParams(
|
||||||
language_config=LanguageConfig(
|
language_config=LanguageConfig(
|
||||||
languages=[Language.EN], # Input in English
|
languages=[Language.EN], # Input in English
|
||||||
@@ -81,7 +83,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -89,7 +91,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
# SPDX-License-Identifier: BSD 2-Clause License
|
# SPDX-License-Identifier: BSD 2-Clause License
|
||||||
#
|
#
|
||||||
|
|
||||||
import argparse
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
@@ -15,6 +14,8 @@ from pipecat.pipeline.pipeline import Pipeline
|
|||||||
from pipecat.pipeline.runner import PipelineRunner
|
from pipecat.pipeline.runner import PipelineRunner
|
||||||
from pipecat.pipeline.task import PipelineTask
|
from pipecat.pipeline.task import PipelineTask
|
||||||
from pipecat.processors.frame_processor import FrameDirection, FrameProcessor
|
from pipecat.processors.frame_processor import FrameDirection, FrameProcessor
|
||||||
|
from pipecat.runner.types import RunnerArguments
|
||||||
|
from pipecat.runner.utils import create_transport
|
||||||
from pipecat.services.assemblyai.stt import AssemblyAISTTService
|
from pipecat.services.assemblyai.stt import AssemblyAISTTService
|
||||||
from pipecat.transports.base_transport import BaseTransport, TransportParams
|
from pipecat.transports.base_transport import BaseTransport, TransportParams
|
||||||
from pipecat.transports.network.fastapi_websocket import FastAPIWebsocketParams
|
from pipecat.transports.network.fastapi_websocket import FastAPIWebsocketParams
|
||||||
@@ -41,7 +42,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = AssemblyAISTTService(
|
stt = AssemblyAISTTService(
|
||||||
@@ -59,7 +60,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -67,7 +68,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = WhisperSTTServiceMLX(model=MLXModel.LARGE_V3_TURBO)
|
stt = WhisperSTTServiceMLX(model=MLXModel.LARGE_V3_TURBO)
|
||||||
@@ -94,7 +94,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = CartesiaSTTService(
|
stt = CartesiaSTTService(
|
||||||
@@ -61,7 +61,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = SambaNovaSTTService(
|
stt = SambaNovaSTTService(
|
||||||
@@ -98,7 +98,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
"""Run example using Speechmatics STT.
|
"""Run example using Speechmatics STT.
|
||||||
|
|
||||||
This example will use diarization within our STT service and output the words spoken by
|
This example will use diarization within our STT service and output the words spoken by
|
||||||
@@ -81,7 +81,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = SonioxSTTService(
|
stt = SonioxSTTService(
|
||||||
@@ -67,7 +67,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -151,7 +151,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -159,7 +159,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -145,7 +145,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -153,7 +153,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -199,7 +199,7 @@ If you need to use a tool, simply use the tool. Do not tell the user the tool yo
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -207,7 +207,7 @@ If you need to use a tool, simply use the tool. Do not tell the user the tool yo
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -137,7 +137,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -145,7 +145,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -188,7 +188,7 @@ indicate you should use the get_image tool are:
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -196,7 +196,7 @@ indicate you should use the get_image tool are:
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -210,7 +210,7 @@ indicate you should use the get_image tool are:
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -218,7 +218,7 @@ indicate you should use the get_image tool are:
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = GroqSTTService(api_key=os.getenv("GROQ_API_KEY"), model="distil-whisper-large-v3-en")
|
stt = GroqSTTService(api_key=os.getenv("GROQ_API_KEY"), model="distil-whisper-large-v3-en")
|
||||||
@@ -139,7 +139,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -129,7 +129,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -138,7 +138,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -137,7 +137,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -145,7 +145,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -135,7 +135,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -144,7 +144,7 @@ Start by asking me for my location. Then, use 'get_weather_current' to give me a
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -152,7 +152,7 @@ Start by asking me for my location. Then, use 'get_weather_current' to give me a
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -144,7 +144,7 @@ Start by asking me for my location. Then, use 'get_weather_current' to give me a
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -152,7 +152,7 @@ Start by asking me for my location. Then, use 'get_weather_current' to give me a
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -138,7 +138,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -107,7 +107,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -67,7 +67,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
voice_id=os.getenv("ELEVENLABS_VOICE_ID", ""),
|
voice_id=os.getenv("ELEVENLABS_VOICE_ID", ""),
|
||||||
)
|
)
|
||||||
|
|
||||||
llm = GoogleLLMOpenAIBetaService(api_key=os.getenv("GEMINI_API_KEY"))
|
llm = GoogleLLMOpenAIBetaService(api_key=os.getenv("GOOGLE_API_KEY"))
|
||||||
# You can aslo register a function_name of None to get all functions
|
# You can aslo register a function_name of None to get all functions
|
||||||
# sent to the same callback with an additional function_name parameter.
|
# sent to the same callback with an additional function_name parameter.
|
||||||
llm.register_function("get_current_weather", fetch_weather_from_api)
|
llm.register_function("get_current_weather", fetch_weather_from_api)
|
||||||
@@ -134,7 +134,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ transport_params = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def run_bot(transport: BaseTransport):
|
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||||
logger.info(f"Starting bot")
|
logger.info(f"Starting bot")
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
@@ -68,9 +68,9 @@ async def run_bot(transport: BaseTransport):
|
|||||||
)
|
)
|
||||||
|
|
||||||
llm = GoogleVertexLLMService(
|
llm = GoogleVertexLLMService(
|
||||||
credentials=os.getenv("GOOGLE_TEST_CREDENTIALS"),
|
credentials=os.getenv("GOOGLE_VERTEX_TEST_CREDENTIALS"),
|
||||||
params=GoogleVertexLLMService.InputParams(
|
params=GoogleVertexLLMService.InputParams(
|
||||||
project_id="<google-project-id>",
|
project_id=os.getenv("GOOGLE_CLOUD_PROJECT_ID"),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
# You can aslo register a function_name of None to get all functions
|
# You can aslo register a function_name of None to get all functions
|
||||||
@@ -140,7 +140,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
logger.info(f"Client disconnected")
|
logger.info(f"Client disconnected")
|
||||||
await task.cancel()
|
await task.cancel()
|
||||||
|
|
||||||
runner = PipelineRunner(handle_sigint=False)
|
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
|
||||||
|
|
||||||
await runner.run(task)
|
await runner.run(task)
|
||||||
|
|
||||||
@@ -148,7 +148,7 @@ async def run_bot(transport: BaseTransport):
|
|||||||
async def bot(runner_args: RunnerArguments):
|
async def bot(runner_args: RunnerArguments):
|
||||||
"""Main bot entry point compatible with Pipecat Cloud."""
|
"""Main bot entry point compatible with Pipecat Cloud."""
|
||||||
transport = await create_transport(runner_args, transport_params)
|
transport = await create_transport(runner_args, transport_params)
|
||||||
await run_bot(transport)
|
await run_bot(transport, runner_args)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user