Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new voice assistant feature to the application, including backend API support and frontend integration. The most important changes include adding the
voice_mode_router
, creating a new WebSocket endpoint for voice interactions, and implementing the frontend components for voice recording and playback.Backend Changes:
src/backend/base/langflow/api/router.py
: Addedvoice_mode_router
to the main API router. [1] [2]src/backend/base/langflow/api/v1/__init__.py
: Imported and registeredvoice_mode_router
. [1] [2]src/backend/base/langflow/api/v1/voice_mode.py
: Created a new module for handling voice mode interactions, including WebSocket endpoints and functions for managing voice sessions.Frontend Changes:
src/frontend/src/components/VoiceAssistant/index.tsx
: Implemented theVoiceAssistant
component, which handles audio recording, WebSocket communication, and playback.src/frontend/src/components/VoiceAssistant/streamProcessor.ts
: Added anAudioWorkletProcessor
for processing audio streams.src/frontend/src/components/VoiceAssistant/utils.ts
: Added utility functions for converting base64 audio data to Float32Array.src/frontend/src/modals/IOModal/components/chatView/chatInput/newChatInput.tsx
: Integrated theVoiceAssistant
component into the chat input view. [1] [2]src/frontend/src/modals/IOModal/index.tsx
: Added theVoiceAssistant
component to the I/O modal. [1] [2]