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: '正在录音,松开结束',
|
||||
startRecordTip: '点击开始录音',
|
||||
voiceInputFailed: '语音输入失败',
|
||||
// PR-FRONTEND-VOICE-INPUT (2026-09-24): 按住说话手势 + 录音异常文案
|
||||
holdToTalk: '按住说话',
|
||||
releaseToSend: '松开发送',
|
||||
releaseToCancel: '松开取消',
|
||||
slideUpToCancel: '↑ 上滑取消',
|
||||
slideUpToCancelHint: '↑ 松开取消',
|
||||
voiceStartFailed: '无法开始录音',
|
||||
voiceStopFailed: '录音失败,请重试',
|
||||
voiceNotSupported: '当前平台不支持语音输入',
|
||||
// PR-FRONTEND-VOICE-INPUT (2026-09-24): 上传失败 (录音产物上传到云端)
|
||||
uploadFailed: '上传失败',
|
||||
uploadFailedWithReason: '上传失败:{reason}',
|
||||
|
||||
// ====== index.vue - 菜单 ======
|
||||
menuClearChat: '清空聊天',
|
||||
|
||||
Reference in New Issue
Block a user