feat: implement voice input feature with press-and-hold gesture
- Added new language strings for voice input functionality in English and Chinese. - Updated manifest to include microphone permission for voice recording. - Enhanced ai-chat-message component to support voice input with visual feedback for recording and cancellation gestures. - Integrated voice recorder functionality in ai-chat-voice-panel, allowing users to record audio with a maximum duration of 60 seconds. - Implemented audio handling logic to upload recorded audio files and display them in the chat interface. - Added error handling for voice recording failures and user notifications. - Updated styles for improved UI/UX during voice recording interactions.
This commit is contained in:
@@ -136,6 +136,18 @@ export const lang = {
|
||||
recordingTip: 'Recording, release to end',
|
||||
startRecordTip: 'Tap to start recording',
|
||||
voiceInputFailed: 'Voice input failed',
|
||||
// PR-FRONTEND-VOICE-INPUT (2026-09-24): press-and-hold gesture + recorder error messages
|
||||
holdToTalk: 'Hold to talk',
|
||||
releaseToSend: 'Release to send',
|
||||
releaseToCancel: 'Release to cancel',
|
||||
slideUpToCancel: '↑ Slide up to cancel',
|
||||
slideUpToCancelHint: '↑ Release to cancel',
|
||||
voiceStartFailed: 'Cannot start recording',
|
||||
voiceStopFailed: 'Recording failed, please try again',
|
||||
voiceNotSupported: 'Voice input is not supported on this platform',
|
||||
// PR-FRONTEND-VOICE-INPUT (2026-09-24): upload error (recorder result -> cloud)
|
||||
uploadFailed: 'Upload failed',
|
||||
uploadFailedWithReason: 'Upload failed: {reason}',
|
||||
|
||||
// ====== index.vue - Menu ======
|
||||
menuClearChat: 'Clear Chat',
|
||||
|
||||
Reference in New Issue
Block a user