-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(deployed-chat): voice mode #2358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryFixed voice mode authentication failure by replacing hybrid auth with chat-specific authentication in the TTS proxy endpoint, and enhanced session security by including password hash in auth tokens to invalidate sessions on password change. Key Changes:
Non-critical changes:
Confidence Score: 3/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant VoiceInterface
participant Chat
participant AudioHook
participant TTSProxy
participant DB
participant ElevenLabs
User->>Chat: Authenticate with password/email
Chat->>DB: Validate credentials
DB-->>Chat: Auth successful
Chat->>Chat: setChatAuthCookie(chatId, authType, password)
Note over Chat: Cookie includes password hash for invalidation
User->>VoiceInterface: Start voice mode
VoiceInterface->>Chat: Send voice transcript
Chat->>AudioHook: streamTextToAudio(text, voiceId, chatId)
AudioHook->>TTSProxy: POST /api/proxy/tts/stream
Note over AudioHook,TTSProxy: Includes chatId in request body
TTSProxy->>DB: Query chat record (id, authType, password)
DB-->>TTSProxy: Return chat data
TTSProxy->>TTSProxy: validateChatAuth(request, chatId)
Note over TTSProxy: Check authType and validate cookie
TTSProxy->>TTSProxy: validateAuthToken(cookie, chatId, password)
Note over TTSProxy: Verify password hash matches
alt Auth valid
TTSProxy->>ElevenLabs: Request TTS stream
ElevenLabs-->>TTSProxy: Audio stream
TTSProxy-->>AudioHook: Audio stream
AudioHook-->>VoiceInterface: Play audio
VoiceInterface-->>User: Hear response
else Auth invalid
TTSProxy-->>AudioHook: 401 Unauthorized
AudioHook-->>User: Error
end
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 files reviewed, 2 comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8 files reviewed, 1 comment
MuhammadMustafa770
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
Voice mode broken because it fails auth check.
Type of Change
Testing
Tested manually.
Checklist