Merge pull request #800 from pipecat-ai/mb/autogen-docs
Auto-generate API reference docs
This commit is contained in:
@@ -8,7 +8,7 @@ from abc import abstractmethod
|
||||
from enum import Enum
|
||||
|
||||
from loguru import logger
|
||||
from pydantic.main import BaseModel
|
||||
from pydantic import BaseModel
|
||||
|
||||
from pipecat.audio.utils import calculate_audio_volume, exp_smoothing
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import uuid
|
||||
from typing import AsyncGenerator, List, Optional, Union
|
||||
|
||||
from loguru import logger
|
||||
from pydantic.main import BaseModel
|
||||
from pydantic import BaseModel
|
||||
|
||||
from pipecat.frames.frames import (
|
||||
BotStoppedSpeakingFrame,
|
||||
|
||||
@@ -10,7 +10,7 @@ from typing import AsyncGenerator, Optional
|
||||
|
||||
import aiohttp
|
||||
from loguru import logger
|
||||
from pydantic.main import BaseModel
|
||||
from pydantic import BaseModel
|
||||
|
||||
from pipecat.frames.frames import (
|
||||
CancelFrame,
|
||||
|
||||
@@ -22,14 +22,6 @@ class NimLLMService(OpenAILLMService):
|
||||
base_url (str, optional): The base URL for NIM API. Defaults to "https://integrate.api.nvidia.com/v1"
|
||||
model (str, optional): The model identifier to use. Defaults to "nvidia/llama-3.1-nemotron-70b-instruct"
|
||||
**kwargs: Additional keyword arguments passed to OpenAILLMService
|
||||
|
||||
Example:
|
||||
```python
|
||||
service = NimLLMService(
|
||||
api_key="your-api-key",
|
||||
model="nvidia/llama-3.1-nemotron-70b-instruct"
|
||||
)
|
||||
```
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
|
||||
@@ -379,14 +379,25 @@ class OpenAIImageGenService(ImageGenService):
|
||||
|
||||
|
||||
class OpenAITTSService(TTSService):
|
||||
"""This service uses the OpenAI TTS API to generate audio from text.
|
||||
The returned audio is PCM encoded at 24kHz. When using the DailyTransport, set the sample rate in the DailyParams accordingly:
|
||||
```
|
||||
"""OpenAI Text-to-Speech service that generates audio from text.
|
||||
|
||||
This service uses the OpenAI TTS API to generate PCM-encoded audio at 24kHz.
|
||||
When using with DailyTransport, configure the sample rate in DailyParams
|
||||
as shown below:
|
||||
|
||||
DailyParams(
|
||||
audio_out_enabled=True,
|
||||
audio_out_sample_rate=24_000,
|
||||
)
|
||||
```
|
||||
|
||||
Args:
|
||||
api_key: OpenAI API key. Defaults to None.
|
||||
voice: Voice ID to use. Defaults to "alloy".
|
||||
model: TTS model to use ("tts-1" or "tts-1-hd"). Defaults to "tts-1".
|
||||
sample_rate: Output audio sample rate in Hz. Defaults to 24000.
|
||||
**kwargs: Additional keyword arguments passed to TTSService.
|
||||
|
||||
The service returns PCM-encoded audio at the specified sample rate.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
|
||||
@@ -14,7 +14,7 @@ from typing import AsyncGenerator, Optional
|
||||
import aiohttp
|
||||
import websockets
|
||||
from loguru import logger
|
||||
from pydantic.main import BaseModel
|
||||
from pydantic import BaseModel
|
||||
|
||||
from pipecat.frames.frames import (
|
||||
BotStoppedSpeakingFrame,
|
||||
|
||||
@@ -11,7 +11,7 @@ from abc import ABC, abstractmethod
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import ConfigDict
|
||||
from pydantic.main import BaseModel
|
||||
from pydantic import BaseModel
|
||||
|
||||
from pipecat.audio.filters.base_audio_filter import BaseAudioFilter
|
||||
from pipecat.audio.mixers.base_audio_mixer import BaseAudioMixer
|
||||
|
||||
@@ -12,7 +12,7 @@ import typing
|
||||
import wave
|
||||
|
||||
from typing import Awaitable, Callable
|
||||
from pydantic.main import BaseModel
|
||||
from pydantic import BaseModel
|
||||
|
||||
from pipecat.frames.frames import (
|
||||
Frame,
|
||||
|
||||
@@ -10,7 +10,7 @@ import time
|
||||
import wave
|
||||
|
||||
from typing import Awaitable, Callable
|
||||
from pydantic.main import BaseModel
|
||||
from pydantic import BaseModel
|
||||
|
||||
from pipecat.frames.frames import (
|
||||
CancelFrame,
|
||||
|
||||
Reference in New Issue
Block a user