a basic duplex agent is built
This commit is contained in:
@@ -269,6 +269,15 @@ class MicrophoneClient:
|
||||
print("← User speech detected")
|
||||
elif event_type == "silence":
|
||||
print("← User silence detected")
|
||||
elif event_type == "transcript":
|
||||
# Display user speech transcription
|
||||
text = event.get("text", "")
|
||||
is_final = event.get("isFinal", False)
|
||||
if is_final:
|
||||
print(f"← You said: {text}")
|
||||
else:
|
||||
# Interim result - show with indicator
|
||||
print(f"← [listening] {text}", end="\r")
|
||||
elif event_type == "trackStart":
|
||||
print("← Bot started speaking")
|
||||
# Clear any old audio in buffer
|
||||
|
||||
Reference in New Issue
Block a user