diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 379e31465..74a2070fa 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -4,6 +4,10 @@ build: os: ubuntu-22.04 tools: python: '3.12' + apt_packages: + - portaudio19-dev + - python3-dev + - libasound2-dev jobs: pre_build: # Commands to run before the build @@ -15,14 +19,11 @@ build: sphinx: configuration: docs/api/conf.py - fail_on_warning: false # Set to true if you want builds to fail on warnings + fail_on_warning: false python: install: - - requirements: docs/api/requirements-base.txt - # Try to install Riva first, fall back to PlayHT if it fails - - requirements: docs/api/requirements-riva.txt || true - - requirements: docs/api/requirements-playht.txt || true + - requirements: docs/api/requirements.txt - method: pip path: . extra_requirements: @@ -41,7 +42,6 @@ python: - google - grok - groq - - krisp - langchain - livekit - lmnt diff --git a/docs/api/conf.py b/docs/api/conf.py index 51e000cbf..aea83a60b 100644 --- a/docs/api/conf.py +++ b/docs/api/conf.py @@ -44,7 +44,12 @@ autodoc_mock_imports = [ "riva", "livekit", - "pyht", + "pyht", # Base PlayHT package + "pyht.async_client", # PlayHT specific imports + "pyht.client", + "pyht.protos", + "pyht.protos.api_pb2", + "pipecat_ai_playht", # Our PlayHT wrapper "anthropic", "assemblyai", "boto3", @@ -63,13 +68,14 @@ "openpipe", "simli", "soundfile", - # Add these new mocks + # Existing mocks + "pipecat_ai_krisp", "pyaudio", "_tkinter", "tkinter", "daily", "daily_python", - "pydantic.BaseModel", # Mock base pydantic to avoid model conflicts + "pydantic.BaseModel", "pydantic.Field", "pydantic._internal._model_construction", "pydantic._internal._fields", diff --git a/docs/api/requirements-playht.txt b/docs/api/requirements-playht.txt deleted file mode 100644 index 1f0bc24ea..000000000 --- a/docs/api/requirements-playht.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Force specific grpcio version for PlayHT -grpcio>=1.68.0 -pipecat-ai[playht] \ No newline at end of file diff --git a/docs/api/requirements-riva.txt b/docs/api/requirements-riva.txt deleted file mode 100644 index 6bd4c69f9..000000000 --- a/docs/api/requirements-riva.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Force specific grpcio version for Riva -grpcio==1.65.4 -pipecat-ai[riva] \ No newline at end of file diff --git a/docs/api/requirements-base.txt b/docs/api/requirements.txt similarity index 86% rename from docs/api/requirements-base.txt rename to docs/api/requirements.txt index ff397d0ef..2ca71d2ac 100644 --- a/docs/api/requirements-base.txt +++ b/docs/api/requirements.txt @@ -21,7 +21,7 @@ pipecat-ai[gladia] pipecat-ai[google] pipecat-ai[grok] pipecat-ai[groq] -pipecat-ai[krisp] +# pipecat-ai[krisp] # Mocked instead pipecat-ai[langchain] pipecat-ai[livekit] pipecat-ai[lmnt] @@ -31,6 +31,8 @@ pipecat-ai[nim] pipecat-ai[noisereduce] pipecat-ai[openai] pipecat-ai[openpipe] +# pipecat-ai[playht] # Mocked due to grpcio conflict with riva +pipecat-ai[riva] pipecat-ai[silero] pipecat-ai[simli] pipecat-ai[soundfile] diff --git a/docs/api/rtd-test.sh b/docs/api/rtd-test.sh index 87d8880b4..2b2c30d5d 100755 --- a/docs/api/rtd-test.sh +++ b/docs/api/rtd-test.sh @@ -10,20 +10,15 @@ echo "Creating test directory: $TEST_DIR" mkdir -p "$TEST_DIR" cd "$TEST_DIR" -# Create single virtual environment +# Create virtual environment python -m venv venv source venv/bin/activate -echo "Installing base dependencies..." +echo "Installing build dependencies..." pip install --upgrade pip wheel setuptools -pip install -r "$DOCS_DIR/requirements-base.txt" -# Try to install optional dependencies, but don't fail if they don't work -echo "Installing Riva dependencies..." -pip install -r "$DOCS_DIR/requirements-riva.txt" || echo "Failed to install Riva dependencies" - -echo "Installing PlayHT dependencies..." -pip install -r "$DOCS_DIR/requirements-playht.txt" || echo "Failed to install PlayHT dependencies" +echo "Installing documentation dependencies..." +pip install -r "$DOCS_DIR/requirements.txt" echo "Building documentation..." cd "$DOCS_DIR" @@ -31,6 +26,13 @@ sphinx-build -b html . "_build/html" echo "Build complete. Check _build/html directory for output." +# Print summary +echo -e "\n=== Build Summary ===" +echo "Documentation: $DOCS_DIR/_build/html" +echo "Test environment: $TEST_DIR" +echo -e "\nTo view the documentation:" +echo "open $DOCS_DIR/_build/html/index.html" + # Print installed packages for verification -echo "Installed packages:" -pip freeze \ No newline at end of file +echo -e "\n=== Installed Packages ===" +pip freeze | grep -E "sphinx|pipecat" \ No newline at end of file diff --git a/src/pipecat/services/riva.py b/src/pipecat/services/riva.py index f57372775..6be722d49 100644 --- a/src/pipecat/services/riva.py +++ b/src/pipecat/services/riva.py @@ -8,7 +8,7 @@ from typing import AsyncGenerator, Optional from loguru import logger -from pydantic.main import BaseModel +from pydantic import BaseModel from pipecat.frames.frames import ( CancelFrame,