Provide new settings in OpenAI Realtime example
This commit is contained in:
committed by
Mark Backman
parent
541a4b6063
commit
41688205be
@@ -26,7 +26,8 @@ from pipecat.services.openai_realtime_beta import (
|
|||||||
InputAudioTranscription,
|
InputAudioTranscription,
|
||||||
OpenAIRealtimeBetaLLMService,
|
OpenAIRealtimeBetaLLMService,
|
||||||
SessionProperties,
|
SessionProperties,
|
||||||
TurnDetection,
|
SemanticTurnDetection,
|
||||||
|
InputAudioNoiseReduction
|
||||||
)
|
)
|
||||||
from pipecat.transports.services.daily import DailyParams, DailyTransport
|
from pipecat.transports.services.daily import DailyParams, DailyTransport
|
||||||
|
|
||||||
@@ -91,9 +92,10 @@ async def main():
|
|||||||
input_audio_transcription=InputAudioTranscription(),
|
input_audio_transcription=InputAudioTranscription(),
|
||||||
# Set openai TurnDetection parameters. Not setting this at all will turn it
|
# Set openai TurnDetection parameters. Not setting this at all will turn it
|
||||||
# on by default
|
# on by default
|
||||||
turn_detection=TurnDetection(silence_duration_ms=1000),
|
turn_detection=SemanticTurnDetection(),
|
||||||
# Or set to False to disable openai turn detection and use transport VAD
|
# Or set to False to disable openai turn detection and use transport VAD
|
||||||
# turn_detection=False,
|
# turn_detection=False,
|
||||||
|
input_audio_noise_reduction=InputAudioNoiseReduction(type='near_field'),
|
||||||
# tools=tools,
|
# tools=tools,
|
||||||
instructions="""Your knowledge cutoff is 2023-10. You are a helpful and friendly AI.
|
instructions="""Your knowledge cutoff is 2023-10. You are a helpful and friendly AI.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user