A voice processing method, device and storage medium
By obtaining the speech recognition results of the cloud server, the electronic device is assisted in speech endpoint detection, which solves the problem of misjudgment caused by environmental noise and improves the success rate and user experience of voice interaction.
Patent Information
- Application Number
- CN202010819665.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-14
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2040-08-14
AI Technical Summary
Due to the presence of environmental noise, electronic devices are prone to misjudgment and stop after collecting audio data, causing voice interaction to fail and audio data to be unable or only partially sent to the cloud server.
By obtaining the speech recognition results of the cloud server based on audio data, it is determined whether to perform voice endpoint detection, and speech recognition technology is used to assist electronic devices in voice endpoint detection, reducing the possibility of misjudgment and stopping.
It improves the success rate and user experience of voice interaction, reduces misjudgments caused by environmental noise, and ensures the smooth progress of voice interaction.
Smart Images

Figure CN111968680B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of voice information technology, and in particular to a voice processing method, device and storage medium. Background Art
[0002] At present, human-computer interaction through voice has received widespread attention. The entire Internet industry is actively exploring possible applications and scenarios of voice interaction, and a large number of electronic devices based on voice interaction have been launched, such as smart speakers.
[0003] In the related art, after collecting audio data, the electronic device will directly perform endpoint detection on the collected audio data to determine the stop of the collected audio data, and send the audio data to the cloud server for voice recognition. However, due to the presence of environmental noise, the electronic device is prone to misjudgment of the stop, which will cause the audio data to fail to be sent to the cloud server or only partially sent to the cloud server, thereby causing the voice interaction to fail. Summary of the invention
[0004] The present invention provides a speech processing method, device and storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, a speech processing method is provided, which is applied to an electronic device, and the method includes:
[0006] Collecting audio data, and obtaining a first speech recognition result obtained by the cloud server based on the audio data;
[0007] Determine whether to perform voice endpoint detection on the audio data according to the first voice recognition result.
[0008] Optionally, obtaining a first speech recognition result based on the audio data includes:
[0009] Sending the audio data to a cloud server;
[0010] The first speech recognition result obtained by processing the audio data based on automatic speech recognition technology ASR and fed back by the cloud server is received.
[0011] Optionally, before obtaining the first speech recognition result based on the audio data, the method further includes:
[0012] Detecting whether the audio data contains wake-up information;
[0013] If the audio data contains the wake-up information, it is determined that the electronic device is in the wake-up state.
[0014] Optionally, the first speech recognition result includes a content length corresponding to the audio data;
[0015] The determining whether to perform voice endpoint detection on the audio data according to the first voice recognition result includes:
[0016] Within a first preset time, when the content length is greater than a preset length threshold, it is determined to start voice endpoint detection of the audio data.
[0017] Optionally, the method further includes:
[0018] If the first speech recognition result is not obtained within the first preset time, it is determined not to perform speech endpoint detection on the audio data.
[0019] Optionally, the method further includes:
[0020] After determining to perform the voice endpoint detection of the audio data, obtaining a second voice recognition result obtained by the cloud server based on the audio data;
[0021] Determine a time interval between a first moment when a first voice recognition result is obtained and a second moment when a second voice recognition result is obtained;
[0022] When the time interval is greater than or equal to a second preset time, it is determined that the voice endpoint detection of the audio data is terminated.
[0023] Optionally, the method further includes:
[0024] Receiving wake-up response information fed back by the cloud server according to the first speech recognition result;
[0025] The wake-up response information is output.
[0026] According to a second aspect of an embodiment of the present disclosure, there is provided a speech processing device, applied to an electronic device, the device comprising:
[0027] A first acquisition module is configured to collect audio data and obtain a first speech recognition result obtained by the cloud server based on the audio data;
[0028] The first determination module is configured to determine whether to perform voice endpoint detection on the audio data according to the first voice recognition result.
[0029] Optionally, the first acquisition module is further configured to:
[0030] Sending the audio data to a cloud server;
[0031] The first speech recognition result obtained by processing the audio data based on automatic speech recognition technology ASR and fed back by the cloud server is received.
[0032] Optionally, the device further comprises:
[0033] A detection module, configured to detect whether the audio data contains wake-up information;
[0034] The second determination module is configured to determine that the electronic device is in a wake-up state if the audio data contains the wake-up information.
[0035] Optionally, the first speech recognition result includes a content length corresponding to the audio data;
[0036] The first determining module is further configured to:
[0037] Within a first preset time, when the content length is greater than a preset length threshold, it is determined to perform voice endpoint detection on the audio data.
[0038] Optionally, the device further comprises:
[0039] The ending module is configured to determine not to perform voice endpoint detection on the audio data if the first voice recognition result is not obtained within the first preset time.
[0040] Optionally, the device further comprises:
[0041] A second acquisition module is configured to acquire a second speech recognition result obtained by the cloud server based on the audio data after determining to perform the speech endpoint detection on the audio data;
[0042] A third determination module is configured to determine a time interval between a first moment when the first first voice recognition result is obtained and a second moment when the second first voice recognition result is obtained;
[0043] The fourth determination module is configured to determine to end the voice endpoint detection of the audio data when the time interval is greater than or equal to a second preset time.
[0044] Optionally, the device further comprises:
[0045] A receiving module, configured to receive wake-up response information fed back by the cloud server according to the first speech recognition result;
[0046] An output module is configured to output the wake-up response information.
[0047] According to a third aspect of an embodiment of the present disclosure, there is provided a speech processing device, applied to an electronic device, the device comprising:
[0048] processor;
[0049] a memory configured to store processor-executable instructions;
[0050] Wherein, the processor is configured to: implement the steps in any one of the speech processing methods in the first aspect when executed.
[0051] According to the fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When the instructions in the storage medium are executed by a processor of a speech processing device, the device is enabled to perform the steps of any one of the speech processing methods in the first aspect above.
[0052] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0053] It can be seen from the above embodiments that in the embodiments of the present disclosure, after collecting audio data, the first speech recognition result obtained by the cloud server based on the audio data can be obtained, and whether to perform speech endpoint detection of the audio data can be determined based on the first speech recognition result. By using the speech recognition technology of the cloud server to assist electronic devices in detecting the speech endpoints of the audio data, the detection accuracy can be higher, and the false positives caused by environmental noise can be reduced, thereby improving the success rate of voice interaction and the user experience.
[0054] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0056] Figure 1 The following is a flow chart of a speech processing method according to an exemplary embodiment. Figure 1 .
[0057] Figure 2 The following is a flow chart of a speech processing method according to an exemplary embodiment. Figure 2 .
[0058] Figure 3 The present invention is a flow chart of a speech processing method in the prior art.
[0059] Figure 4 The following is a flow chart of a speech processing method according to an exemplary embodiment. Figure 3 .
[0060] Figure 5 The figure is a block diagram of a speech processing device according to an exemplary embodiment.
[0061] Figure 6 The figure is a hardware structure block diagram of a speech processing device according to an exemplary embodiment. DETAILED DESCRIPTION
[0062] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0063] Figure 1 The following is a flow chart of a speech processing method according to an exemplary embodiment. Figure 1 ,like Figure 1 As shown, the method is applied to electronic equipment and mainly includes the following steps:
[0064] In step 101, audio data is collected, and a first speech recognition result obtained by a cloud server based on the audio data is obtained;
[0065] In step 102, it is determined whether to perform speech endpoint detection on the audio data according to the first speech recognition result.
[0066] The speech processing method in the embodiments of the present disclosure can be applied to electronic devices, wherein the electronic devices include mobile terminals and fixed terminals. Here, mobile terminals include: smart speakers, mobile phones, laptops, tablet computers, wearable electronic devices, etc., and fixed terminals include personal computers, televisions, etc.
[0067] Taking the electronic device as a smart speaker as an example, in the implementation process, audio data can be collected based on the audio collection component of the smart speaker. After the audio data is collected, the audio data can be sent to the cloud server. After receiving the audio data, the cloud server can perform speech recognition on the audio data to obtain a first speech recognition result. The first speech recognition result includes: information such as the semantics of the audio data and the content length of the audio data.
[0068] In the embodiments of the present disclosure, the electronic device can determine whether to perform voice endpoint detection on the audio data based on the first voice recognition result. For example, in the case where the first voice recognition result is the content length of the audio data, it can be determined that voice endpoint detection is entered into the audio data when the content length is greater than a set length threshold, and it can be determined not to perform voice endpoint detection on the audio data when the content length is less than or equal to the set length threshold. In other optional embodiments, semantic analysis can also be performed on the audio data, and a determination can be made based on the results of the semantic analysis whether to perform voice endpoint detection on the audio data, which is not specifically limited here.
[0069] In some optional embodiments, an application for human-computer interaction may be installed on the electronic device. During use, when the application receives an interaction request input by the user, audio data may be collected based on an audio collection component on the electronic device. The audio data may be voice request information input by the user, and the application for human-computer interaction includes a voice assistant.
[0070] In the disclosed embodiment, after collecting audio data, the cloud server can obtain the first speech recognition result based on the audio data, and determine whether to perform speech endpoint detection of the audio data according to the first speech recognition result. By using the speech recognition technology of the cloud server to assist the electronic device in detecting the speech endpoint of the audio data, the detection accuracy can be higher, and the false stop caused by environmental noise can be reduced, thereby improving the success rate of voice interaction and improving the user experience.
[0071] In some embodiments, obtaining a first speech recognition result based on the audio data includes:
[0072] Sending the audio data to a cloud server;
[0073] The first speech recognition result obtained by processing the audio data based on automatic speech recognition technology (Automatic Speech Recognition, ASR) and fed back by the cloud server is received.
[0074] Here, after the electronic device collects the audio data, the audio data can be sent to the cloud server. For example, after the electronic device collects the audio data, the audio data is transmitted to the cloud server in real time for recognition. In this way, the audio data recognition of the cloud server is synchronized with the audio data collection of the electronic device, and when there is noise data in the voice silence period corresponding to the audio data, the cloud server cannot recognize the text content, then the return of the text content will also have an interval, and the interval is associated with the voice silence period corresponding to the noise data. The text content here can be one of the contents contained in the aforementioned first voice recognition result. The text content is the text corresponding to the voice signal.
[0075] After receiving the audio data, the cloud server may process the audio data based on the automatic speech recognition technology to obtain a first speech recognition result. For example, the text content corresponding to the audio data may be obtained based on the automatic speech recognition technology, and the content length of the text content may be obtained, or the audio data may be semantically analyzed based on the automatic speech recognition technology, and semantic information corresponding to the audio data may be obtained.
[0076] In the disclosed embodiment, after the electronic device collects audio data, it does not directly perform stop judgment processing on the audio data, but sends the audio data to a cloud server, and performs voice recognition on the audio data based on the cloud server. Compared with directly performing stop judgment processing on the audio data, performing stop judgment processing after obtaining an accurate first voice recognition result can reduce the possibility of misjudgment, thereby ensuring smooth voice interaction.
[0077] In some embodiments, before obtaining the first speech recognition result based on the audio data, the method further includes:
[0078] Detecting whether the audio data contains wake-up information;
[0079] If the audio data contains the wake-up information, it is determined that the electronic device is in the wake-up state.
[0080] In an embodiment of the present disclosure, the electronic device can be awakened by voice wake-up, wherein the wake-up information may include a wake-up word. For example, when the audio data is received based on the audio acquisition component contained in the electronic device, it can be detected whether the audio data contains a pre-set wake-up word. If the audio data contains a wake-up word, the voice processing module of the electronic device will wake up the electronic device. Among them, the wake-up word can be set by the user according to the needs, for example, the wake-up word can be set to "Xiao Ai classmate". In an embodiment of the present disclosure, the electronic device can be awakened directly based on the wake-up information in the audio data, and after the electronic device is awakened, the audio data is recognized and processed, which can improve the efficiency of voice interaction. In some embodiments, if the wake-up information is not included in the audio data, it is determined that the electronic device is in a non-awakening state. When the electronic device is in a non-awakening state, the electronic device stops sending the audio data to the cloud server.
[0081] In some embodiments, the first speech recognition result includes a content length corresponding to the audio data;
[0082] The determining whether to perform voice endpoint detection on the audio data according to the first voice recognition result includes:
[0083] Within a first preset time, when the content length is greater than a preset length threshold, it is determined to start voice endpoint detection of the audio data.
[0084] In some embodiments, the content length corresponding to the audio data includes at least any one of the following: the number of characters included in the text content corresponding to the audio data or the duration consumed in playing the audio data.
[0085] Here, the audio data can be identified based on automatic speech recognition technology to obtain the text content corresponding to the audio data, and the length of the text content can be determined, and the length of the text content can be determined as the content length corresponding to the audio data, wherein the length of the text content can include the number of characters included in the text content. In other embodiments, the voice length of the audio data can also be determined as the content length of the audio data, wherein the voice length can be the time required to play the audio data. The definition of the content length corresponding to the audio data is not limited here.
[0086] In the embodiment of the present disclosure, after determining the content length corresponding to the audio data, it can be determined whether the content length is greater than a set length threshold. When the content length is greater than the set length threshold, it is determined to start voice endpoint detection of the audio data. In some embodiments, the electronic device can perform endpoint detection on the audio data based on voice activity detection (VAD). The set length threshold can be set as needed, and the present disclosure does not limit this.
[0087] In some embodiments, the length threshold can be set to 0. During the implementation process, if the content length corresponding to the audio data is 0, it means that the cloud server has not obtained the audio data. At this time, it is meaningless for the electronic device to perform endpoint detection on the audio data based on VAD. In other words, the electronic device in the embodiment of the present disclosure only performs endpoint detection on the audio data whose content length is greater than the set length threshold, and does not perform endpoint detection on the audio data whose content length is less than or equal to the set length threshold.
[0088] In other embodiments, the length threshold may be set to other values, such as 1 or 2, which is not specifically limited here.
[0089] When the content length corresponding to the audio data is short, it means that the audio data may be an interjection or a short word mistakenly input by the user, such as "ah", "ya", etc. At this time, if the audio data is still recognized and stopped, it will not only waste the system resources of the electronic device, but also increase the user's waiting time.
[0090] In some embodiments, the method further includes: determining whether a first voice recognition result is acquired within a first preset time.
[0091] The determining whether to perform voice endpoint detection on the audio data according to the first voice recognition result includes:
[0092] If the first speech recognition result is obtained within the first preset time, it is determined whether to perform speech endpoint detection on the audio data according to the first speech recognition result.
[0093] In some embodiments, within the first preset time, when the content length is greater than a preset length threshold, determining to start voice endpoint detection of the audio data includes:
[0094] Within the first time, when the content length is obtained and the content length is greater than a preset length threshold, it is determined to start voice endpoint detection of the audio data.
[0095] Here, the first preset time corresponds to a preset duration, for example, 5 to 6 seconds (s). The start time of the first preset time is the time when it is determined that the content length is less than or equal to the set length threshold.
[0096] In some embodiments, the method further includes: when the content length is acquired within the first preset time and the content length is less than or equal to a preset length threshold, determining not to perform voice endpoint detection on the voice data.
[0097] In the disclosed embodiment, a length threshold is set, and within a first preset time, when the content length is greater than the set length threshold, the voice endpoint of the audio data is detected. In this way, meaningless audio data can be directly rejected without further processing. This can reduce unnecessary responses while realizing intelligent human-computer interaction.
[0098] In some embodiments, the method further comprises:
[0099] If the first speech recognition result is not obtained within the first preset time, it is determined not to perform speech endpoint detection on the audio data.
[0100] The technical solution in the embodiment of the present disclosure is that if the first voice recognition result is not obtained within the first preset time, it is determined not to perform voice endpoint detection on the audio data. By limiting the waiting time for obtaining the first voice recognition result to the first preset time, the user's waiting time can be reduced, thereby improving the efficiency of human-computer interaction.
[0101] In some embodiments, the method further comprises:
[0102] After determining to perform the voice endpoint detection of the audio data, obtaining a second voice recognition result obtained by the cloud server based on the audio data;
[0103] Determine a time interval between a first moment when the first speech recognition result is obtained and a second moment when the second speech recognition result is obtained;
[0104] When the time interval is greater than or equal to a second preset time, it is determined that the voice endpoint detection of the audio data is terminated.
[0105] Here, the duration corresponding to the second preset time may be a duration threshold corresponding to the duration of two adjacent voice recognition results received by the electronic device. If it is greater than the duration threshold, it is determined that the voice endpoint detection is ended. If it is less than or equal to the duration threshold, it will continue to wait for the voice recognition result to further determine whether to end the voice endpoint detection.
[0106] In some embodiments, the duration corresponding to the second preset time is shorter than the duration corresponding to the first preset time. Since the first preset time is set for the situation where no audio data is detected, when the audio data is not detected, the user may need to rephrase and then input, in which case, it is necessary to wait for a long time. The second preset time is for the waiting time set during the transmission of the first voice recognition result. At this time, if the waiting time is long, it will increase the time the user waits for the response information. In the disclosed embodiment, by making the second preset time shorter than the first preset time, not only can the user's waiting time be reduced during the input of audio data, but also the continuity of human-computer interaction can be improved.
[0107] In the disclosed embodiment, a counter can be started at the same time as it is determined that the content length is greater than a set length threshold, the time interval for the cloud server to feed back the second voice recognition result can be recorded, and when the time interval is greater than or equal to the second preset time, the voice endpoint detection of the audio data can be ended. In this way, when the cloud server cannot recognize the audio data or the recognition of the audio data is ended, it can be determined that the current conversation is over. In this way, the audio data can be responded to in a timely manner, the efficiency and timeliness of human-computer interaction can be improved, and the user experience of using the electronic product can be improved.
[0108] In some embodiments, the method further includes: receiving wake-up response information fed back by the cloud server based on the first speech recognition result; and outputting the wake-up response information.
[0109] Here, after receiving the audio data, the cloud server can perform semantic analysis on the audio data to obtain analysis results; generate wake-up response information based on the analysis results, and send the wake-up response information to the electronic device; after receiving the wake-up response information, the electronic device can output the wake-up response information based on the audio output component.
[0110] For example, if the collected audio data is "Xiao Ai, how's the weather today?", the wake-up response information generated by the cloud server based on the audio data may be "Today is sunny", and then the cloud server can send the wake-up response information to the electronic device, and the electronic device can output the wake-up response information based on the audio output component.
[0111] Figure 2 The following is a flow chart of a speech processing method according to an exemplary embodiment. Figure 2 ,like Figure 2 As shown, the method is applied to include the following steps:
[0112] In step 201, the electronic device collects audio data.
[0113] In step 202, the electronic device sends the audio data to a cloud server.
[0114] In step 203, the cloud server processes the audio data based on automatic speech recognition technology to obtain a first speech recognition result.
[0115] In step 204, the cloud server sends the first speech recognition result to the electronic device.
[0116] In step 205, the electronic device determines whether to perform voice endpoint detection on the audio data according to the first voice recognition result.
[0117] Figure 3 It is a flow chart of a speech processing method in the prior art. Figure 3As shown, the electronic device can collect audio data in real time based on the audio collection component. After the audio data is collected based on the audio collection component, the audio data can be enhanced through the acoustic front-end algorithm 301. For example, the audio data can be enhanced based on the adaptive beamforming (Minimum VarianceDistortionless Response, MVDR) algorithm. After the audio data is enhanced, it can be detected based on the wake-up model 302 whether the audio data contains wake-up information, and the wake-up result is obtained. If the wake-up result indicates that the electronic device is truly awakened, it can be determined based on the VAD module 303 of the electronic device whether the input of the audio data has stopped. If it is determined that the input of the audio data has not stopped, data is continuously sent to the ASR module of the cloud server; if it is determined that the input of the audio data has stopped, sending data to the ASR module of the cloud server is stopped. The cloud server returns a response message based on the speech recognition result, and this conversation ends.
[0118] Figure 4 The following is a flow chart of a speech processing method according to an exemplary embodiment. Figure 3 ,like Figure 4 As shown, in the embodiment of the present disclosure, the VAD module of the electronic device can be assisted by the ASR module of the cloud server to judge the stop of the collected audio data. The electronic device can collect audio data in real time based on the audio collection component. After collecting the audio data, the audio data can be enhanced by the acoustic front-end algorithm 401. After the audio data is enhanced, it can be detected whether the audio data contains key information based on the wake-up model 402, and the wake-up result is obtained. If the wake-up result characterizes that the electronic device is truly awakened, the audio data can be sent to the cloud server, and the cloud server can recognize the audio data based on the ASR module 403 to obtain a first speech recognition result (for example, the content length (asr_length) corresponding to the audio data), and the cloud server will feedback the content length corresponding to the audio data to the VAD module 404 of the electronic device. After receiving the content length, the VAD module can determine whether the content length is greater than 0. If the content length is greater than 0, the VAD module detects the start and end points of the audio data and determines whether the input of the audio data has ended based on the detection result. If the VAD module determines that the input of the audio data has stopped, it stops sending data to the ASR module of the cloud server. The cloud server returns a response message based on the first speech recognition result, and the conversation ends. Here, the audio acquisition component includes a microphone.
[0119] If the content length is equal to 0, it means that the cloud server has not detected any audio data. At this time, the audio data can continue to be sent to the ASR module of the cloud server. When the first preset time (for example, 5 to 6 seconds) is exceeded, the session is terminated.
[0120] Compared to Figure 3 After collecting audio data, the electronic device directly performs endpoint detection on the collected audio data to determine the stop of the collected audio data, and at the same time sends the audio data to the cloud server for voice recognition. The disclosed embodiment uses the voice recognition technology of the cloud server to assist the electronic device in detecting the voice endpoint of the audio data, which can make the detection more accurate and reduce the false stop caused by environmental noise, thereby improving the success rate of voice interaction and improving the user experience.
[0121] In some embodiments, after waking up the electronic device, audio data can be sent to the ASR module of the cloud server for voice recognition. The ASR module of the cloud server will feed back the first voice recognition result (for example, the content length corresponding to the audio data) to the VAD module of the electronic device in real time. If the VAD module of the electronic device detects that the content length is greater than 0, it will start to stop processing the audio data based on the VAD module. When entering the VAD module, the counter will be started at the same time to record the time interval for the ASR module of the cloud server to feed back the first voice recognition result. When the time interval is greater than a second preset time (for example, 500 milliseconds (ms)), it is determined that the input of the audio data is completed, that is, the conversation is over, and the VAD module determines that the conversation is over.
[0122] In some embodiments, when the time interval of the first voice recognition result is less than or equal to the second preset time, it is determined to continue the voice endpoint detection of the audio data. For example, when the time interval of the ASR module of the cloud server feedbacks the first voice recognition result is less than or equal to the second preset time, the timer is cleared to 0, the voice endpoint detection of the audio data is continued, and the count is restarted. In some embodiments, if the VAD module of the electronic device detects that the content length is equal to 0, the VAD module of the electronic device is not entered.
[0123] In the disclosed embodiment, an ASR module based on a cloud server assists a VAD module of an electronic device in performing stop judgment processing on the collected audio data, thereby reducing the possibility of false stop judgment due to environmental noise, solving the problem of users having to wait for a long time due to failure to detect shorter interactive content, improving the success rate of user interaction with the electronic device, and providing a better user experience.
[0124] Figure 5 FIG. 1 is a block diagram of a speech processing device according to an exemplary embodiment. Figure 5 As shown, the device is applied to an electronic device, and the speech processing device 500 mainly includes:
[0125] A first acquisition module 501 is configured to collect audio data and obtain a first speech recognition result obtained by the cloud server based on the audio data;
[0126] The first determination module 502 is configured to determine whether to perform speech endpoint detection on the audio data according to the first speech recognition result.
[0127] In some embodiments, the first acquisition module 501 is further configured to:
[0128] Sending the audio data to a cloud server;
[0129] The first speech recognition result obtained by processing the audio data based on automatic speech recognition technology ASR and fed back by the cloud server is received.
[0130] In some embodiments, the apparatus 500 further includes:
[0131] A detection module, configured to detect whether the audio data contains wake-up information;
[0132] The second determination module is configured to determine that the electronic device is in a wake-up state if the audio data contains the wake-up information.
[0133] In some embodiments, the first speech recognition result includes a content length corresponding to the audio data;
[0134] The first determining module 502 is further configured to:
[0135] Within a first preset time, when the content length is greater than a preset length threshold, it is determined to start voice endpoint detection of the audio data.
[0136] In some embodiments, the apparatus 500 further includes:
[0137] The ending module is configured to determine not to perform voice endpoint detection on the audio data if the first voice recognition result is not obtained within the first preset time.
[0138] In some embodiments, the apparatus further comprises:
[0139] A second acquisition module is configured to acquire a second speech recognition result obtained by the cloud server based on the audio data after determining to perform the speech endpoint detection on the audio data;
[0140] A third determination module is configured to determine a time interval between a first moment when the first first voice recognition result is obtained and a second moment when the second first voice recognition result is obtained;
[0141] The fourth determination module is configured to determine to end the voice endpoint detection of the audio data when the time interval is greater than or equal to a second preset time.
[0142] In some embodiments, the apparatus 500 further includes:
[0143] A receiving module, configured to receive wake-up response information fed back by the cloud server according to the first speech recognition result;
[0144] An output module is configured to output the wake-up response information.
[0145] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0146] Figure 6 700 is a hardware structure block diagram of a speech processing device according to an exemplary embodiment. For example, the device 700 may be a mobile phone, a computer, a digital broadcast terminal, a message transceiver, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0147] Reference Figure 6 , the device 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output (I / O) interface 712 , a sensor component 714 , and a communication component 716 .
[0148] The processing component 702 generally controls the overall operation of the device 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.
[0149] The memory 704 is configured to store various types of data to support operations on the device 700. Examples of such data include instructions for any application or method operating on the device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0150] The power component 706 provides power to the various components of the device 700. The power component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 700.
[0151] The multimedia component 708 includes a screen that provides an output interface between the device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0152] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC), and when the device 700 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 704 or sent via the communication component 716. In some embodiments, the audio component 710 also includes a speaker for outputting audio signals.
[0153] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0154] The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the device 700. For example, the sensor assembly 714 can detect the open / closed state of the device 700, the relative positioning of components, such as the display and keypad of the device 700, the sensor assembly 714 can also detect the position change of the device 700 or a component of the device 700, the presence or absence of user contact with the device 700, the orientation or acceleration / deceleration of the device 700, and the temperature change of the device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0155] The communication component 716 is configured to facilitate wired or wireless communication between the device 700 and other devices. The device 700 can access a wireless network based on a communication standard, such as WI-FI, 2G or 6G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0156] In an exemplary embodiment, the apparatus 700 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above methods.
[0157] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, and the instructions can be executed by the processor 720 of the device 700 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0158] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a speech processing device, enables the speech processing device to perform a speech processing method, the method being applied to an electronic device, comprising:
[0159] Collecting audio data, and obtaining a first speech recognition result obtained by the cloud server based on the audio data;
[0160] Determine whether to perform voice endpoint detection on the audio data according to the first voice recognition result.
[0161] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0162] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A speech processing method, characterized in that: Applied to electronic equipment, the method comprises: Collecting audio data, and obtaining a first speech recognition result obtained by a cloud server based on the audio data; wherein the first speech recognition result includes a content length corresponding to the audio data; Within a first preset time, when the content length is greater than a preset length threshold, it is determined to start voice endpoint detection of the audio data.
2. The method according to claim 1, characterized in that The obtaining a first speech recognition result obtained by the cloud server based on the audio data includes: Sending the audio data to a cloud server; The first speech recognition result obtained by processing the audio data based on automatic speech recognition technology ASR and fed back by the cloud server is received.
3. The method according to any one of claims 1 or 2, characterized in that: Before obtaining the first speech recognition result obtained by the cloud server based on the audio data, the method further includes: Detecting whether the audio data contains wake-up information; If the audio data contains the wake-up information, it is determined that the electronic device is in the wake-up state.
4. The method according to claim 1, characterized in that: The method further comprises: If the first speech recognition result is not obtained within the first preset time, it is determined not to perform speech endpoint detection on the audio data.
5. The method according to claim 1, characterized in that The method further comprises: After determining to perform the voice endpoint detection of the audio data, obtaining a second voice recognition result obtained by the cloud server based on the audio data; Determine a time interval between a first moment when the first speech recognition result is obtained and a second moment when the second speech recognition result is obtained; When the time interval is greater than or equal to a second preset time, it is determined that the voice endpoint detection of the audio data is terminated.
6. The method according to claim 1, characterized in that The method further comprises: Receiving wake-up response information fed back by the cloud server according to the first speech recognition result; The wake-up response information is output.
7. A speech processing device, characterized in that: Applied to electronic equipment, the device comprises: A first acquisition module is configured to collect audio data and obtain a first speech recognition result obtained by the cloud server based on the audio data; wherein the first speech recognition result includes a content length corresponding to the audio data; The first determination module is configured to determine to start voice endpoint detection of the audio data when the content length is greater than a preset length threshold within a first preset time.
8. The device according to claim 7, characterized in that The first acquisition module is further configured to: Sending the audio data to a cloud server; The first speech recognition result obtained by processing the audio data based on automatic speech recognition technology ASR and fed back by the cloud server is received.
9. The device according to any one of claims 7 or 8, characterized in that The device also includes: A detection module, configured to detect whether the audio data contains wake-up information; The second determination module is configured to determine that the electronic device is in a wake-up state if the audio data contains the wake-up information.
10. The device according to claim 7, characterized in that The device also includes: The ending module is configured to determine not to perform voice endpoint detection on the audio data if the first voice recognition result is not obtained within the first preset time.
11. The device according to claim 7, characterized in that The device also includes: A second acquisition module is configured to acquire a second speech recognition result obtained by the cloud server based on the audio data after determining to perform the speech endpoint detection on the audio data; A third determination module is configured to determine a time interval between a first moment when the first speech recognition result is obtained and a second moment when the second speech recognition result is obtained; The fourth determination module is configured to determine to end the voice endpoint detection of the audio data when the time interval is greater than or equal to a second preset time.
12. The device according to claim 7, characterized in that The device also includes: A receiving module, configured to receive wake-up response information fed back by the cloud server according to the first speech recognition result; An output module is configured to output the wake-up response information.
13. A speech processing device, characterized in that: Applied to electronic equipment, the device comprises: processor; a memory configured to store processor-executable instructions; Wherein, the processor is configured to: implement the steps in any one of the speech processing methods in claims 1 to 6 when executed.
14. A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a speech processing device, the device is enabled to perform the steps in any one of the speech processing methods of claims 1 to 6.
