chore: 取消录音时控制台的日志
This commit is contained in:
parent
e253637ae3
commit
68a0098445
@ -831,6 +831,8 @@ const mediaRecorderStatus = ref(true)
|
|||||||
// 开始录音
|
// 开始录音
|
||||||
const startRecording = async () => {
|
const startRecording = async () => {
|
||||||
try {
|
try {
|
||||||
|
// 取消录音控制台日志
|
||||||
|
Recorder.CLog=function(){}
|
||||||
mediaRecorderStatus.value = false
|
mediaRecorderStatus.value = false
|
||||||
handleTimeChange()
|
handleTimeChange()
|
||||||
mediaRecorder.value = new Recorder({
|
mediaRecorder.value = new Recorder({
|
||||||
@ -908,7 +910,6 @@ const uploadRecording = async (audioBlob: Blob) => {
|
|||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
formData.append('file', audioBlob, 'recording.mp3')
|
formData.append('file', audioBlob, 'recording.mp3')
|
||||||
applicationApi.postSpeechToText(props.data.id as string, formData, loading).then((response) => {
|
applicationApi.postSpeechToText(props.data.id as string, formData, loading).then((response) => {
|
||||||
console.log('上传成功:', response.data)
|
|
||||||
recorderLoading.value = false
|
recorderLoading.value = false
|
||||||
mediaRecorder.value.close()
|
mediaRecorder.value.close()
|
||||||
inputValue.value = typeof response.data === 'string' ? response.data : ''
|
inputValue.value = typeof response.data === 'string' ? response.data : ''
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user