flat: 暂存
This commit is contained in:
@@ -113,7 +113,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="chat-item self" v-if="isRecording">
|
||||
<view class="message">{{ recognizedText }} {{ lastFinalText }}</view>
|
||||
<!-- <view class="message">{{ recognizedText }} {{ lastFinalText }}</view> -->
|
||||
<view class="message">{{ recognizedText }}</view>
|
||||
</view>
|
||||
<view v-if="isTyping" class="self">
|
||||
<text class="message msg-loading">
|
||||
@@ -268,14 +269,18 @@ import AudioWave from './AudioWave.vue';
|
||||
import WaveDisplay from './WaveDisplay.vue';
|
||||
import FileIcon from './fileIcon.vue';
|
||||
import FileText from './fileText.vue';
|
||||
import { useAudioRecorder } from '@/hook/useRealtimeRecorder.js';
|
||||
import { useTTSPlayer } from '@/hook/useTTSPlayer.js';
|
||||
// 系统功能hook和阿里云hook
|
||||
// import { useAudioRecorder } from '@/hook/useRealtimeRecorder.js';
|
||||
import { useAudioRecorder } from '@/hook/useSystemSpeechReader.js';
|
||||
// import { useTTSPlayer } from '@/hook/useTTSPlayer.js';
|
||||
import { useTTSPlayer } from '@/hook/useSystemPlayer.js';
|
||||
// 全局
|
||||
const { $api, navTo, throttle } = inject('globalFunction');
|
||||
const emit = defineEmits(['onConfirm']);
|
||||
const { messages, isTyping, textInput, chatSessionID } = storeToRefs(useChatGroupDBStore());
|
||||
import successIcon from '@/static/icon/success.png';
|
||||
// hook
|
||||
// 语音识别
|
||||
const {
|
||||
isRecording,
|
||||
startRecording,
|
||||
@@ -286,7 +291,7 @@ const {
|
||||
recognizedText,
|
||||
lastFinalText,
|
||||
} = useAudioRecorder();
|
||||
|
||||
// 语音合成
|
||||
const { speak, pause, resume, isSpeaking, isPaused, cancelAudio } = useTTSPlayer(config.speechSynthesis);
|
||||
|
||||
// state
|
||||
@@ -629,6 +634,7 @@ function readMarkdown(value, index) {
|
||||
if (isPaused.value) {
|
||||
resume();
|
||||
} else {
|
||||
console.log(value, speechIndex.value, index, isPaused.value)
|
||||
speak(value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user