File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ agent = Agent(
91
91
We'll set up a simple voice pipeline, using [ ` SingleAgentVoiceWorkflow ` ] [ agents.voice.workflow.SingleAgentVoiceWorkflow ] as the workflow.
92
92
93
93
``` python
94
- from agents.voice import SingleAgentVoiceWorkflow, VoicePipeline,
94
+ from agents.voice import SingleAgentVoiceWorkflow, VoicePipeline
95
95
pipeline = VoicePipeline(workflow = SingleAgentVoiceWorkflow(agent))
96
96
```
97
97
@@ -100,10 +100,13 @@ pipeline = VoicePipeline(workflow=SingleAgentVoiceWorkflow(agent))
100
100
``` python
101
101
import numpy as np
102
102
import sounddevice as sd
103
+ from agents.voice import AudioInput
103
104
104
105
# For simplicity, we'll just create 3 seconds of silence
105
106
# In reality, you'd get microphone data
106
107
audio = np.zeros(24000 * 3 , dtype = np.int16)
108
+ audio_input = AudioInput(buffer = buffer)
109
+
107
110
result = await pipeline.run(audio_input)
108
111
109
112
# Create an audio player using `sounddevice`
You can’t perform that action at this time.
0 commit comments