Skip to content

chore: 取消录音时控制台的日志 #1346

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

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ui/src/components/ai-chat/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,8 @@ const mediaRecorderStatus = ref(true)
// 开始录音
const startRecording = async () => {
try {
// 取消录音控制台日志
Recorder.CLog=function(){}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

整挺好。

mediaRecorderStatus.value = false
handleTimeChange()
mediaRecorder.value = new Recorder({
Expand Down Expand Up @@ -908,7 +910,6 @@ const uploadRecording = async (audioBlob: Blob) => {
const formData = new FormData()
formData.append('file', audioBlob, 'recording.mp3')
applicationApi.postSpeechToText(props.data.id as string, formData, loading).then((response) => {
console.log('上传成功:', response.data)
recorderLoading.value = false
mediaRecorder.value.close()
inputValue.value = typeof response.data === 'string' ? response.data : ''
Expand Down
Loading