Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8d906f8

Browse files
authored
Fix code examples in voice pipeline quickstart docs (openai#277)
2 parents 486b4e8 + 3da3b51 commit 8d906f8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/voice/quickstart.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,13 @@ pipeline = VoicePipeline(workflow=SingleAgentVoiceWorkflow(agent))
100100
```python
101101
import numpy as np
102102
import 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
106107
audio = np.zeros(24000 * 3, dtype=np.int16)
108+
audio_input = AudioInput(buffer=buffer)
109+
107110
result = await pipeline.run(audio_input)
108111

109112
# Create an audio player using `sounddevice`

0 commit comments

Comments
 (0)