File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ agent = Agent(
9191We'll set up a simple voice pipeline, using [ ` SingleAgentVoiceWorkflow ` ] [ agents.voice.workflow.SingleAgentVoiceWorkflow ] as the workflow.
9292
9393``` python
94- from agents.voice import SingleAgentVoiceWorkflow, VoicePipeline,
94+ from agents.voice import SingleAgentVoiceWorkflow, VoicePipeline
9595pipeline = VoicePipeline(workflow = SingleAgentVoiceWorkflow(agent))
9696```
9797
@@ -100,10 +100,13 @@ pipeline = VoicePipeline(workflow=SingleAgentVoiceWorkflow(agent))
100100``` python
101101import numpy as np
102102import sounddevice as sd
103+ from agents.voice import AudioInput
103104
104105# For simplicity, we'll just create 3 seconds of silence
105106# In reality, you'd get microphone data
106107audio = np.zeros(24000 * 3 , dtype = np.int16)
108+ audio_input = AudioInput(buffer = buffer)
109+
107110result = await pipeline.run(audio_input)
108111
109112# Create an audio player using `sounddevice`
You can’t perform that action at this time.
0 commit comments