Voice recording method and apparatus, electronic device, and storage medium
Patent Information
- Application Number
- PCT/CN2024/088407
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-20
- Filing Date
- 2024-04-17
- Publication Date
- 2024-10-24
AI Technical Summary
In electronic devices, users fail to press and hold the voice recording control in time while chatting, resulting in the problem of missing recorded voice.
When it is detected that there is a voice recording control in the current interface, the first voice is recorded first, and after receiving the user's input, the recording of the first voice is stopped and the second voice is started to be recorded, thereby combining the first voice and the second voice. Processed to get the complete target speech.
This avoids the loss of voice caused by the user not triggering the recording control in time, ensuring the integrity of voice recording.
Smart Images

Figure CN2024088407_24102024_PF_FP_ABST
Abstract
Description
Voice recording method, device, electronic device and storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese patent application number 202310433734.8 filed in China on April 20, 2023, the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present application belongs to the field of voice technology, and specifically relates to a voice recording method, device, electronic device and storage medium. Background Art
[0004] With the continuous development of electronic devices, the functions and applications of electronic devices are becoming more and more abundant. Users often use chat software for voice chat. For example, in a chat box of the "Communication A" application, the user can first click the voice button in the chat box to trigger the electronic device to display the "press and hold to speak" control, and then the user can long press the "press and hold to speak" control and start speaking, so that the electronic device starts recording the voice and sends the recorded voice to the contact corresponding to the chat box after the recording is completed.
[0005] However, in the above process, it often happens that the user has started speaking but does not press the voice recording control (i.e. the above-mentioned "press and speak" control) in time to record, thus causing the voice recorded by the electronic device to be missing.
[0006] Summary of the Invention
[0007] The purpose of the embodiments of the present application is to provide a voice recording method, device, electronic device and storage medium, which can ensure the integrity of voice recorded by the electronic device.
[0008] In a first aspect, an embodiment of the present application provides a voice recording method, the method comprising: recording a first voice when a voice recording control exists in a current interface; receiving a first input from a user, the first input being an input to the voice recording control; recording a second voice in response to the first input; and processing the first voice and the second voice to obtain a target voice.
[0009] In a second aspect, embodiments of the present application provide a voice recording device comprising a recording module, a receiving module, and a processing module. The recording module is configured to record a first voice when a voice recording control is present in a current interface. The receiving module is configured to receive a first user input, where the first input is an input to the voice recording control. The recording module is further configured to record a second voice in response to the first input received by the receiving module. The processing module is configured to process the first and second voices obtained by the recording module to obtain a target voice.
[0010] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0011] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0012] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the method described in the first aspect.
[0013] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0014] In an embodiment of the present application, when a voice recording control exists in the current interface, the electronic device records a first voice, and after receiving a first input to the voice recording control, records a second voice, thereby processing the first voice and the second voice to obtain a target voice. In this solution, since the electronic device can first record the first voice when detecting that a voice recording control exists in the current interface, and when actually receiving the user's input to the voice recording control, stop recording the first voice and start recording the second voice, the electronic device can then process the first voice recorded before the user input and the second voice recorded after the user input to obtain the target voice. In this way, the problem of voice loss that easily occurs when the electronic device starts recording voice only after the user triggers the input to the recording control is avoided, thereby ensuring the integrity of the voice recorded by the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] FIG1 is a flow chart of a method for recording voice according to an embodiment of the present invention;
[0016] FIG2(A) is a schematic diagram of an example interface for inputting a voice button according to an embodiment of the present application;
[0017] FIG2(B) is a schematic diagram of an example interface showing a “Press and Speak” control on a conversation interface according to an embodiment of the present application;
[0018] FIG3 is a second flow chart of a voice recording method provided in an embodiment of the present application;
[0019] FIG4 is a schematic diagram of an example interface for inputting a “press and speak” control in a conversation interface provided by an embodiment of the present application;
[0020] FIG5 is a third flow chart of a voice recording method provided in an embodiment of the present application;
[0021] FIG6 is a fourth flow chart of a voice recording method provided in an embodiment of the present application;
[0022] FIG7 is a fifth flow chart of a voice recording method provided in an embodiment of the present application;
[0023] FIG8 is a sixth flow chart of a voice recording method provided in an embodiment of the present application;
[0024] FIG9 is a schematic diagram of an example interface for displaying prompt information on a conversation interface provided by an embodiment of the present application;
[0025] FIG10 is a schematic diagram of a structure of a voice recording device according to an embodiment of the present application;
[0026] FIG11 is a second structural diagram of a voice recording device provided in an embodiment of the present application;
[0027] FIG12 is a schematic diagram of a hardware structure of an electronic device provided in an embodiment of the present application;
[0028] FIG13 is a second schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.
[0030] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of a class and do not limit the number of objects. For example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.
[0031] The following describes the voice recording method provided in the embodiment of the present application in detail through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0032] The voice recording method in the embodiment of the present application can be applied to the scenario of sending voice.
[0033] Currently, when a user uses the "Communication A" app to chat with contact B, if the user wants to send a voice message, he or she needs to first click the voice button in the chat box to trigger the electronic device to display the "Press and Speak" control. Then the user can long-press the "Press and Speak" control and start speaking, so that the electronic device starts recording the voice message and sends the recorded voice message to contact B after the recording is completed. However, in the above process, it often happens that the user starts speaking but fails to press and hold the voice recording control (i.e., the above-mentioned "Press and Speak" control) in time to record the message, resulting in the loss of the voice message recorded by the electronic device.
[0034] In the solution provided by the embodiment of the present application, when the electronic device detects the presence of a "Press and Speak" control in the current interface, the electronic device can first record a first voice; when the user makes a first input, for example, when the user clicks the "Press and Speak" control in the current interface, the electronic device stops recording the first voice and starts recording a second voice; the electronic device can then process the first voice recorded before the user input and the second voice recorded after the user input to obtain the target voice. In this way, the problem of the electronic device only starting to record voice after the user triggers the input of the recording control, which is prone to voice loss, is avoided, thereby ensuring the integrity of the voice recorded by the electronic device.
[0035] The execution subject of the voice recording method provided in the embodiment of the present application can be a voice recording device, which can be an electronic device, or a functional module or entity in the electronic device. The following uses an electronic device as an example to illustrate the technical solution provided in the embodiment of the present application.
[0036] The present invention provides a method for recording a voice. FIG1 shows a flowchart of the method for recording a voice in accordance with the present invention. The method can be applied to an electronic device. As shown in FIG1 , the method for recording a voice in accordance with the present invention can include the following steps 201 to 204.
[0037] Step 201: When a voice recording control exists in a current interface, the electronic device records a first voice.
[0038] Optionally, in an embodiment of the present application, the above-mentioned current interface may be an interface in an application currently displayed on the electronic device, the application may be an application with a voice recording function, the interface may be a conversation interface in the application with a voice recording function, and the conversation interface may be a conversation interface between the electronic device user and other contacts.
[0039] Optionally, in the embodiment of the present application, the above-mentioned application with a voice recording function may include at least one of the following: a communication application, a shopping application, a short video application, etc. The specific application can be determined according to actual use needs and is not limited in the embodiment of the present application.
[0040] Optionally, in an embodiment of the present application, the voice recording control may be a control for starting voice recording in the application with the voice recording function.
[0041] Optionally, in an embodiment of the present application, after the electronic device displays a conversation interface in the above-mentioned application, the conversation interface includes a voice control / voice button, and the voice control is used to turn on the voice input function. The user can click and input the voice control to trigger the electronic device to display the above-mentioned voice recording control and start recording the first voice.
[0042] For example, taking the electronic device as a mobile phone, as shown in Figure 2(A), the mobile phone displays a conversation interface 10 with contact B. The user can click the voice button 11 included in the conversation interface 10 to trigger the mobile phone to display a voice recording control as shown in Figure 2(B) in the conversation interface 10, such as the "press and hold to speak" control 12, so that the mobile phone starts recording the first voice.
[0043] Optionally, in an embodiment of the present application, when there is a voice control in the above-mentioned current interface, the first voice can be recorded through a local recording application (for example, a recorder) of the electronic device.
[0044] Optionally, in an embodiment of the present application, the electronic device may save the first voice in a local recording application or a file management application.
[0045] Optionally, in the embodiment of the present application, in combination with FIG1 , as shown in FIG3 , the above step 201 can be specifically implemented through the following step 201a.
[0046] Step 201a: When a voice recording control exists in the current interface and target behavior information of the user is detected, the electronic device records a first voice.
[0047] In an embodiment of the present application, the above-mentioned user target behavior information includes at least one of the following: user's voice information, user's line of sight information of looking at the screen, and user's mouth opening and closing information.
[0048] Optionally, in an embodiment of the present application, the above-mentioned user's voice information may include at least one of the following: voice volume information, timbre, pitch, sound frequency, etc.
[0049] Optionally, in an embodiment of the present application, the above-mentioned line of sight information of the user looking at the screen may include at least one of the following: line of sight angle, line of sight direction, gaze point position, etc.
[0050] Optionally, in an embodiment of the present application, the user's mouth opening and closing information may include at least one of the following: mouth opening and closing state information, mouth opening and closing degree, and mouth shape information of mouth opening and closing.
[0051] Optionally, in an embodiment of the present application, the electronic device may detect the user's line of sight information through a front camera to determine whether there is line of sight information of the user looking at the screen.
[0052] Optionally, in an embodiment of the present application, the electronic device may detect the user's voice information through a microphone to determine whether the user makes a sound.
[0053] Optionally, in an embodiment of the present application, the electronic device can detect the user's mouth opening and closing information through a front camera to determine whether the user has a mouth opening and closing action.
[0054] Optionally, in an embodiment of the present application, when the user's behavior satisfies at least one of the following: the user's eyes are looking at the screen, the user makes a sound, or the user opens and closes his mouth, the electronic device can start recording the first voice.
[0055] Optionally, in an embodiment of the present application, the electronic device can obtain the user's facial feature information through the front camera to determine whether the user in front of the electronic device is the user who uses the electronic device based on the facial feature information, and start recording the first voice when it is determined that the user in front of the electronic device is the user who uses the electronic device and the user's behavior meets at least one of the following: the user's eyes are looking at the screen, the user makes a sound, and the user opens and closes his mouth.
[0056] Optionally, in an embodiment of the present application, when the electronic device detects sound information, it can determine whether it is the sound information of the user using the electronic device based on the timbre, so as to record the first voice when it is determined that the sound information is the sound information of the user using the electronic device.
[0057] In the embodiment of the present application, when a voice recording control is present in the current interface, the user's behavior information is further detected, and the first voice is recorded when the user's target behavior information is detected. This allows the electronic device to more accurately determine whether the user has a need to record voice, and thus determine whether to pre-record the first voice. This improves the flexibility of the electronic device in recording voice.
[0058] Step 202: The electronic device receives a first input from a user.
[0059] In the embodiment of the present application, the first input is an input to a voice recording control.
[0060] Optionally, in an embodiment of the present application, the first input is an input for recording voice, so as to trigger the electronic device to start recording voice.
[0061] Optionally, in the embodiment of the present application, the first input includes, but is not limited to, a user's touch input on the voice recording control using a touch device such as a finger or a stylus, a specific gesture input by the user, or a click input. The specific input may be determined based on actual usage requirements and is not limited in the embodiment of the present invention.
[0062] Optionally, in an embodiment of the present application, the above-mentioned specific gesture can be any one of a single-click gesture, a sliding gesture, a drag gesture, a pressure recognition gesture, a long press gesture, an area change gesture, a double-press gesture, and a double-click gesture.
[0063] Optionally, in an embodiment of the present application, the above-mentioned first input can also be other feasible inputs, for example: when the above-mentioned current interface displays the voice recording control, the user's input on the physical buttons of the electronic device, or the voice command input by the user, to trigger the electronic device to start recording the second voice.
[0064] Step 203: The electronic device records a second voice in response to the first input.
[0065] It can be understood that when the electronic device receives the first input during the process of recording the first voice, it stops recording the first voice and starts recording the second voice.
[0066] Optionally, in an embodiment of the present application, the electronic device can record the second voice through the application corresponding to the above-mentioned current interface.
[0067] Optionally, in an embodiment of the present application, the electronic device may save the second voice in an application corresponding to the above-mentioned current interface, or in a file management application.
[0068] Optionally, in an embodiment of the present application, when the above-mentioned first input is a user click input on the voice recording control, the user can click the voice recording control again while the electronic device is recording the second voice to trigger the electronic device to stop recording the second voice.
[0069] Optionally, in an embodiment of the present application, when the above-mentioned first input is a long press input of the voice recording control by the user, when the user starts the long press input, the electronic device stops recording the first voice and starts recording the second voice, and when the user stops the long press input, the electronic device stops recording the second voice.
[0070] For example, in combination with Figure 2(B), as shown in Figure 4, the user can input the "Press and Speak" control 12 in the conversation interface 10, for example: long press input, to trigger the mobile phone to stop recording the first voice and start recording the second voice. During the process of the mobile phone recording the second voice, the user can stop the long press input of the "Press and Speak" control 12 to trigger the mobile phone to stop recording the second voice.
[0071] Step 204: The electronic device processes the first voice and the second voice to obtain a target voice.
[0072] Optionally, in an embodiment of the present application, the electronic device may directly concatenate the first speech before the second speech to obtain the target speech.
[0073] For example, the first voice recorded by the electronic device is "Are you free today?", and the second voice recorded is "Let's go eat". The electronic device can directly splice the first voice before the second voice to obtain the target voice "Are you free today? Let's go eat".
[0074] Optionally, in an embodiment of the present application, the electronic device may perform noise reduction processing on at least one of the first speech and the second speech, and concatenate the noise-reduced first speech and the second speech to obtain a target speech. Noise reduction processing herein refers to removing noise or interfering sounds from the speech.
[0075] For example, the first voice recorded by the electronic device is "The weather is nice today ###", and the second voice recorded is "Let's go out and play". It should be noted that the "#" here represents noise or interference; the electronic device can perform noise reduction processing on the first voice, and splice the first and second voices after noise reduction processing to obtain the target voice "The weather is nice today, let's go out and play".
[0076] Optionally, in an embodiment of the present application, the electronic device may detect whether there is a silent portion in the first speech, and if so, cut the silent portion from the first speech to obtain a processed first speech, and then concatenate the processed first speech with the second speech to obtain the target speech. It should be noted that the silent portion is the portion where the user does not make any sound.
[0077] For example, assuming that the duration of the first voice is 6 seconds, when it is detected that the first second to the third second of the first voice is silent, the electronic device can cut the silent part from the first second to the third second of the first voice to obtain a processed first voice with a duration of 3 seconds, and splice the processed first voice and the second voice to obtain the target voice.
[0078] Optionally, in an embodiment of the present application, the electronic device may concatenate the voice within a preset time length in the first voice with the second voice to obtain the target voice, and the preset time length may be a preset time length before the electronic device receives the first input.
[0079] For example, the speech within three seconds before the first input is concatenated with the second speech to obtain the target speech.
[0080] An embodiment of the present application provides a voice recording method, in which, when a voice recording control exists in the current interface, the electronic device records a first voice, and after receiving a first input to the voice recording control, records a second voice, thereby processing the first voice and the second voice to obtain a target voice. In this solution, since the electronic device can first record the first voice when detecting that a voice recording control exists in the current interface, and when the user's input to the voice recording control is actually received, it stops recording the first voice and starts recording the second voice, then the electronic device can process the first voice recorded before the user input and the second voice recorded after the user input to obtain the target voice. In this way, the problem of voice loss that easily occurs when the electronic device starts recording voice only after the user triggers the input to the recording control is avoided, thereby ensuring the integrity of the voice recorded by the electronic device.
[0081] Optionally, in an embodiment of the present application, in combination with Figure 1, as shown in Figure 5, the above-mentioned step 204 can be specifically implemented through the following steps 204a and 204b, or, in combination with Figure 1, as shown in Figure 6, the above-mentioned step 204 can be specifically implemented through the following steps 204a and 204c.
[0082] Step 204a: The electronic device compares the content of the first voice with the second voice.
[0083] Optionally, in an embodiment of the present application, the electronic device may convert the contents of the first and second voices into text, and then compare the contents of the first and second voices to obtain a similarity between the first and second voices. If the similarity is greater than a threshold, the contents of the first and second voices are confirmed to be the same; if the similarity is less than or equal to the threshold, the contents of the first and second voices are confirmed to be different.
[0084] Step 204b: When the content of the first voice is identical to that of the second voice, the electronic device deletes the first voice and uses the second voice as the target voice.
[0085] For example, when the content of the first voice is "Have you eaten?" and the content of the second voice is also "Have you eaten?", the electronic device may delete the first voice and use the second voice as the target voice.
[0086] For example, when the content of the first voice is "Let's go to the mall in a while" and the content of the second voice is "Let's go to the mall in a while", the electronic device can also delete the first voice and use the second voice as the target voice.
[0087] Optionally, in an embodiment of the present application, when the content of the first voice is the same as that of the second voice, the electronic device may also delete the second voice and use the first voice as the target voice.
[0088] Step 204c: When the contents of the first speech and the second speech are different, the electronic device concatenates the first speech and the second speech to obtain the target speech.
[0089] For example, the content of the first voice is "Good morning" and the content of the second voice is "Have you eaten?", that is, when the contents of the first voice and the second voice are different, the electronic device can splice the first voice and the second voice to obtain the target voice.
[0090] It should be noted that for the specific description of the splicing processing of the first voice and the second voice here, please refer to the description of the splicing processing in step 204 of the above embodiment, that is, the specific scheme of the splicing processing is the same as that in the above step 204, and will not be repeated here.
[0091] In the embodiment of the present application, after obtaining the first and second voices, the electronic device can compare the contents of the first and second voices, so that the electronic device can process the first and second voices according to the comparison results. In this way, the flexibility of the electronic device in processing recorded voices is improved.
[0092] Optionally, in an embodiment of the present application, after the electronic device performs splicing processing on the first voice and the second voice, the electronic device may display a menu bar for the user to process the spliced voice.
[0093] Optionally, in an embodiment of the present application, the above-mentioned menu bar may include at least one of the following: voice changing, voice acceleration, voice deceleration, adding background music, etc.
[0094] Optionally, in an embodiment of the present application, in combination with Figure 1, as shown in Figure 7, the above-mentioned step 204 can be specifically implemented through the following steps 204d and 204e, or, in combination with Figure 1, as shown in Figure 8, the above-mentioned step 204 can be specifically implemented through the following steps 204d and 204f.
[0095] Step 204d: The electronic device splices the first speech and the second speech.
[0096] It should be noted that for the specific description of the splicing processing of the first voice and the second voice here, please refer to the description of the splicing processing in step 204 of the above embodiment, that is, the specific scheme of the splicing processing is the same as that in the above step 204, and will not be repeated here.
[0097] Step 204e: When the concatenated speech is semantically coherent, the electronic device uses the concatenated speech as the target speech.
[0098] Optionally, in an embodiment of the present application, the electronic device may use natural language processing (NLP) technology to perform a semantic comparison on the first voice and the second voice to determine whether the characters, words, and sentences in the first voice and the second voice are coherent.
[0099] Optionally, in an embodiment of the present application, the electronic device can respectively obtain semantic feature information of the first voice and the second voice, and then obtain the semantic similarity of the first voice and the second voice based on the semantic feature information. If the similarity is greater than a threshold, it is confirmed that the first voice and the second voice are in a semantically coherent state; if the similarity is less than or equal to a threshold, it is confirmed that the first voice and the second voice are in a semantically incoherent state.
[0100] For example, when the first voice is "you", the second voice is "are you up", and the spliced voice is "are you up", that is, the spliced voice is semantically coherent, the electronic device can use the spliced voice as the target voice.
[0101] For example, when the first voice is "Are you busy now?", the second voice is "I need your help", and the spliced voice is "Are you busy now? I need your help", that is, the spliced voice is semantically coherent, the electronic device can use the spliced voice as the target voice.
[0102] Step 204f: When the concatenated speech is in a semantically incoherent state, the electronic device uses the first speech or the second speech as the target speech.
[0103] For example, when the first voice is "Good morning, you", the second voice is "Have you eaten?", and the spliced voice is "Good morning, have you eaten?", that is, when the spliced voice is semantically incoherent, the electronic device can use the first voice: "Good morning, you" or the second voice: "Have you eaten?" as the target voice.
[0104] Optionally, in an embodiment of the present application, the electronic device may compare the first voice and the second voice in terms of voice length, voice quality, importance of voice content, etc., to determine the final target voice based on the comparison result.
[0105] Exemplarily, when the voice length of the first voice is greater than the voice length of the second voice, the electronic device may use the first voice as the target voice.
[0106] Exemplarily, when the voice quality of the first voice is higher than that of the second voice, for example, when the voice clarity of the first voice is higher than that of the second voice, the electronic device may use the first voice as the target voice.
[0107] For example, when the importance of the voice content of the first voice is lower than that of the voice content of the second voice, for example, when the voice content of the first voice is "Are you done with your work?" and the voice content of the second voice is "Meeting in the conference room at 3 pm", the electronic device can use the second voice as the target voice.
[0108] In the embodiment of the present application, after obtaining the first and second speech, the electronic device pre-joins the first and second speech and detects the semantic coherence of the joined speech, so that the electronic device can perform corresponding processing on the joined speech according to the semantic coherence of the joined speech. In this way, the flexibility and diversity of the electronic device in processing recorded speech are improved.
[0109] Optionally, in an embodiment of the present application, the voice recording method provided in the embodiment of the present application further includes the following steps 301 to 303, or the voice recording method provided in the embodiment of the present application further includes the following steps 301, 302 and 304.
[0110] Step 301: When the first voice and the second voice are in a semantically incoherent state, the electronic device displays a prompt message in the current interface.
[0111] In the embodiment of the present application, the above prompt information is used to prompt whether to use the spliced speech as the target speech.
[0112] Optionally, in an embodiment of the present application, the electronic device may display a window in the above-mentioned current interface, which includes the above-mentioned prompt information, as well as a first control and a second control, wherein the first control is used to determine whether the spliced speech is used as the target speech, and the second control is used to determine whether the first speech or the second speech is used as the target speech.
[0113] For example, the prompt information may be "whether to use the spliced voice as the sent voice".
[0114] For example, as shown in Figure 9, when the mobile phone determines that the spliced voice is in a semantically incoherent state, a window 13 can be displayed in the conversation interface 10, and the window 13 includes a prompt message "Do you want to use the spliced voice as the sent voice?" and includes a first control, such as a "Yes" control 14, and includes a second control, such as a "No" control 15.
[0115] Step 302: The electronic device receives a second input of the user to the prompt information.
[0116] Optionally, in an embodiment of the present application, the second input may be an input to the first control or the second control.
[0117] Optionally, in the embodiment of the present application, the second input includes, but is not limited to, a user's touch input on the first or second control using a touch device such as a finger or a stylus, a specific gesture input by the user, a click input, or other feasible input. The specific input may be determined based on actual usage requirements and is not limited in the embodiment of the present invention.
[0118] Optionally, in an embodiment of the present application, the above-mentioned specific gesture can be any one of a single-click gesture, a sliding gesture, a drag gesture, a pressure recognition gesture, a long press gesture, an area change gesture, a double-press gesture, and a double-click gesture.
[0119] Step 303: The electronic device responds to the second input and uses the concatenated speech as the target speech if the second input is confirmed to be yes.
[0120] It can be understood that when the second input is an input to the first control, the electronic device can use the spliced voice as the target voice.
[0121] Step 304: The electronic device responds to the second input and uses the first voice or the second voice as the target voice if the second input is confirmed to be negative.
[0122] It can be understood that when the second input is an input to the second control, the electronic device can use the first voice or the second voice as the target voice.
[0123] For example, in combination with Figure 9 above, the user can make a second input to the "Yes" control 14 to trigger the mobile phone to use the spliced voice as the target voice, or the user can make a second input to the "No" control 15 to trigger the mobile phone to use the first voice or the second voice as the target voice.
[0124] It should be noted that, for the specific solution of the electronic device using the first voice or the second voice as the target voice, reference may be made to the description in step 204f of the above embodiment, which will not be repeated here.
[0125] Optionally, in an embodiment of the present application, when the spliced voice is semantically incoherent, the electronic device may also delete the first voice and the second voice and remind the user to re-record the voice.
[0126] In the embodiment of the present application, when the electronic device determines that the spliced speech is semantically incoherent, it displays a prompt message, allowing the user to flexibly select the final speech to be sent, i.e., the target speech, based on the prompt message. This improves the diversity and flexibility of the electronic device in sending recorded speech.
[0127] It should be noted that, in an embodiment of the present application, after executing the above step 204d, when the first voice and the second voice are in a semantically incoherent state: the electronic device can execute the above step 204f; or, the electronic device can execute the above steps 301 to 303; or, the electronic device can execute the above steps 301, 302 and 304.
[0128] Optionally, in the embodiment of the present application, the voice recording method provided in the embodiment of the present application may further include the following step 401.
[0129] Step 401: If a voice recording control exists in the current interface and the current interface is closed during recording of a first voice, the electronic device deletes the recorded first voice.
[0130] Optionally, in an embodiment of the present application, the electronic device may delete the recorded first voice when it detects that there is no voice recording control in the above-mentioned current interface, for example, when the user triggers the electronic device to display a text input keyboard in the above-mentioned current interface.
[0131] Optionally, in an embodiment of the present application, the electronic device may delete the recorded first voice when it detects that the application corresponding to the above-mentioned current interface is exited.
[0132] Optionally, in an embodiment of the present application, the electronic device may delete the recorded first voice when detecting that the conversation list interface is displayed.
[0133] Optionally, in an embodiment of the present application, the electronic device may delete the recorded first voice when receiving an incoming call message, a video call, or a voice call.
[0134] In the embodiment of the present application, the electronic device detects whether the current interface is closed during recording of the first voice, so that if the current interface is closed, the electronic device can delete the recorded first voice. This improves the flexibility of the electronic device in recording voice.
[0135] It should be noted that the voice recording method provided in the embodiment of the present application can be performed by a voice recording device. In the embodiment of the present application, the voice recording device performing the voice recording method is taken as an example to illustrate the voice recording device provided in the embodiment of the present application.
[0136] FIG10 shows a possible structural diagram of a voice recording device involved in an embodiment of the present application. As shown in FIG10 , the voice recording device 70 may include: a recording module 71 , a receiving module 72 , and a processing module 73 .
[0137] The recording module 71 is configured to record a first voice when a voice recording control is present in the current interface. The receiving module 72 is configured to receive a first user input, which is an input to the voice recording control. The recording module 71 is further configured to record a second voice in response to the first input received by the receiving module 72. The processing module 73 is configured to process the first and second voices obtained by the recording module 71 to obtain a target voice.
[0138] The present application provides a voice recording device. Upon detecting the presence of a voice recording control in the current interface, the voice recording device can first record a first voice. Upon receiving user input to the voice recording control, the device stops recording the first voice and begins recording a second voice. The voice recording device can then process the first voice recorded before the user input and the second voice recorded after the user input to obtain the target voice. This avoids the problem of missing voices that may occur if the voice recording device only begins recording after the user triggers input to the recording control, thereby ensuring the integrity of the voice recorded by the voice recording device.
[0139] In one possible implementation, the above-mentioned recording module 71 is specifically used to record the first voice when there is a voice recording control in the current interface and the user's target behavior information is detected. The user's target behavior information includes at least one of the following: the user's voice information, the user's line of sight information of looking at the screen, and the user's mouth opening and closing information.
[0140] In one possible implementation, the processing module 73 is specifically used to compare the content of the first speech and the second speech; if the content of the first speech and the second speech is the same, the first speech is deleted and the second speech is used as the target speech; or, if the content of the first speech and the second speech is different, the first speech and the second speech are spliced to obtain the target speech.
[0141] In one possible implementation, the processing module 73 is specifically used to splice the first speech and the second speech; when the spliced speech is in a semantically coherent state, the spliced speech is used as the target speech; or, when the spliced speech is in a semantically incoherent state, the first speech or the second speech is used as the target speech.
[0142] In one possible implementation, as shown in FIG11 in conjunction with FIG10 , the voice recording device 70 provided in the embodiment of the present application further includes a deletion module 74. The deletion module 74 is configured to delete the recorded first voice if a voice recording control is present in the current interface and the current interface is closed during recording of the first voice.
[0143] The voice recording device in the embodiment of the present application can be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or a device other than a terminal. For example, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a mobile Internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc. It can also be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., and the embodiment of the present application does not specifically limit it.
[0144] The voice recording device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0145] The voice recording device provided in the embodiment of the present application can implement each process implemented in the above method embodiment. To avoid repetition, it will not be described here.
[0146] Optionally, as shown in Figure 12, an embodiment of the present application also provides an electronic device 900, including a processor 901 and a memory 902, and the memory 902 stores a program or instruction that can be run on the processor 901. When the program or instruction is executed by the processor 901, the various steps of the above-mentioned method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0147] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0148] FIG13 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
[0149] The electronic device 100 includes but is not limited to components such as a radio frequency unit 101 , a network module 102 , an audio output unit 103 , an input unit 104 , a sensor 105 , a display unit 106 , a user input unit 107 , an interface unit 108 , a memory 109 , and a processor 110 .
[0150] Those skilled in the art will appreciate that the electronic device 100 may further include a power source (such as a battery) for powering various components. The power source may be logically connected to the processor 110 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The electronic device structure shown in FIG13 does not limit the electronic device. The electronic device may include more or fewer components than shown, or may combine certain components, or have different component arrangements, which will not be described in detail here.
[0151] The input unit 104 is configured to record a first voice when a voice recording control is present in the current interface.
[0152] The user input unit 107 is configured to receive a first input from a user, where the first input is an input to a voice recording control.
[0153] The input unit 104 is further configured to record a second voice in response to the first input received by the user input unit 107 .
[0154] The processor 110 is configured to process the first speech and the second speech obtained by the input unit 104 to obtain a target speech.
[0155] An embodiment of the present application provides an electronic device that, upon detecting the presence of a voice recording control in the current interface, can first record a first voice. Upon actually receiving user input to the voice recording control, the electronic device stops recording the first voice and starts recording a second voice. The electronic device can then process the first voice recorded before the user input and the second voice recorded after the user input to obtain the target voice. This avoids the problem of missing voices that may occur when the electronic device only starts recording voice after the user triggers input to the recording control, thereby ensuring the integrity of the voice recorded by the electronic device.
[0156] Optionally, the input unit 104 is specifically used to record a first voice when there is a voice recording control in the current interface and the user's target behavior information is detected. The user's target behavior information includes at least one of the following: the user's voice information, the user's line of sight information of looking at the screen, and the user's mouth opening and closing information.
[0157] Optionally, the processor 110 is specifically used to compare the content of the first voice with the second voice; when the content of the first voice is the same as that of the second voice, delete the first voice and use the second voice as the target voice; or, when the content of the first voice is different from that of the second voice, splice the first voice and the second voice to obtain the target voice.
[0158] Optionally, the processor 110 is specifically used to splice the first speech and the second speech; when the spliced speech is in a semantically coherent state, the spliced speech is used as the target speech; or, it is specifically used to splice the first speech and the second speech, and when the spliced speech is in a semantically incoherent state, the first speech or the second speech is used as the target speech.
[0159] Optionally, the processor 110 is further configured to delete the recorded first voice if a voice recording control exists in the current interface and the current interface is closed during the recording of the first voice.
[0160] The electronic device provided in the embodiment of the present application can implement each process implemented in the above method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described here.
[0161] The beneficial effects of various implementations in this embodiment can be specifically referred to the beneficial effects of the corresponding implementations in the above method embodiment. To avoid repetition, they will not be described here.
[0162] It should be understood that in an embodiment of the present application, the input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 107 includes a touch panel 1071 and at least one of other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0163] The memory 109 can be used to store software programs and various data. The memory 109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 109 may include a volatile memory or a non-volatile memory, or the memory 109 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM), and a direct memory bus random access memory (DRRAM). The memory 109 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0164] Processor 110 may include one or more processing units. Optionally, processor 110 integrates an application processor and a modem processor. The application processor primarily handles operations related to the operating system, user interface, and application programs, while the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into processor 110.
[0165] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0166] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0167] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment and achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0168] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0169] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0170] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0171] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0172] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
Claims
1. A voice recording method, the method comprising: When there is a voice recording control in the current interface, record the first voice; Receive a first input from a user, where the first input is an input to the voice recording control; In response to the first input, recording a second voice; The first speech and the second speech are processed to obtain a target speech.
2. The method according to claim 1, wherein: The step of recording a first voice when a voice recording control is present in the current interface includes: When the voice recording control exists in the current interface and the user's target behavior information is detected, the first voice is recorded, and the user's target behavior information includes at least one of the following: the user's voice information, the user's line of sight information of looking at the screen, and the user's mouth opening and closing information.
3. The method according to claim 1, wherein: The processing of the first speech and the second speech to obtain a target speech includes: Comparing the content of the first speech with the second speech; If the first speech and the second speech have the same content, the first speech is deleted and the second speech is used as the target speech; or In the case that the content of the first speech is different from that of the second speech, the first speech and the second speech are concatenated to obtain the target speech.
4. The method according to claim 1 or 3, wherein: The processing of the first speech and the second speech to obtain a target speech includes: splicing the first speech and the second speech; In the case where the concatenated speech is in a semantically coherent state, the concatenated speech is used as the target speech; or, When the concatenated speech is in a semantically incoherent state, the first speech or the second speech is used as the target speech.
5. The method according to claim 1, wherein: The method further comprises: If the voice recording control exists in the current interface and the current interface is closed during recording of the first voice, the recorded first voice is deleted.
6. A voice recording device, comprising: Recording module, receiving module and processing module; The recording module is used to record the first voice when there is a voice recording control in the current interface; The receiving module is used to receive a first input from a user, where the first input is an input to the voice recording control; The recording module is further configured to record a second voice in response to the first input received by the receiving module; The processing module is used to process the first voice and the second voice obtained by the recording module to obtain a target voice.
7. The device according to claim 6, wherein: The recording module is specifically used to record a first voice when the voice recording control exists in the current interface and the user's target behavior information is detected, and the user's target behavior information includes at least one of the following: the user's voice information, the user's line of sight information of looking at the screen, and the user's mouth opening and closing information.
8. The device according to claim 6, wherein: The processing module is specifically used for: Comparing the content of the first speech with the second speech; When the contents of the first speech and the second speech are the same, the first speech is deleted and the second speech is used as the target speech; or, when the contents of the first speech and the second speech are different, the first speech and the second speech are concatenated to obtain the target speech.
9. The device according to claim 6 or 8, wherein: The processing module is specifically used for: splicing the first speech and the second speech; When the concatenated speech is in a semantically coherent state, the concatenated speech is used as the target speech; or, when the concatenated speech is in a semantically incoherent state, the first speech or the second speech is used as the target speech.
10. The device according to claim 6, wherein: The voice recording device also includes: a deletion module; the deletion module is used to delete the recorded first voice when the voice recording control exists in the current interface and the current interface is closed during the recording of the first voice.
11. An electronic device comprising a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the voice recording method according to any one of claims 1 to 5 are implemented.
12. A readable storage medium storing a program or an instruction, wherein the program or the instruction, when executed by a processor, implements the steps of the voice recording method according to any one of claims 1 to 5.
13. A chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the voice recording method according to any one of claims 1 to 5.
14. A computer program product, wherein the program product is executed by at least one processor to implement the speech recording method according to any one of claims 1 to 5.
15. An electronic device, comprising: the electronic device being configured to execute the voice recording method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Voice input control method and device
CN105760084A
Voice recognition enabling method and apparatus for electronic device
CN106383644A
Speech information processing method and device
CN106531167A
Audio processing method and device, storage medium and electronic device
CN107886975A
Voice control method and device, storage medium, and electronic device
CN108694947A
