Updating the heygen examples to use sandbox by default.
This commit is contained in:
@@ -25,6 +25,7 @@ from pipecat.processors.aggregators.llm_response_universal import (
|
|||||||
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.services.google.llm import GoogleLLMService
|
from pipecat.services.google.llm import GoogleLLMService
|
||||||
|
from pipecat.services.heygen.api_liveavatar import LiveAvatarNewSessionRequest
|
||||||
from pipecat.transports.heygen.transport import HeyGenParams, HeyGenTransport, ServiceType
|
from pipecat.transports.heygen.transport import HeyGenParams, HeyGenTransport, ServiceType
|
||||||
|
|
||||||
load_dotenv(override=True)
|
load_dotenv(override=True)
|
||||||
@@ -43,6 +44,12 @@ async def main():
|
|||||||
audio_in_enabled=True,
|
audio_in_enabled=True,
|
||||||
audio_out_enabled=True,
|
audio_out_enabled=True,
|
||||||
),
|
),
|
||||||
|
session_request=LiveAvatarNewSessionRequest(
|
||||||
|
is_sandbox=True,
|
||||||
|
# Sandbox mode only works with this specific avatar
|
||||||
|
# https://docs.liveavatar.com/docs/developing-in-sandbox-mode#sandbox-mode-behaviors
|
||||||
|
avatar_id="dd73ea75-1218-4ef3-92ce-606d5f7fbc0a",
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ 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.services.google.llm import GoogleLLMService
|
from pipecat.services.google.llm import GoogleLLMService
|
||||||
|
from pipecat.services.heygen.api_liveavatar import LiveAvatarNewSessionRequest
|
||||||
from pipecat.services.heygen.client import ServiceType
|
from pipecat.services.heygen.client import ServiceType
|
||||||
from pipecat.services.heygen.video import HeyGenVideoService
|
from pipecat.services.heygen.video import HeyGenVideoService
|
||||||
from pipecat.transports.base_transport import BaseTransport, TransportParams
|
from pipecat.transports.base_transport import BaseTransport, TransportParams
|
||||||
@@ -71,6 +72,12 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
|||||||
api_key=os.getenv("HEYGEN_LIVE_AVATAR_API_KEY"),
|
api_key=os.getenv("HEYGEN_LIVE_AVATAR_API_KEY"),
|
||||||
service_type=ServiceType.LIVE_AVATAR,
|
service_type=ServiceType.LIVE_AVATAR,
|
||||||
session=session,
|
session=session,
|
||||||
|
session_request=LiveAvatarNewSessionRequest(
|
||||||
|
is_sandbox=True,
|
||||||
|
# Sandbox mode only works with this specific avatar
|
||||||
|
# https://docs.liveavatar.com/docs/developing-in-sandbox-mode#sandbox-mode-behaviors
|
||||||
|
avatar_id="dd73ea75-1218-4ef3-92ce-606d5f7fbc0a",
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
messages = [
|
messages = [
|
||||||
|
|||||||
Reference in New Issue
Block a user