Search

CN-122001974-A - Audio data processing method and electronic equipment

CN122001974ACN 122001974 ACN122001974 ACN 122001974ACN-122001974-A

Abstract

The application relates to the technical field of terminal equipment and provides a processing method of audio data and electronic equipment, wherein the method comprises the steps of detecting that an audio module of the electronic equipment switches an audio routing mode; under the condition that the audio routing mode is switched to the target mode, acquiring first audio data, wherein the target mode comprises any one of a call mode and an audio playing mode, the first audio data comprises audio received and sent by an audio module after the audio routing mode is switched to the target mode, and converting the first audio data into text based on an audio transcription function of the electronic equipment. According to the audio data processing method provided by the application, when the audio module of the electronic equipment switches the audio routing mode to the target mode for receiving and transmitting audio, the audio received and transmitted by the electronic equipment can be obtained, and the obtained first audio data is converted into the text based on the built-in audio transcription function of the electronic equipment, so that the subsequent checking of a user is facilitated, and the efficiency of the electronic equipment for reviewing the audio data is improved.

Inventors

  • LI CHENTAO

Assignees

  • 荣耀终端股份有限公司

Dates

Publication Date
20260508
Application Date
20241107

Claims (11)

  1. 1. A method of processing audio data, comprising: detecting that an audio module of the electronic equipment switches an audio routing mode; under the condition that the audio routing mode is switched to a target mode, acquiring first audio data, wherein the target mode comprises any one of a call mode and an audio playing mode, and the first audio data comprises audio received and sent by the audio module after the audio routing mode is switched to the target mode; The first audio data is converted to text based on an audio transcription function of the electronic device.
  2. 2. The method for processing audio data according to claim 1, wherein, The converting the first audio data into text based on the audio transcription function of the electronic device includes: acquiring the state of the audio transcription function; and converting the first audio data into text based on the audio transcription function when the state of the audio transcription function is on.
  3. 3. The method for processing audio data according to claim 1, wherein, The converting the first audio data into text based on the audio transcription function of the electronic device includes: when the state of the audio transcription function is closed, responding to the first audio data acquired by the electronic equipment, and displaying a first transcription control on a display screen of the electronic equipment; Responsive to the first transcription control being triggered, the audio transcription function is turned on and the first audio data is converted to text based on the audio transcription function.
  4. 4. The method for processing audio data according to claim 1, wherein, The converting the first audio data into text based on the audio transcription function of the electronic device includes: Caching the first audio data under the condition that the state of the audio transcription function is closed; Displaying a second transcription control on a display screen of the electronic device if the audio routing mode ends the target mode; Responsive to the second transcription control being triggered, the audio transcription function is turned on, and the cached first audio data is converted to text based on the audio transcription function.
  5. 5. A method for processing audio data according to any one of claims 1 to 4, After the converting the first audio data to text based on the audio transcription function of the electronic device, the method further comprises: Generating a transcription file corresponding to the first audio data according to the text; And establishing a transcription file list based on the acquisition time of the first audio data, wherein the transcription file list comprises at least one transcription file.
  6. 6. The method for processing audio data according to claim 5, wherein, After the creating of the transcription file list based on the acquisition time of the first audio data, the method further includes: Under the condition that the display screen of the electronic equipment displays the transcribed file list, responding to the selection operation of a user on the transcribed file list, determining a first transcribed file, wherein the first transcribed file is the transcribed file corresponding to the selection operation in the transcribed file list; And responding to the first semantic information input by the user, and searching a text corresponding to the first semantic information in the first transcription file.
  7. 7. The method for processing audio data according to claim 6, wherein, After searching the text corresponding to the first semantic information in the first transcription file in response to the first semantic information input by the user, the method further comprises: storing the first audio data under the condition that the recording function of the electronic equipment is started to obtain a first audio file; Determining a second audio file based on the first transcription file, wherein the second audio file is a first audio file corresponding to the first transcription file; And searching the audio data corresponding to the first semantic information in the second audio file.
  8. 8. The method for processing audio data according to claim 1, wherein, After the converting the first audio data to text based on the audio transcription function of the electronic device, the method further comprises: acquiring the state of the recording function of the electronic equipment; and deleting the first audio data under the condition that the recording function is closed.
  9. 9. A method for processing audio data according to claim 2 or 3, wherein, After the converting the first audio data to text based on the audio transcription function of the electronic device, the method further comprises: Generating subtitles corresponding to the text; Displaying the subtitles corresponding to the second audio data on a display screen of the electronic device according to the play sequence of the second audio data, wherein the second audio data comprises audio received by the audio module after the audio routing mode is switched to the target mode.
  10. 10. The method for processing audio data according to claim 9, wherein, After the displaying the subtitles corresponding to the second audio data on a display screen of the electronic device according to the play order of the second audio data, the method further comprises: Acquiring the state of a subtitle storage function of the electronic equipment; And generating a subtitle file based on the text and the subtitle under the condition that the subtitle storing function is started.
  11. 11. An electronic device comprising an audio module, a memory and one or more processors, the audio module, the memory coupled to the processors, wherein the memory has stored therein computer program code comprising computer instructions that, when executed by the processors, cause the electronic device to perform the method of processing audio data as recited in any of claims 1-10.

Description

Audio data processing method and electronic equipment Technical Field The present application relates to the field of terminal devices, and in particular, to a method for processing audio data and an electronic device. Background Voice call is a function commonly existing in mobile terminals today, and users can realize voice call between each other by using the mobile terminals. Meanwhile, the mobile terminal generally has a recording function, and can record a voice call initiated by a system application of the electronic equipment so as to help a user record call content. With the development of communication technology, part of three-party applications in the mobile terminal, such as online chat applications, conference applications, and other application programs, can call the audio of the mobile terminal, so as to realize a voice call function. However, the mobile terminal cannot record the voice call realized based on the three-party application call directly, which is not beneficial to the user to review the call content after the call is ended, and the electronic equipment has the problem that the recorded content is inconvenient to view when recording the voice call for a long time, so that the convenience of the user for recording the call content is affected. Disclosure of Invention The embodiment of the application provides a processing method of audio data and electronic equipment, which are used for solving the problems that the electronic equipment cannot directly record a call realized by partial application and the efficiency is low when the call content is reviewed after the call recording is finished. In a first aspect, an embodiment of the present application provides a method for processing audio data, including detecting that an audio module of an electronic device switches an audio routing mode, acquiring first audio data when the audio routing mode is switched to a target mode, where the target mode includes any one of a call mode and an audio play mode, the first audio data includes audio received and transmitted by the audio module after the audio routing mode is switched to the target mode, and converting the first audio data into text based on an audio transcription function of the electronic device. According to the technical scheme provided by the application, when the audio frequency module of the electronic equipment switches the audio frequency routing mode to the target mode for receiving and transmitting audio frequency, the audio frequency received and transmitted by the electronic equipment can be obtained, and the obtained first audio frequency data is converted into the text based on the built-in audio frequency transcription function of the electronic equipment, so that the subsequent check of a user is facilitated, and the recall efficiency of the audio frequency data is improved. In one possible implementation, converting the first audio data to text based on the audio transcription function of the electronic device includes obtaining a state of the audio transcription function, and converting the first audio data to text based on the audio transcription function if the state of the audio transcription function is on. Therefore, the operation mode of the first audio data can be determined according to the on-off state of the audio transcription function, and the flexibility of audio data processing is improved. In one possible implementation, converting the first audio data into text based on the audio transcription function of the electronic device includes, in response to the electronic device acquiring the first audio data when the state of the audio transcription function is off, displaying a first transcription control on a display screen of the electronic device, in response to the first transcription control being triggered, turning on the audio transcription function, and converting the first audio data into text based on the audio transcription function. In this way, the audio transcription function can be started in response to the operation of the user during the period that the audio routing mode is in the target mode, so that the processing of the first audio data in the process of receiving and transmitting the audio data by the electronic device is realized. In one possible implementation, converting the first audio data into text based on the audio transcription function of the electronic device includes caching the first audio data if the state of the audio transcription function is off, displaying a second transcription control on a display screen of the electronic device if the audio routing mode ends the target mode, turning on the audio transcription function in response to the second transcription control being triggered, and converting the cached first audio data into text based on the audio transcription function. Thus, after the first audio data is obtained, the electronic equipment responds to the instruction input by the user to uniformly