Repository navigation
Feature/vapi - #1
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAdds a real-time voice-to-WS pipeline and audio-to-MIDI conversion, a microphone hum recorder, and a remote computer-use agent to upload/play a MIDI in BandLab. Introduces Node/ESM setup for Vapi server SDK, pins Python version, and writes detected instrument to a text file. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Mic as Microphone
participant Client as listen.py
participant API as Vapi API
participant WS as Assistant WS
participant SPK as Speaker
participant Post as Post-Process
User->>Client: Run main()
Client->>API: POST create call (API_KEY, ASSISTANT_ID)
API-->>Client: websocket_url
Client->>WS: Connect
par Stream audio up
Mic->>Client: PCM chunks
Client->>WS: send(binary audio)
and Receive responses
WS-->>Client: audio/text events
Client->>SPK: play audio frames
Client->>Client: buffer text
alt Instrument phrase detected
Client->>Client: extract instrument
Client->>Client: write instrument.txt
end
alt Speech status == stopped
WS-->>Client: status: stopped
Client->>WS: close
end
end
Client->>Post: record_hum()
Post-->>Client: hum.wav
Client->>Post: convert_to_midi(hum.wav)
Post-->>Client: hum_basic_pitch.mid
Client-->>User: Done
sequenceDiagram
autonumber
actor Dev as Operator
participant FS as Local FS
participant CUA as cua.py
participant Cloud as Remote Computer
participant Agent as ComputerAgent
participant App as BandLab Studio
Dev->>CUA: computer_use_agent(midi_file, instrument)
CUA->>FS: Read MIDI bytes
CUA->>Cloud: Connect/start interface
CUA->>Cloud: Upload ~/Downloads/midi-file-name.midi
CUA->>Agent: Configure (model, prompts)
loop Tasks
Agent->>Cloud: UI actions (open app, import, select instrument)
Cloud-->>Agent: Screens/feedback
Agent-->>CUA: Streamed updates
end
Agent-->>CUA: Task complete
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (4)
📒 Files selected for processing (8)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
New Features
Chores