Voice input method and device, electronic equipment and storage medium

Through the breath wake-up engine application registration and detection of wake-up events, voice data processing tasks are distributed, which solves the problem of inconvenient voice input methods in electronic devices, and realizes voice data collection and processing without manually clicking buttons, improving convenience.

CN119028333AActive Publication Date: 2024-11-26HONOR DEVICE CO LTD

Patent Information

Application Number
CN202310600976.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-25
Publication Date
2024-11-26
Estimated Expiration
2043-05-25

AI Technical Summary

Technical Problem

The voice input method in existing electronic devices is not convenient enough, especially when holding the device with one hand, it is difficult to operate the top notification button and the bottom voice input button at the same time, resulting in complex user operations.

Method used

The breath wake-up engine application registers and detects wake-up events, generates pending tasks, and distributes voice data to the input method application for processing, so that voice data acquisition and processing can be triggered without manually clicking the voice input button.

Benefits of technology

It simplifies user operations and improves the convenience of voice input, allowing users to obtain and process voice data in a timely manner without manually clicking the voice input button.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119028333A_ABST
    Figure CN119028333A_ABST
Patent Text Reader

Abstract

The invention provides a voice input method and device, electronic equipment and a storage medium, and is applied to the technical field of information. Under the condition that the first application meets the preset registration condition, the first application registers to the breath wake-up engine application; after the first application is successfully registered, when the breath wake-up engine application detects a breath wake-up event, the breath wake-up engine generates a to-be-processed task for the currently collected voice data, and distributes the to-be-processed task to the first application; and the first application obtains and processes the voice data according to the to-be-processed task. According to the embodiment of the invention, the convenience of voice input is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information technology, and in particular to a voice input method, device, electronic device and storage medium. Background Art

[0002] With the development of voice recognition technology, voice input scenarios in electronic devices are becoming more and more common. For example, various third-party applications such as search engines, social platforms, shopping software, input methods, etc. have begun to add voice input scenarios to support user voice instead of text input, and the application background will perform subsequent processing such as voice recognition.

[0003] Currently, voice input switching in various application scenarios needs to be done manually. Figure 1-1 and Figure 1-2 As shown in FIG. 1 , the button for switching voice input is difficult to click; on the other hand, users often use electronic devices with one hand, but the touch range of one hand is difficult to take into account the banner notification button at the top and the voice input button at the bottom at the same time, such as Figure 1-3 and Figure 1-4 As shown (OKAY means that it can be touched with one hand, among which EAST&ACCURATE and EASY mean that it can be touched simply and / or accurately with one hand; other areas are difficult to touch).

[0004] Therefore, a more convenient voice input method is needed to support the voice input scenario of electronic devices. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a voice input method, device, electronic device and storage medium to improve the convenience of voice input. The specific technical solution is as follows:

[0006] In a first aspect, an embodiment of the present application provides a voice input method, comprising:

[0007] When the first application meets the preset registration condition, the first application registers with the breath awakening engine application;

[0008] After the first application is successfully registered, when the breath awakening engine application detects a breath awakening event, the breath awakening engine generates a to-be-processed task for the currently collected voice data, and distributes the to-be-processed task to the first application;

[0009] The first application obtains and processes the voice data according to the task to be processed.

[0010] In one embodiment of the present application, the first application is an input method application, and the preset registration condition includes at least one of a soft keyboard being pulled up and a focus being in an input box of the input method application.

[0011] In one embodiment of the present application, the task to be processed includes an audio session identifier;

[0012] The first application obtains and processes the voice data according to the task to be processed, including:

[0013] The input method application obtains the voice data according to the audio session identifier;

[0014] The input method application calls an audio recognition algorithm to convert the voice data into text data;

[0015] The input method application inputs the text data into the input box.

[0016] In one embodiment of the present application, the method further includes:

[0017] In response to the registration of the first application, the breath wake-up engine application detects whether there is a registered application using a breath wake-up function;

[0018] In the case that no registered application is using the breath awakening function, the breath awakening engine application detects whether the switch of the breath awakening function is turned on; if not, turning on the switch of the breath awakening function;

[0019] When the switch of the breath awakening function is turned on, the breath awakening engine application sets the application connected to the breath awakening function as the first application to complete the registration of the first application.

[0020] In one embodiment of the present application, the method further includes:

[0021] After the first application is successfully registered, when the breath wake-up engine application detects a breath wake-up event, other breath wake-up events are shielded.

[0022] In one embodiment of the present application, the method further includes:

[0023] When the first application meets a preset release condition, the first application deregisters from the breath wake-up engine application;

[0024] In response to the deregistration of the first application, the breath wake-up engine application is restored to the working state before the first application was registered.

[0025] In one embodiment of the present application, the first application is an input method application, and the preset release condition includes at least one of the following: the voice data processing is completed, the soft keyboard is hidden, the focus is not in the input box of the input method application, and the user actively ends it.

[0026] In one embodiment of the present application, in response to the deregistration of the first application, the breath wake-up engine application is restored to the working state before the first application was registered, including:

[0027] In response to the deregistration of the first application, if the switch of the breath awakening function of the breath awakening engine application is turned off before the first application is registered, turning off the switch of the breath awakening function;

[0028] and / or,

[0029] In response to the deregistration of the first application, if the switch of the breath wake-up function of the breath wake-up function of the breath wake-up engine application is on before the first application is registered, the switch of the breath wake-up function is turned on; if the breath wake-up function has been connected to a second application before the first application is registered, the breath wake-up engine application sets the application connected to the breath wake-up function as the second application.

[0030] In a second aspect, an embodiment of the present application provides a voice input device, comprising:

[0031] An application registration module, configured to register the first application with the breath awakening engine application when the first application meets a preset registration condition;

[0032] A task distribution module, configured to, after the first application is successfully registered, when the breath awakening engine application detects a breath awakening event, cause the breath awakening engine to generate a to-be-processed task for the currently collected voice data, and distribute the to-be-processed task to the first application;

[0033] The voice data processing module is used for the first application to obtain and process the voice data according to the task to be processed.

[0034] In one embodiment of the present application, the first application is an input method application, and the preset registration condition includes at least one of a soft keyboard being pulled up and a focus being in an input box of the input method application.

[0035] In one embodiment of the present application, the task to be processed includes an audio session identifier;

[0036] The voice data processing module is specifically used for:

[0037] The input method application obtains the voice data according to the audio session identifier;

[0038] The input method application calls an audio recognition algorithm to convert the voice data into text data;

[0039] The input method application inputs the text data into the input box.

[0040] In one embodiment of the present application, the device further includes:

[0041] an application detection module, configured to detect, in response to the registration of the first application, whether the breath awakening engine application has a registered application using a breath awakening function;

[0042] a switch detection module, configured to detect, by the breath awakening engine application, whether the switch of the breath awakening function is turned on when no registered application is using the breath awakening function; and to turn on the switch of the breath awakening function if it is not turned on;

[0043] The application setting module is used for, when the switch of the breath awakening function is turned on, the breath awakening engine application sets the application connected to the breath awakening function as the first application to complete the registration of the first application.

[0044] In one embodiment of the present application, the device further includes:

[0045] The shielding module is used to shield other breath awakening events when the breath awakening engine application detects a breath awakening event after the first application is successfully registered.

[0046] In one embodiment of the present application, the device further includes:

[0047] A registration release module, configured to, when the first application meets a preset release condition, cause the first application to unregister from the breath wake-up engine application;

[0048] A state recovery module is used to restore the breath wake-up engine application to a working state before the first application was registered in response to the deregistration of the first application.

[0049] In one embodiment of the present application, the first application is an input method application, and the preset release condition includes at least one of the following: the voice data processing is completed, the soft keyboard is hidden, the focus is not in the input box of the input method application, and the user actively ends it.

[0050] In one embodiment of the present application, the state recovery module is specifically used to:

[0051] In response to the deregistration of the first application, if the switch of the breath awakening function of the breath awakening engine application is turned off before the first application is registered, turning off the switch of the breath awakening function;

[0052] and / or,

[0053] In response to the deregistration of the first application, if the switch of the breath wake-up function of the breath wake-up function of the breath wake-up engine application is on before the first application is registered, the switch of the breath wake-up function is turned on; if the breath wake-up function has been connected to a second application before the first application is registered, the breath wake-up engine application sets the application connected to the breath wake-up function as the second application.

[0054] In a third aspect, an embodiment of the present application provides an electronic device, including:

[0055] Memory, used to store computer programs;

[0056] The processor is used to implement any of the above-mentioned voice input methods when executing the program stored in the memory.

[0057] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the voice input method described above is implemented.

[0058] Beneficial effects of the embodiments of the present application:

[0059] The voice input method provided in the embodiment of the present application is as follows: first, when the first application meets the preset registration conditions, the first application registers with the breath wake-up engine application, so that the first application can obtain the voice data collected and the pending tasks generated by the breath wake-up engine application when the breath wake-up event is detected; after the first application is successfully registered, when the breath wake-up engine application detects the breath wake-up event, the breath wake-up engine application is triggered by the breath wake-up event to collect voice data, and then generates pending tasks for the collected voice data and distributes them to the first application, and then the first application obtains and processes the voice data according to the pending tasks, that is to say, the collection of voice data only needs to trigger the breath wake-up engine through the breath wake-up event, and then the first application can obtain the collected voice data and process it in time, without the user manually clicking the voice input button in the first application, which can trigger the collection of the voice data that the user needs to input, thereby simplifying the user's operation and improving the convenience of voice input.

[0060] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0062] Figure 1-1 An example diagram of the button position for the first type of voice input provided in an embodiment of the present application;

[0063] Figure 1-2 An example diagram of the button position for the second voice input provided in an embodiment of the present application;

[0064] Figure 1-3 An example diagram of the first touch range for single-handed holding provided in an embodiment of the present application;

[0065] Figure 1-4 This is an example diagram of the second touch range for one-hand holding provided in an embodiment of the present application;

[0066] Figure 1-5 A schematic diagram of a breath awakening event provided in an embodiment of the present application;

[0067] Figure 1-6 A schematic diagram for introducing a scenario of the breath awakening engine application provided in an embodiment of the present application;

[0068] Figure 2 A schematic diagram of a first structure of an electronic device provided in an embodiment of the present application;

[0069] Figure 3 A second structural diagram of an electronic device provided in an embodiment of the present application;

[0070] Figure 4 A software structure block diagram of an electronic device provided in an embodiment of the present application;

[0071] Figure 5 A flowchart of a first voice input method provided in an embodiment of the present application;

[0072] Figure 6 A possible implementation of step S303 provided in an embodiment of the present application;

[0073] Figure 7 A flowchart of a second voice input method provided in an embodiment of the present application;

[0074] Figure 8-1 A flowchart of a third voice input method provided in an embodiment of the present application;

[0075] Figure 8-2 An example diagram of the first voice input method provided in an embodiment of the present application;

[0076] Figure 9-1 An example diagram of the second voice input method provided in an embodiment of the present application;

[0077] Figure 9-2 A flowchart of a voice input method provided in an embodiment of the present application;

[0078] Fig.10 A schematic diagram of the structure of a voice input device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0079] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only 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 based on the present application belong to the scope of protection of the present application.

[0080] Since the method of using voice input in electronic devices in the related art is not convenient enough, in order to solve this problem, the embodiments of the present application provide a voice input method, device, electronic device and storage medium.

[0081] The implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0082] The voice input method provided in the embodiment of the present application can be applied to any electronic device with voice input capability, and the electronic device can be an electronic device with display hardware and corresponding software support. For example, the electronic device can be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, a notebook computer, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, a personal digital assistant (personal digital assistant, PDA), a household device, etc. The present application does not impose any restrictions on the specific type of the electronic device.

[0083] In a possible embodiment, in order to more clearly describe the electronic device provided by the embodiment of the present application, a possible application scenario of the electronic device provided by the embodiment of the present application is exemplarily described below. It can be understood that the following example is only a possible application scenario of the electronic device provided by the embodiment of the present application. In other possible embodiments, the electronic device provided by the embodiment of the present application can also be applied to other possible application scenarios, and the following example does not impose any limitation on this.

[0084] The voice input method provided in the embodiments of the present application is applicable to any user who uses an electronic device and the voice assistant therein, for example, office workers, white-collar workers, public servants, workers, etc.; it is applicable to any scenario in which a user needs to use an electronic device and the voice assistant therein, specifically, a scenario in which the electronic device cannot be directly operated, or a scenario in which the voice assistant cannot be awakened by voice, for example, when the user is in a relatively quiet public scene such as a coffee shop, a western restaurant, or a high-speed rail / airport lounge, when the user is in a subway station, an airport, a railway station security check, a scenic spot ticket gate, etc., and has a lot of luggage in his hands, when the user is in a busy place such as a shopping mall or a supermarket, and needs to purchase goods in his hands, when the user is walking the dog outdoors, when the user is driving in / out of a parking lot, a toll station, a community / park, etc., and his hands have just left the steering wheel... and so on.

[0085] like Figure 1-5 As shown, Figure 1-5 A scenario diagram of a method for waking up an application provided in an embodiment of the present application is shown, where a user can lift up the electronic device, bring the bottom of the electronic device close to the mouth, and speak into the microphone.

[0086] After the electronic device collects the corresponding voice data when the user speaks through the microphone, and the corresponding gesture data when the user lifts the electronic device through the inertial detection sensor, it is sent to the low-power ADSP, and the ADSP detects the voice data and gesture data through the breath awakening model. When the ADSP detects that the similarity between the voice data and the preset awakening breath data is greater than the first threshold, and the similarity between the gesture data and the preset awakening gesture data is greater than the second threshold, the ADSP sends the voice data to the breath awakening software module. The breath awakening software module controls the startup of the application.

[0087] Among them, the distance between the electronic device and the user's mouth can be maintained at 0-5cm, which makes it easier for the microphone of the electronic device to accurately collect the user's voice data.

[0088] In addition, the above-mentioned gesture data may be wrist-raising gesture data.

[0089] in, Figure 1-5 From the gesture state indicated by the box A in the left figure to the gesture state indicated by the box B in the right figure, it can be seen that the user can lift the electronic device by raising the wrist, and the inertial detection sensor can collect the gesture data of the wrist raising.

[0090] Figure 1-5 As can be seen from the right picture, after the user raises the electronic device with the wrist-raising gesture, he or she puts his or her mouth close to the microphone of the electronic device to speak, and can emit the breath indicated by part C. The microphone can collect the breath and the voice data corresponding to the breath.

[0091] like Figure 1-6 As shown, a schematic diagram of a scenario introduction of a breath awakening engine application provided by an embodiment of the present application is shown. It is used to remind the user that breath awakening can enable natural conversation and instant question and answer. In the case where the electronic device is a mobile phone, when the user lifts the mobile phone, brings the bottom of the mobile phone close to the mouth (within 5 cm), and points it at the bottom microphone, the user's conversation journey will be started (addressing the user as "you" to enhance the sense of interaction), which also means that in this case the breath awakening engine application will detect the breath awakening event.

[0092] It should be understood that the above is an example of a scenario and does not limit the scenario of the present application.

[0093] First, in a first aspect of an embodiment of the present application, an electronic device is provided, such as Figure 2 As shown, the electronic device includes:

[0094] Memory 201, used for storing computer programs;

[0095] The processor 202 is used to execute the program stored in the memory 201, and implements the following steps:

[0096] When the first application meets the preset registration condition, the first application registers with the breath awakening engine application;

[0097] After the first application is successfully registered, when the breath awakening engine application detects a breath awakening event, the breath awakening engine generates a to-be-processed task for the currently collected voice data, and distributes the to-be-processed task to the first application;

[0098] The first application obtains and processes the voice data according to the task to be processed.

[0099] Furthermore, the electronic device may further include a communication bus and / or a communication interface, and the processor 202, the communication interface, and the memory 201 communicate with each other via the communication bus.

[0100] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0101] The communication interface is used for communication between the above electronic device and other devices.

[0102] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0103] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0104] For ease of explanation, a mobile phone is used as an example of an electronic device.

[0105] like Figure 3 As shown, in some embodiments, the electronic device 300 may include a processor 301 and a communication module 302 .

[0106] The processor 301 and Figure 2 The processor 202 may be the same as the processor 201, and may include one or more processing units. For example, the processor 301 may include an application processor (AP), a modem processor, a graphics processor, an image signal processor (ISP), a controller, a memory, a video stream codec, a digital signal processor, a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or may be integrated in one or more processors 301.

[0107] The controller may be the nerve center and command center of the electronic device 300. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0108] The processor 301 may also be provided with a memory for storing instructions and data.

[0109] In some embodiments, the memory in the processor 301 is a cache memory. The memory can store instructions or data that the processor 301 has just used or cyclically used. If the processor 301 needs to use the instruction or data again, it can be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 301, and thus improves the efficiency of the system.

[0110] In some embodiments, the processor 301 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0111] The communication module 302 may include an antenna 1, an antenna 2, a mobile communication module, and / or a wireless communication module.

[0112] like Figure 3 As shown, in some embodiments, the electronic device 300 may also include an external memory interface 305, an internal memory 304, a USB interface 306, a charging management module 307, a power management module 308, a battery 309, and a sensor module 303, etc.

[0113] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 300 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0114] The charging management module 307 is used to receive charging input from a charger, where the charger can be a wireless charger or a wired charger.

[0115] In some wired charging embodiments, the charging management module 307 may receive charging input from a wired charger through the USB interface 306 .

[0116] In some wireless charging embodiments, the charging management module 307 may receive wireless charging input via a wireless charging coil of the electronic device 300. While the charging management module 307 is charging the battery 309, it may also provide power to the electronic device 300 via the power management module 308.

[0117] The power management module 308 is used to connect the battery 309, the charging management module 307 and the processor 301. The power management module 308 receives input from the battery 309 and / or the charging management module 307, and supplies power to the processor 301, the internal memory 304, the external memory, and the communication module 302. The power management module 308 can also be used to monitor parameters such as battery capacity, battery cycle number, and battery health status (leakage, impedance).

[0118] In some other embodiments, the power management module 308 may also be disposed in the processor 301 .

[0119] In other embodiments, the power management module 308 and the charging management module 307 may also be disposed in the same device.

[0120] The external memory interface 305 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 300. The external memory card communicates with the processor 301 through the external memory interface 305 to implement a data storage function. For example, files such as music and video streams are stored in the external memory card.

[0121] The internal memory 304 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 301 executes various functional applications and data processing of the electronic device 300 by running the instructions stored in the internal memory 304. The internal memory 304 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the electronic device 300 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 304 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0122] The sensor module 303 in the electronic device 300 may include image sensors, touch sensors, pressure sensors, gyroscope sensors, air pressure sensors, magnetic sensors, acceleration sensors, distance sensors, proximity light sensors, ambient light sensors, fingerprint sensors, temperature sensors, bone conduction sensors and other components to realize the sensing and / or acquisition functions of different signals.

[0123] Optionally, the electronic device 300 may further include peripheral devices, such as a mouse, buttons, indicator lights, a keyboard, a speaker, a microphone, etc.

[0124] The buttons include a power button, a volume button, etc. The buttons may be mechanical buttons or touch buttons. The electronic device 300 may receive button inputs and generate key signal inputs related to user settings and function control of the electronic device 300.

[0125] The indicator may be a light indicator, which may be used to indicate the charging status and the change in the power level, and may also be used to indicate messages, missed calls, and notifications, etc.

[0126] It can be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 300 .

[0127] In other embodiments, the electronic device 300 may include more or fewer components than shown, or combine some components, or separate some components, or arrange the components differently. The components shown may be implemented in hardware, software, or a combination of software and hardware.

[0128] In electronic devices, the software system can be divided into several layers, such as Figure 4 As shown, Figure 4 A software structure diagram of an electronic device provided in an embodiment of the present application. The layered architecture divides the software system of the electronic device into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the electronic device application system can be divided into an application layer (application), a framework layer (framework, fwk), a driver layer (hardware abstract layer, HAL) and a kernel layer (kernel) / chip layer.

[0129] The application layer can include a series of application packages, and the application layer runs applications by calling the application programming interface (API) provided by the application framework layer. An application package can include multiple applications, such as a breath wake-up engine application, a voice assistant application, an input method application, a call application, and a map application.

[0130] The framework layer provides API and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 4 As shown, the application framework layer may include an audio trigger module (Sound Trigger). The audio trigger module may be used to control the start of an application in the application layer.

[0131] In addition, the framework layer may also include a sound trigger module, an audio policy service module, etc. In addition, the application framework layer may also include an audio service module, an audio trigger service module, an audio indication module, etc. The sound trigger module is used to send a wake-up event to the audio trigger module, and to send a notification to the audio driver of the driver layer to instruct the breath wake-up model to stop running or start running. The audio policy service module is used to establish a voice recognition channel with the voice assistant application of the application layer.

[0132] In addition, the audio service module is used to send a startup notification to the audio trigger module in response to the startup notification sent by the application of the application layer. The audio trigger module is also used to send a startup notification to the audio trigger service module in response to the startup notification sent by the audio service module. The audio trigger service module is used to send a startup notification to the sound trigger module in response to the startup notification sent by the audio trigger module. The sound trigger module is also used to send a notification to start running the breath awakening model to the audio strategy service module in response to the startup notification sent by the audio trigger module. The audio strategy service module starts the notification of running the breath awakening model in response to the notification of starting running the breath awakening model. The audio indication module is used to send a notification of loading the breath awakening model to the audio driver of the driver layer 3 in response to the notification of loading the breath awakening model sent by the audio strategy service module. The audio driver of the driver layer is used to send a notification for instructing the start of running the breath awakening model to the audio digital signal processor of the breath awakening processing device.

[0133] The driver layer is a layer between hardware and software, used to drive the hardware to make it work. The driver layer can be installed with multiple drivers for driving the hardware to work. For example, the audio driver (sound trigger hal), the sound trigger driver (Sound Trigger driver) and the audio stream input driver (Audio Stream in driver).

[0134] The kernel layer / chip layer includes an audio digital signal processing (ADSP), which is used to determine the presence of a breath wake-up event based on the breath wake-up algorithm. ADSP can obtain the event identifier corresponding to the wake-up event, namely the event ID (identity), which is used to distinguish between breath wake-up events and voice wake-up events. The event ID is preset in ADSP by the developer. In an example, after detecting a breath wake-up event, ADSP reports the breath wake-up event containing the event ID to the driver layer; the driver layer then reports the breath wake-up event to the framework layer; the framework layer reports the breath wake-up event to the breath wake-up engine application, and the breath wake-up engine application processes the breath wake-up event.

[0135] It should be noted that the application layer, application framework layer, driver layer and kernel layer / chip layer may also include other contents, which are not specifically limited here.

[0136] By applying the method of the embodiment of the present application, the breath wake-up event can be reported layer by layer after the breath wake-up event with the event ID is identified through the underlying breath wake-up algorithm, so that the breath wake-up engine application can determine the target application for voice data processing according to the business status of the registered application after receiving the breath wake-up event, and then enable the target application to obtain the voice data for data processing according to the audio session identifier or buffer size.

[0137] In order to solve the technical problem that the method of using voice input in electronic devices is not convenient enough, the second aspect of the embodiment of the present application is as follows: Figure 5 As shown, Figure 5 A flowchart of a first voice input method provided in an embodiment of the present application includes:

[0138] Step S501: When a first application meets a preset registration condition, the first application registers with the breath awakening engine application.

[0139] The first application is any application that can process voice data. For example, the first application can be a recording application, a video shooting application, a search engine application, a social platform application, a shopping software application, or an input method application.

[0140] The preset registration condition can be used to indicate that the first application is currently being used by the user. For example, the first application is currently inputting content or receiving relevant instructions from the user. The input content can be text data or voice data, and the relevant instructions can be implemented by finger operation or voice instructions. The first application registers with the breath awakening engine application by sending a registration message to the breath awakening engine application, and the breath awakening engine application completes the registration of the first application according to the registration message of the first application.

[0141] In one embodiment of the present application, when the first application is an input method application, the preset registration condition includes at least one of the soft keyboard being pulled up and the focus being in the input box of the input method application. That is, the preset registration condition includes that the soft keyboard used for inputting content in the input method application has been pulled up by the user to prepare for inputting content (indicating that the input method application is started), the focus (cursor) is in the input box (indicating that the input focus is valid), etc. In addition, the preset registration condition may also include other indications that the user needs to operate the input method application, or the user is currently unable to directly operate the input method application, and the input method application is required to collect voice data and process it to meet user needs, etc. In other embodiments, when the first application is a recording application, when the recording application is the foreground application and the focus is on the recording application, it is determined that the recording application meets the preset registration conditions.

[0142] When the first application is an input method application and the preset registration conditions include at least one of the soft keyboard being pulled up and the focus being in the input box of the input method application, it means that the input method is currently about to input content, so the input method application needs to register with the breath wake-up engine application to ensure that the voice data input by the user can be processed by the input method application.

[0143] Therefore, when the first application meets the preset registration conditions, the first application registers with the breath awakening engine application.

[0144] Step S502, after the first application is successfully registered, when the breath awakening engine application detects a breath awakening event, the breath awakening engine generates a task to be processed for the currently collected voice data, and distributes the task to be processed to the first application.

[0145] At this time, the breath wake-up engine application generates a pending task for the collected voice data. The pending task is used to trigger the first application to obtain the voice data input by the current user collected by the breath wake-up engine application, and process the voice data. Exemplarily, the pending task may include parameters such as an audio session ID and buffer size for distinguishing voice data. The first application can uniquely obtain voice data based on these parameters.

[0146] Step S503: the first application obtains and processes the voice data according to the task to be processed.

[0147] The first application will obtain voice data from the breath awakening engine application according to the task to be processed, and process the voice data. Exemplarily, when the first application is an output method application, the output method application can call a voice recognition algorithm to convert the voice data into text, and input the text into the input box. In one example, when the first application is a recording application, the recording application can call a voice processing algorithm to perform a series of operations such as denoising and sound wave shaping on the voice data, and finally store the processed voice data in the default directory of the recording application.

[0148] As can be seen from the above, the voice input method provided in the embodiment of the present application is that, first, when the first application meets the preset registration conditions, the first application registers with the breath wake-up engine application, so that the first application can obtain the voice data collected and the pending tasks generated by the breath wake-up engine application when the breath wake-up event is detected; after the first application is successfully registered, when the breath wake-up engine application detects the breath wake-up event, the breath wake-up engine application is triggered by the breath wake-up event to collect voice data, and then generates pending tasks for the collected voice data and distributes them to the first application, and then the first application obtains and processes the voice data according to the pending tasks, that is to say, the collection of voice data only needs to trigger the breath wake-up engine through the breath wake-up event, and then the first application can obtain the collected voice data and process it in time, without the user manually clicking the voice input button in the first application, which can trigger the collection of the voice data that the user needs to input, thereby simplifying the user's operation and improving the convenience of voice input.

[0149] In one embodiment of the present application, the task to be processed includes an audio session identifier, which is used to distinguish the voice data collected by the breath awakening engine application. The voice data corresponding to each task to be processed for each first application is unique, and each voice data can be distinguished by its corresponding audio sessionid. In addition, in one example, the task to be processed may also include other parameters corresponding to the collected voice data, such as the data size of the voice data, the buffer size, etc.

[0150] In the case where the first application is an input method application, such as Figure 6 As shown, in step S503, the first application obtains and processes the voice data according to the task to be processed, including:

[0151] Step S601, the input method application obtains the voice data according to the audio session identifier;

[0152] Step S602, the input method application calls the audio recognition algorithm to convert the voice data into text data;

[0153] Step S603: the input method application inputs the text data into the input box.

[0154] The input method application obtains the voice data currently collected by the breath wake-up engine application according to the audio session identifier included in the pending tasks generated by the breath wake-up engine application, and then the input method application calls the built-in audio recognition algorithm to recognize the voice data, obtains the content represented by the voice data, converts the content from voice form to text form, obtains the converted text data, and then the input method application inputs the text data into the input box to complete the input operation.

[0155] As can be seen from the above, in the voice input method provided in the embodiment of the present application, the input method application obtains voice data according to the audio session identifier included in the task to be processed generated by the breath awakening engine application, and then converts the voice data into text data and inputs it into the input box, thereby realizing the acquisition and input of the content that the user needs to input, so that the user can complete the input operation of the content without manually clicking the voice input button, which simplifies the user's operation and makes content input simpler and faster.

[0156] In one embodiment of the present application, Figure 7 As shown, the embodiment of the present application provides a flow chart of a second voice input method, and the method further includes:

[0157] Step S701, in response to the registration of the first application, the breath awakening engine application detects whether there is a registered application using the breath awakening function;

[0158] Step S702, when there is no registered application using the breath awakening function, the breath awakening engine application detects whether the switch of the breath awakening function is turned on; if not, turning on the switch of the breath awakening function;

[0159] Step S703, when the switch of the breath awakening function is turned on, the breath awakening engine application sets the application connected to the breath awakening function as the first application to complete the registration of the first application.

[0160] When the first application registers with the breath awakening engine application, the breath awakening engine application first detects whether there is a previously registered application currently using the breath awakening function. If so, it means that the breath awakening function is in the process of being used by the connected application and cannot be reused, and the first application cannot be registered at present. In an example, the breath awakening engine application can reject the registration of the first application at this time, or temporarily suspend the registration request of the first application, and respond to the registration of the first application after the breath awakening function returns to the idle state, and then perform subsequent detection.

[0161] If there is no registered application using the breath wake-up function, it means that the breath wake-up function is currently in an idle state, and the breath wake-up engine application continues to detect whether the switch of the breath wake-up function in the electronic device is turned on. If it is turned on, it means that the breath wake-up function can be used directly, and it can directly respond to the registration of the first application and set the application connected to the breath wake-up function as the first application; if it is not turned on, the breath wake-up engine application needs to turn on the switch of the breath wake-up function first, and then respond to the registration of the first application and set the application connected to the breath wake-up function as the first application, thereby completing the registration of the first application to indicate that the first application can currently use the breath wake-up function. Among them, when the switch of the breath wake-up function is turned on, the breath wake-up engine application monitors the breath wake-up event; when the switch of the breath wake-up function is turned off, the breath wake-up engine application does not monitor the breath wake-up event.

[0162] In one embodiment of the present application, the above method further includes:

[0163] After the first application is successfully registered, when the breath wake-up engine application detects a breath wake-up event, other breath wake-up events are shielded.

[0164] After the first application is successfully registered, when the breath wake-up engine application detects a breath wake-up event, the breath wake-up engine application will collect voice data for the breath wake-up event; during this process, the breath wake-up engine application blocks other breath wake-up events, that is, before a breath wake-up event is completed, other breath wake-up events will not be triggered. Only after the voice data of the current breath wake-up event is collected, other breath wake-up events are allowed to be triggered.

[0165] As can be seen from the above, in the voice input method provided by the embodiment of the present application, when the first application registers with the breath wake-up engine application, the breath wake-up engine application can detect whether the breath wake-up function is idle or not, and can also detect whether the switch of the breath wake-up function is turned on or not, and can also turn on the switch of the breath wake-up function that is in the off state by itself. Moreover, after the first application is successfully registered, when the breath wake-up engine application detects a breath wake-up event, it will also shield other breath wake-up events that are not related to the first application, so that the breath wake-up function can be used in an orderly and effective manner by various applications including the first application, so that various applications including the first application can collect and process various voice data in an orderly and timely manner, avoid invalid cycle wake-up and interference in the voice data collection process, and further improve the convenience of voice input and the input and processing efficiency.

[0166] In one embodiment of the present application, Figure 8-1 As shown, the embodiment of the present application provides a flow chart of a third voice input method, and the method further includes:

[0167] Step S801, when the first application meets a preset release condition, the first application deregisters from the breath wake-up engine application;

[0168] Step S802: in response to the deregistration of the first application, the breath wake-up engine application is restored to the working state before the first application is registered.

[0169] The preset release condition indicates that the first application is no longer inputting content or receiving relevant instructions from the user, and no longer needs to prepare for collecting voice data and processing the voice data. Specifically, the first application may have input content or received instructions, or the user may actively close the application. For example, when the user makes a mistake and does not actually need to input content or issue instructions to the first application, the user actively closes the first application. In one example, the user closes the first application, or performs an operation on the interface of the first application indicating that the content input is completed, such as the user closes the search engine application, or clicks the search button in the search interface, or the last voice instruction received by the search engine application is "search", the user closes the social platform application, or clicks the send button in the message sending interface, or the last voice instruction received by the social platform application is "send", etc.; or the first application perceives that the user no longer inputs content or issues instructions within a preset time period (pre-set time period, such as 3 seconds, 5 seconds, etc.), such as the user does not input content or instructions and does not operate in the search interface of the search engine application within a preset time period, the user does not input content or instructions and does not operate in the message sending interface of the social platform application within a preset time period, etc.

[0170] In one embodiment of the present application, the first application is an input method application, and the preset release condition may include at least one of: voice data processing is completed (i.e., the input method application has converted the input voice data into text data and input it into the input box), soft keyboard is hidden (i.e., the soft keyboard used for inputting content of the input method application is hidden and the input method application is no longer initiated), the focus is not in the input box of the input method application (i.e., the user's cursor is no longer in the input box of the input method application within a preset time period), and the user actively ends (i.e., the user actively ends the input content), all of which indicate that the user no longer needs to use the input method application to input content. Thus, it can be determined in a timely manner that the first application no longer needs to use the breath wake-up function.

[0171] In this case, the first application unregisters from the breath wake-up engine application to indicate that the first application no longer needs to use the breath wake-up function, so that the breath wake-up engine application responds to the unregistration of the first application and restores the breath wake-up engine application to the working state before the first application was registered. This avoids the situation where the first application continues to affect the breath wake-up engine application after it stops using the breath wake-up function, or the settings of the breath wake-up engine application itself are changed due to the use of the first application, thereby improving the stability of the breath wake-up engine.

[0172] In one embodiment of the present application, in response to the deregistration of the first application, the breath wake-up engine application is restored to the working state before the first application is registered in step S802, including:

[0173] In response to the deregistration of the first application, if the switch of the breath awakening function of the breath awakening engine application is turned off before the first application is registered, turning off the switch of the breath awakening function;

[0174] and / or,

[0175] In response to the deregistration of the first application, if the switch of the breath wake-up function of the breath wake-up function of the breath wake-up engine application is on before the first application is registered, the switch of the breath wake-up function is turned on; if the breath wake-up function has been connected to a second application before the first application is registered, the breath wake-up engine application sets the application connected to the breath wake-up function as the second application.

[0176] The breath wake-up engine application recovers to its previous working state in response to the deregistration of the first application. If the switch of the breath wake-up function was turned off before, the switch of the breath wake-up function is restored to the off state. If the switch of the breath wake-up function was turned on before, the switch of the breath wake-up function is restored to the on state. If the breath wake-up function has been docked with a second application before, the application docked with the breath wake-up function is reset to the second application.

[0177] like Figure 8-2 As shown, taking the first application as an input method application as an example, the breath awakening engine application can include a switch state management module and a scene perception decision module. Among them, the scene perception decision module is used to detect the docking status of the registered application and distribute the pending tasks to the target application (input method application), so that the input method application can fetch the stream according to the specified audio session identifier in the pending task. The switch state management module is used to manage the switch state of the breath awakening function, determine whether to open or close the breath awakening path according to the switch state, and is also used to register the application. The input method application first registers with the switch management module in the breath awakening engine application. After completing the registration, the switch state management module can query the switch state of the breath awakening function. If the switch state of the breath awakening function is identified as open, the breath awakening path is opened. At this time, the breath awakening engine application can detect the breath awakening event; if the switch state of the breath awakening function is identified as closed, the breath awakening path is closed. At this time, the breath awakening engine application cannot detect the breath awakening event.

[0178] As can be seen from the above, the voice input method provided in the embodiment of the present application can promptly shut down the use of the breath wake-up function by the first application, avoiding obstacles to the use of the breath wake-up function by other applications. At the same time, the switch state of the breath wake-up function in the breath wake-up engine application and the docking application are restored to the state before the first application was registered, avoiding the possible lasting impact after the first application is contacted and registered, thereby improving the stability of the breath wake-up engine application's own settings.

[0179] In one embodiment of the present application, Figure 9-1 and Figure 9-2 As shown, an example diagram of a voice input method is provided. When the first application is an input method application, the soft keyboard in the input method application interface has been pulled up, and the voice input is combined with the breath wake-up technology required for the breath wake-up input to collect voice data and generate pending tasks for the input method application, so that the input method application converts the voice data into text and sends the converted text.

[0180] Specifically, Figure 9-2As shown, the input method application first needs to meet the preset registration conditions such as the soft keyboard has been pulled up and displayed, indicating that the input method application is started and the input focus (cursor) is valid. If not met, it will end directly. If met, the input method application will register with the breath wake-up engine application. The breath wake-up engine application will detect whether the breath wake-up function is in use. If it is in use, it will end directly. If it is not in use, the breath wake-up engine application will detect whether the switch of the breath wake-up function is turned on. If not turned on, turn on the switch; if it is turned on, directly switch the target application, that is, set the docked application to the input method application, and then the breath wake-up engine application monitors and detects breath wake-up to obtain the current breath wake-up event, while shielding other new breath wake-up events.

[0181] When there is a breath wake-up event, the breath wake-up engine application collects the current voice data and generates a pending task for the voice data. Then the breath wake-up engine application distributes the pending task to the input method application to notify the input method application to obtain the pending task. Then the input method application starts the recording function to obtain the voice data, and performs audio recognition on the voice data, converts it into text data, and completes the input box input. When the input method application meets the preset release conditions for the end of input, the input method application unregisters from the breath wake-up engine application, and then the breath wake-up engine application returns to its previous working state, that is, the breath wake-up engine application detects whether the original switch state of the breath wake-up function is on. If so, the breath wake-up monitoring of the original target application (the original connected application) is restored. Otherwise, the breath wake-up function is turned off, the target application is restored, and then the end is achieved.

[0182] See also Fig.10 , Fig.10 A schematic diagram of the structure of a voice input device provided in an embodiment of the present application includes:

[0183] An application registration module 1001, configured to register the first application with the breath awakening engine application when the first application meets a preset registration condition;

[0184] A task distribution module 1002 is used for, after the first application is successfully registered, when the breath awakening engine application detects a breath awakening event, the breath awakening engine generates a to-be-processed task for the currently collected voice data, and distributes the to-be-processed task to the first application;

[0185] The voice data processing module 1003 is used for the first application to obtain and process the voice data according to the task to be processed.

[0186] In one embodiment of the present application, the first application is an input method application, and the preset registration condition includes at least one of a soft keyboard being pulled up and a focus being in an input box of the input method application.

[0187] As can be seen from the above, the voice input device provided in the embodiment of the present application, first, when the first application meets the preset registration conditions, the first application registers with the breath wake-up engine application, so that the first application can obtain the voice data collected and the pending tasks generated by the breath wake-up engine application when the breath wake-up event is detected; after the first application is successfully registered, when the breath wake-up engine application detects the breath wake-up event, the breath wake-up engine application is triggered by the breath wake-up event to collect voice data, and then generates pending tasks for the collected voice data and distributes them to the first application, and then the first application obtains and processes the voice data according to the pending tasks, that is to say, the collection of voice data only needs to trigger the breath wake-up engine through the breath wake-up event, and then the first application can obtain the collected voice data and process it in time, without the user manually clicking the voice input button in the first application, it can trigger the collection of the voice data that the user needs to input, thereby simplifying the user's operation and improving the convenience of voice input.

[0188] In one embodiment of the present application, the task to be processed includes an audio session identifier;

[0189] The voice data processing module 1003 is specifically used for:

[0190] The input method application obtains the voice data according to the audio session identifier;

[0191] The input method application calls an audio recognition algorithm to convert the voice data into text data;

[0192] The input method application inputs the text data into the input box.

[0193] As can be seen from the above, in the voice input device provided in the embodiment of the present application, the input method application obtains voice data according to the audio session identifier included in the task to be processed generated by the breath awakening engine application, and then converts the voice data into text data and inputs it into the input box, thereby realizing the acquisition and input of the content that the user needs to input, so that the user can complete the input operation of the content without manually clicking the voice input button in the first application, which simplifies the user's operation and makes content input simpler and faster.

[0194] In one embodiment of the present application, the device further includes:

[0195] an application detection module, configured to detect, in response to the registration of the first application, whether the breath awakening engine application has a registered application using a breath awakening function;

[0196] a switch detection module, configured to detect, by the breath awakening engine application, whether the switch of the breath awakening function is turned on when no registered application is using the breath awakening function; and to turn on the switch of the breath awakening function if it is not turned on;

[0197] The application setting module is used for, when the switch of the breath awakening function is turned on, the breath awakening engine application sets the application connected to the breath awakening function as the first application to complete the registration of the first application.

[0198] As can be seen from the above, in the voice input device provided by the embodiment of the present application, when the first application registers with the breath wake-up engine application, the breath wake-up engine application can detect by itself whether the breath wake-up function is idle, and can also detect by itself whether the switch of the breath wake-up function is turned on, and can also turn on the switch of the breath wake-up function that is in the off state by itself. Moreover, after the first application is successfully registered, when the breath wake-up engine application detects a breath wake-up event, it will also shield other breath wake-up events that are not related to the first application, so that the breath wake-up function can be used in an orderly and effective manner by various applications including the first application, so that various applications including the first application can collect and process various voice data in an orderly and timely manner, avoid invalid cycle wake-up and interference in the voice data collection process, and further improve the convenience of voice input and the input and processing efficiency.

[0199] In one embodiment of the present application, the device further includes:

[0200] The shielding module is used to shield other breath awakening events when the breath awakening engine application detects a breath awakening event after the first application is successfully registered.

[0201] In one embodiment of the present application, the device further includes:

[0202] A registration release module, configured to, when the first application meets a preset release condition, cause the first application to unregister from the breath wake-up engine application;

[0203] A state recovery module is used to restore the breath wake-up engine application to a working state before the first application was registered in response to the deregistration of the first application.

[0204] In one embodiment of the present application, the first application is an input method application, and the preset release condition includes at least one of the following: the voice data processing is completed, the soft keyboard is hidden, the focus is not in the input box of the input method application, and the user actively ends it.

[0205] In one embodiment of the present application, the state recovery module is specifically used to:

[0206] In response to the deregistration of the first application, if the switch of the breath awakening function of the breath awakening engine application is turned off before the first application is registered, turning off the switch of the breath awakening function;

[0207] and / or,

[0208] In response to the deregistration of the first application, if the switch of the breath wake-up function of the breath wake-up function of the breath wake-up engine application is on before the first application is registered, the switch of the breath wake-up function is turned on; if the breath wake-up function has been connected to a second application before the first application is registered, the breath wake-up engine application sets the application connected to the breath wake-up function as the second application.

[0209] As can be seen from the above, the voice input device provided in the embodiment of the present application can promptly shut down the use of the breath wake-up function by the first application, avoiding obstacles to the use of the breath wake-up function by other applications. At the same time, the switch state of the breath wake-up function in the breath wake-up engine application and the docking application are restored to the state before the first application was registered, avoiding the possible lasting impact after the first application is contacted and registered, thereby improving the stability of the breath wake-up engine application's own settings.

[0210] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned voice input methods are implemented.

[0211] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any of the voice input methods in the above embodiments.

[0212] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0213] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including 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, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0214] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and electronic device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0215] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A voice input method, characterized in that: include: When the first application meets the preset registration condition, the first application registers with the breath awakening engine application; After the first application is successfully registered, when the breath awakening engine application detects a breath awakening event, the breath awakening engine generates a task to be processed for the currently collected voice data, and distributes the task to be processed to the first application; The first application obtains and processes the voice data according to the task to be processed.

2. The method according to claim 1, characterized in that The first application is an input method application, and the preset registration condition includes at least one of a soft keyboard being pulled up and a focus being in an input box of the input method application.

3. The method according to claim 2, characterized in that The task to be processed includes an audio session identifier; The first application obtains and processes the voice data according to the task to be processed, including: The input method application obtains the voice data according to the audio session identifier; The input method application calls an audio recognition algorithm to convert the voice data into text data; The input method application inputs the text data into the input box.

4. The method according to claim 1, characterized in that: The method further comprises: In response to the registration of the first application, the breath wake-up engine application detects whether there is a registered application using a breath wake-up function; In the case that no registered application is using the breath awakening function, the breath awakening engine application detects whether the switch of the breath awakening function is turned on; if not, turning on the switch of the breath awakening function; When the switch of the breath awakening function is turned on, the breath awakening engine application sets the application connected to the breath awakening function as the first application to complete the registration of the first application.

5. The method according to claim 1, characterized in that The method further comprises: After the first application is successfully registered, when the breath wake-up engine application detects a breath wake-up event, other breath wake-up events are shielded.

6. The method according to claim 1, characterized in that The method further comprises: When the first application meets a preset release condition, the first application deregisters from the breath wake-up engine application; In response to the deregistration of the first application, the breath wake-up engine application is restored to the working state before the first application was registered.

7. The method according to claim 6, characterized in that The first application is an input method application, and the preset release condition includes at least one of the following: the voice data processing is completed, the soft keyboard is hidden, the focus is not in the input box of the input method application, and the user actively ends it.

8. The method according to claim 6, characterized in that In response to the deregistration of the first application, the breath wake-up engine application is restored to the working state before the first application is registered, including: In response to the deregistration of the first application, if the switch of the breath awakening function of the breath awakening engine application is turned off before the first application is registered, turning off the switch of the breath awakening function; and / or, In response to the deregistration of the first application, if the switch of the breath wake-up function of the breath wake-up function of the breath wake-up engine application is on before the first application is registered, the switch of the breath wake-up function is turned on; if the breath wake-up function has been connected to a second application before the first application is registered, the breath wake-up engine application sets the application connected to the breath wake-up function as the second application.

9. A voice input device, characterized in that: include: An application registration module, configured to register the first application with the breath awakening engine application when the first application meets a preset registration condition; A task distribution module, configured to, after the first application is successfully registered, when the breath awakening engine application detects a breath awakening event, cause the breath awakening engine to generate a to-be-processed task for the currently collected voice data, and distribute the to-be-processed task to the first application; The voice data processing module is used for the first application to obtain and process the voice data according to the task to be processed.

10. The device according to claim 9, characterized in that The first application is an input method application, and the preset registration condition includes at least one of a soft keyboard being pulled up and a focus being in an input box of the input method application.

11. The device according to claim 10, characterized in that The task to be processed includes an audio session identifier; The voice data processing module is specifically used for: The input method application obtains the voice data according to the audio session identifier; The input method application calls an audio recognition algorithm to convert the voice data into text data; The input method application inputs the text data into the input box.

12. The device according to claim 9, characterized in that The device also includes: an application detection module, configured to detect, in response to the registration of the first application, whether the breath awakening engine application has a registered application using a breath awakening function; a switch detection module, configured to detect, by the breath awakening engine application, whether the switch of the breath awakening function is turned on when no registered application is using the breath awakening function; and to turn on the switch of the breath awakening function if it is not turned on; The application setting module is used for, when the switch of the breath awakening function is turned on, the breath awakening engine application sets the application connected to the breath awakening function as the first application to complete the registration of the first application.

13. The device according to claim 9, characterized in that The device also includes: The shielding module is used to shield other breath awakening events when the breath awakening engine application detects a breath awakening event after the first application is successfully registered.

14. The device according to claim 9, characterized in that The device also includes: A registration release module, configured to, when the first application meets a preset release condition, cause the first application to unregister from the breath wake-up engine application; A state recovery module is used to restore the breath wake-up engine application to a working state before the first application was registered in response to the deregistration of the first application.

15. The device according to claim 14, characterized in that The first application is an input method application, and the preset release condition includes at least one of the following: the voice data processing is completed, the soft keyboard is hidden, the focus is not in the input box of the input method application, and the user actively ends it.

16. The device according to claim 14, characterized in that The state recovery module is specifically used for: In response to the deregistration of the first application, if the switch of the breath awakening function of the breath awakening engine application is turned off before the first application is registered, turning off the switch of the breath awakening function; and / or, In response to the deregistration of the first application, if the switch of the breath wake-up function of the breath wake-up function of the breath wake-up engine application is on before the first application is registered, the switch of the breath wake-up function is turned on; if the breath wake-up function has been connected to a second application before the first application is registered, the breath wake-up engine application sets the application connected to the breath wake-up function as the second application.

17. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-8 when executing a program stored in a memory.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Speech interactive awakening electronic device and method based on microphone signal and medium

    CN110223711A

  • Voice interaction processing method and device and electronic equipment

    CN111354360A

  • Universal wake-up recognition algorithm management device and method located in hardware abstraction layer

    CN112099978A

  • Voice control method and device of application program, storage medium and electronic equipment

    CN115701633A

  • Voice data processing method and device, electronic equipment and storage medium

    CN119028332A

Cited By

  • Voice data processing method and device, electronic equipment and storage medium

    CN119028332A

  • A voice data processing method and device, electronic equipment and storage medium

    CN119028332B