diff --git a/.readthedocs.yaml b/.readthedocs.yaml index ea03b508e..e4f64ce91 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,10 +9,6 @@ build: # Commands to run before the build - python -m pip install --upgrade pip - pip install wheel setuptools - post_create_environment: - # Install system dependencies required by some packages - - apt-get update - - apt-get install -y portaudio19-dev python3-pyaudio post_build: # Commands to run after the build - echo "Build completed" @@ -36,6 +32,7 @@ python: - azure - canonical - cartesia + - daily - deepgram - elevenlabs - fal @@ -48,6 +45,7 @@ python: - langchain - livekit - lmnt + - local - moondream - nim - noisereduce @@ -64,14 +62,12 @@ formats: - epub - htmlzip -# Cache dependencies to speed up builds search: ranking: api/*: 5 getting-started/*: 4 guides/*: 3 -# Configure submodules if needed submodules: include: all recursive: true diff --git a/docs/api/README.md b/docs/api/README.md index 22b62d45e..392430071 100644 --- a/docs/api/README.md +++ b/docs/api/README.md @@ -7,7 +7,7 @@ This directory contains the source files for auto-generating Pipecat's server AP 1. Install documentation dependencies: ```bash -pip install -r requirements.txt +pip install -r requirements-base.txt requirements-playht.txt requirements-riva.txt ``` 2. Make the build scripts executable: diff --git a/docs/api/conf.py b/docs/api/conf.py index ad969df8c..2744ded19 100644 --- a/docs/api/conf.py +++ b/docs/api/conf.py @@ -63,6 +63,16 @@ autodoc_mock_imports = [ "openpipe", "simli", "soundfile", + # Add these new mocks + "pyaudio", + "_tkinter", + "tkinter", + "daily", + "daily_python", + "pydantic.BaseModel", # Mock base pydantic to avoid model conflicts + "pydantic.Field", + "pydantic._internal._model_construction", + "pydantic._internal._fields", ] # HTML output settings @@ -87,19 +97,40 @@ def verify_modules(): ], "serializers": ["livekit"], "vad": ["silero", "vad_analyzer"], + "transports": { + "services": ["daily", "livekit"], + "local": ["audio", "tk"], + "network": ["fastapi_websocket", "websocket_server"], + }, } missing = [] for category, modules in required_modules.items(): - for module in modules: - try: - __import__(f"pipecat.{category}.{module}") - logger.info(f"Successfully imported pipecat.{category}.{module}") - except ImportError as e: - missing.append(f"pipecat.{category}.{module}") - logger.warning( - f"Optional module not available: pipecat.{category}.{module} - {str(e)}" - ) + if isinstance(modules, dict): + # Handle nested structure + for subcategory, submodules in modules.items(): + for module in submodules: + try: + __import__(f"pipecat.{category}.{subcategory}.{module}") + logger.info( + f"Successfully imported pipecat.{category}.{subcategory}.{module}" + ) + except (ImportError, TypeError, NameError) as e: + missing.append(f"pipecat.{category}.{subcategory}.{module}") + logger.warning( + f"Optional module not available: pipecat.{category}.{subcategory}.{module} - {str(e)}" + ) + else: + # Handle flat structure + for module in modules: + try: + __import__(f"pipecat.{category}.{module}") + logger.info(f"Successfully imported pipecat.{category}.{module}") + except (ImportError, TypeError, NameError) as e: + missing.append(f"pipecat.{category}.{module}") + logger.warning( + f"Optional module not available: pipecat.{category}.{module} - {str(e)}" + ) if missing: logger.warning(f"Some optional modules are not available: {missing}") @@ -167,10 +198,8 @@ def setup(app): logger.info(f"Source directory: {source_dir}") excludes = [ + str(project_root / "src/pipecat/pipeline/to_be_updated"), str(project_root / "src/pipecat/processors/gstreamer"), - str(project_root / "src/pipecat/transports/network"), - str(project_root / "src/pipecat/transports/services"), - str(project_root / "src/pipecat/transports/local"), str(project_root / "src/pipecat/services/to_be_updated"), "**/test_*.py", "**/tests/*.py", @@ -179,12 +208,13 @@ def setup(app): try: main( [ - "-f", - "-e", - "-M", - "--no-toc", - "--separate", - "--module-first", + "-f", # Force overwriting + "-e", # Don't generate empty files + "-M", # Put module documentation before submodule documentation + "--no-toc", # Don't create a table of contents file + "--separate", # Put documentation for each module in its own page + "--module-first", # Module documentation before submodule documentation + "--implicit-namespaces", # Added: Handle implicit namespace packages "-o", output_dir, source_dir, @@ -195,7 +225,7 @@ def setup(app): logger.info("API documentation generated successfully!") # Process generated RST files to update titles - for rst_file in Path(output_dir).glob("*.rst"): + for rst_file in Path(output_dir).glob("**/*.rst"): # Changed to recursive glob content = rst_file.read_text() lines = content.split("\n") diff --git a/docs/api/index.rst b/docs/api/index.rst index a8cba911d..f4773eddc 100644 --- a/docs/api/index.rst +++ b/docs/api/index.rst @@ -22,7 +22,6 @@ Core Components * :mod:`Frames ` * :mod:`Processors ` * :mod:`Pipeline ` -* :mod:`Services ` Audio Processing ~~~~~~~~~~~~~~~~ @@ -30,10 +29,18 @@ Audio Processing * :mod:`Audio ` * :mod:`VAD ` +Services +~~~~~~~~ + +* :mod:`Services ` + Transport & Serialization ~~~~~~~~~~~~~~~~~~~~~~~~~ * :mod:`Transports ` + * :mod:`Local ` + * :mod:`Network ` + * :mod:`Services ` * :mod:`Serializers ` Utilities @@ -46,7 +53,7 @@ Utilities * :mod:`Utils ` .. toctree:: - :maxdepth: 2 + :maxdepth: 3 :caption: API Reference :hidden: diff --git a/docs/api/requirements-base.txt b/docs/api/requirements-base.txt index 6739a1962..ff397d0ef 100644 --- a/docs/api/requirements-base.txt +++ b/docs/api/requirements-base.txt @@ -12,6 +12,7 @@ pipecat-ai[aws] pipecat-ai[azure] pipecat-ai[canonical] pipecat-ai[cartesia] +pipecat-ai[daily] pipecat-ai[deepgram] pipecat-ai[elevenlabs] pipecat-ai[fal] @@ -24,6 +25,7 @@ pipecat-ai[krisp] pipecat-ai[langchain] pipecat-ai[livekit] pipecat-ai[lmnt] +pipecat-ai[local] pipecat-ai[moondream] pipecat-ai[nim] pipecat-ai[noisereduce]