Method and apparatus for controlling electronic device
Through real-time audio feature matching and lightweight neural network model, the problems of false interrupts and delays in full-duplex voice interaction are solved, and efficient and accurate voice interruption control is achieved.
Patent Information
- Application Number
- CN202510633598.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-15
- Publication Date
- 2025-07-22
AI Technical Summary
In full-duplex voice interaction, voice recognition in ambient noise and multi-person scenarios are easily disturbed and caused equipment to be interrupted by accident. The semantic intention recognition response delay is high, the configuration is complex, and the maintenance cost is high.
By determining audio features in real time, using voiceprint feature matching and lightweight neural network model, dynamically adjusting the matching threshold, quickly identify interrupt keywords and interrupting output, and prioritizing the allocation of computing resources for audio feature matching.
Improves the accuracy of interrupt operations, reduces the computing resource requirements, and reduces the error interrupt rate and response delay.
Smart Images

Figure CN120356469A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technologies, and in particular to artificial intelligence technologies. Specifically, the present disclosure relates to a method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product for controlling an electronic device. Background Art
[0002] Intelligent voice assistants, such as intelligent speakers, intelligent screens, center control screens, and girlfriend machines, etc., implement intelligent interaction with users in various scenarios through duplex voice interaction technology.
[0003] The methods described in this section are not necessarily methods that have been previously conceived or adopted. Unless otherwise specified, no method described in this section should be considered prior art solely because it is included in this section. Similarly, unless otherwise specified, the problems mentioned in this section should not be considered to have been recognized in any prior art. Summary of the Invention
[0004] The present disclosure provides a method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product for controlling an electronic device.
[0005] According to an aspect of the present disclosure, there is provided a method for controlling an electronic device, including: determining a second audio being received and second audio features of a part of the second audio that has been received; in response to determining that a matching degree between the second audio features and first audio features exceeds a matching threshold, starting semantic recognition of a subsequent part of the received second audio; and in response to a result of semantic recognition of the subsequent part of the received second audio including an interruption keyword, interrupting a current output of the electronic device.
[0006] According to another aspect of the present disclosure, there is provided an apparatus for controlling an electronic device, including: an audio feature determination unit configured to determine a second audio being received and second audio features of a part of the second audio that has been received; a matching unit configured to, in response to determining that a matching degree between the second audio features and first audio features exceeds a matching threshold, start semantic recognition of a subsequent part of the received second audio; and an interruption unit configured to, in response to a result of semantic recognition of the subsequent part of the received second audio including an interruption keyword, interrupt a current output of the electronic device.
[0007] According to another aspect of the present disclosure, there is provided an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method according to the embodiments of the present disclosure.
[0008] According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method according to the embodiments of the present disclosure.
[0009] According to another aspect of the present disclosure, there is provided a computer program product including a computer program, wherein the computer program, when executed by a processor, implements the method according to the embodiments of the present disclosure.
[0010] According to one or more embodiments of the present disclosure, the accuracy of the interruption operation in the duplex voice interaction process can be improved and the computing resources required for the interruption operation can be reduced at the same time.
[0011] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The drawings exemplarily illustrate embodiments and form a part of the specification, and are used together with the written description of the specification to explain the exemplary embodiments of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. In all the drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0013] Figure 1 A schematic diagram of an exemplary system in which the various methods described herein can be implemented according to an embodiment of the present disclosure is shown;
[0014] Figure 2 An exemplary flowchart of a method for controlling an electronic device according to an embodiment of the present disclosure is shown;
[0015] Figure 3 An exemplary block diagram of a device for controlling an electronic device according to an embodiment of the present disclosure is shown;
[0016] Figure 4 A structural block diagram of an exemplary electronic device capable of implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0017] The following describes exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to assist in understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0018] In the present disclosure, unless otherwise specified, the terms "first", "second", etc. are used to describe various elements and are not intended to limit the positional relationship, temporal relationship, or importance relationship of these elements. Such terms are only used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of the element, and in certain cases, based on the context description, they may also refer to different instances.
[0019] The terms used in the description of various examples in the present disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element may be one or more. In addition, the term "and / or" used in the present disclosure covers any one of the listed items and all possible combinations.
[0020] Embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0021] Figure 1 A schematic diagram of an exemplary system 100 in which the various methods and apparatuses described herein can be implemented according to embodiments of the present disclosure is shown. Referring Figure 1 , the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 that couple the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 can be configured to execute one or more applications.
[0022] In embodiments of the present disclosure, the server 120 can run one or more services or software applications that enable the execution of methods for controlling an electronic device according to embodiments of the present disclosure.
[0023] In certain embodiments, the server 120 can also provide other services or software applications, and these services or software applications can include non-virtual environments and virtual environments. In certain embodiments, these services can be provided as web-based services or cloud services, for example, provided to users of the client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.
[0024] In Figure 1 the configuration shown, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or a combination thereof that may be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may in turn utilize one or more client applications to interact with server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from system 100. Thus, Figure 1 is an example of a system for implementing the various methods described herein and is not intended to be limiting.
[0025] Users may use client devices 101, 102, 103, 104, 105, and / or 106 as the electronic devices for receiving user input and providing output content to users in the embodiments of the present disclosure, such as smart speakers. The client device may provide an interface that enables a user of the client device to interact with the client device. The client device may also output information to the user via the interface. Although Figure 1 only six client devices are depicted, those skilled in the art will be able to understand that the present disclosure may support any number of client devices.
[0026] Client devices 101, 102, 103, 104, 105, and / or 106 may include various types of computing devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors, or other sensing devices, etc. These computing devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux, or Linux-like operating systems (such as GOOGLE Chrome OS); or include various mobile operating systems, such as MICROSOFT WindowsMobile OS, iOS, Windows Phone, Android. Portable handheld devices may include cellular phones, smartphones, tablets, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Gaming systems may include various handheld gaming devices, Internet-enabled gaming devices, etc. Client devices are capable of executing various different applications, such as various Internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and may use various communication protocols.
[0027] Network 110 can be any type of network known to those skilled in the art, which can support data communication using any one of a variety of available protocols (including but not limited to TCP / IP, SNA, IPX, etc.). By way of example only, one or more networks 110 can be a local area network (LAN), an Ethernet-based network, token ring, wide area network (WAN), the Internet, virtual network, virtual private network (VPN), intranet, extranet, blockchain network, public switched telephone network (PSTN), infrared network, wireless network (such as Bluetooth, WIFI), and / or any combination of these and / or other networks.
[0028] Server 120 may include one or more general-purpose computers, dedicated server computers (such as PC (personal computer) servers, UNIX servers, midrange servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running a virtual operating system, or other computing architectures involving virtualization (such as one or more flexible pools of logical storage devices that can be virtualized to maintain virtual storage devices for the server). In various embodiments, server 120 may run one or more services or software applications that provide the functions described below.
[0029] The computing units in server 120 can run one or more operating systems including any of the above operating systems and any commercially available server operating systems. Server 120 can also run any one of a variety of additional server applications and / or middleware applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.
[0030] In some embodiments, server 120 can include one or more applications to analyze and combine data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and / or 106. Server 120 can also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and / or 106.
[0031] In some embodiments, server 120 can be a server of a distributed system or a server incorporating a blockchain. Server 120 can also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in the cloud computing service system to address the defects of high management difficulty and weak business scalability existing in traditional physical hosts and virtual private server (VPS) services.
[0032] System 100 can also include one or more databases 130. In certain embodiments, these databases can be used to store data and other information. For example, one or more of databases 130 can be used to store information such as audio files and video files. Databases 130 can reside in various locations. For example, the databases used by server 120 can be local to server 120, or can be remote from server 120 and can communicate with server 120 via a network-based or dedicated connection. Databases 130 can be of different types. In certain embodiments, the databases used by server 120 can be relational databases, for example. One or more of these databases can store, update, and retrieve data to and from the databases in response to commands.
[0033] In certain embodiments, one or more of databases 130 can also be used by applications to store application data. The databases used by applications can be different types of databases, such as key-value repositories, object repositories, or conventional repositories supported by a file system.
[0034] Figure 1The system 100 can be configured and operated in various ways to enable the application of various methods and devices described in this disclosure.
[0035] An intelligent voice assistant is a software application based on artificial intelligence technology that can execute user instructions through voice interaction. It relies on speech recognition, natural language processing, and machine learning technologies to achieve functions such as information query, device control, and schedule management. Related intelligent voice assistants can use full-duplex voice interaction to implement functions. With full-duplex voice interaction, real-time two-way communication is supported, and both parties can speak, interrupt, or interject simultaneously. The electronic devices used as intelligent voice assistants involved in the embodiments of this disclosure
[0036] In the application scenarios of intelligent voice assistants, the following problems exist in traditional full-duplex voice interaction solutions: (1) In scenarios with environmental noise or multiple people, the input voice is easily interfered by environmental noise or other people's voices, resulting in incorrect interruptions being recognized and the device being interrupted from broadcasting erroneously. (2) Interrupt commands through semantic intent recognition require complete semantic analysis, resulting in a lag in user interruption instructions and a high response delay. (3) Intent rules that can trigger interruptions need to be configured for different vertical domains, which is complex to configure and has a high maintenance cost.
[0037] To improve the above problems in related technologies, this disclosure provides a new method and device for controlling an electronic device.
[0038] Figure 2 An exemplary flowchart of a method for controlling an electronic device according to an embodiment of this disclosure is shown.
[0039] In step S202, determine the second audio being received and the second audio features of the received part of the second audio.
[0040] In step S204, in response to determining that the degree of matching between the second audio features and the first audio features exceeds the matching threshold, initiate semantic recognition of the subsequent part of the received second audio.
[0041] In step S206, in response to the result of semantic recognition of the subsequent part of the received second audio including an interruption keyword, interrupt the current output of the electronic device.
[0042] Using the method for controlling an electronic device provided by the embodiments of this disclosure can improve the accuracy of interruption operations during duplex voice interaction and reduce the computing resources required for interruption operations simultaneously.
[0043] The principle of this disclosure will be described in detail below.
[0044] In step S202, determine the second audio feature of the second audio that is being received and the part of the second audio that has already been received. Among them, the second audio feature of the second audio can be determined in real time while receiving the second audio. Using this method, the efficiency of the interruption operation can be improved.
[0045] The electronic device can collect the input audio through an audio input device such as a microphone. By processing the input audio (such as the second audio), the second audio feature of the second audio can be obtained. In an example, the second audio feature can be the voiceprint feature of the speaker corresponding to the second audio. Various suitable voiceprint extraction models can be used to process the second audio to obtain the corresponding voiceprint feature. Exemplary voiceprint extraction models can include MFCC and neural network models. A lightweight neural network model (for example, a model with a parameter quantity <1M) can be used to further reduce the computing resources consumed by the method of the embodiments of the present disclosure, thereby supporting the deployment of low-power chips on the electronic device. In other examples, the second audio can also be processed in any other suitable manner to obtain the speech feature of the speaker corresponding to the second audio.
[0046] In step S204, in response to determining that the matching degree between the second audio feature and the first audio feature exceeds the matching threshold, start semantic recognition of the subsequent part of the received second audio.
[0047] Among them, the first audio feature is the speech feature of a predetermined user, such as a voiceprint feature.
[0048] In some embodiments, before receiving the second audio, method 200 may further include: in response to detecting that the received first audio contains a trigger word, determining the first audio feature of the first audio.
[0049] Among them, the trigger word can be a word used to wake up the intelligent voice function of the electronic device. The electronic device starts to respond to the user after detecting the input of the trigger word. In some cases, the trigger word can also be called a wake-up word. In an example, when the user says "Xiaox X Xiaox", the electronic device detects the above voice input and makes a response to the user "Hello, what do you need", thereby realizing the intelligent interaction between the user and the electronic device.
[0050] By detecting the speech feature of the current user while the user triggers the intelligent assistant function of the electronic device, it is possible to help identify the input of the current user from various environmental sounds as a valid input in the subsequent process. It can be understood that during the interaction between the user and the electronic device, the instruction issued by the user who wakes up the intelligent assistant function of the electronic device is a valid instruction for the electronic device, while the voices of other users in the environment are invalid information for the electronic device.
[0051] In some other embodiments, the first audio feature may also be the voice feature of a predetermined user pre-stored in a database. In still some other embodiments, the first audio feature may be the voice feature of a predetermined user obtained through a network.
[0052] In some embodiments, the first audio feature is stored in a local cache until the current session including the first audio ends. By using this method, the first audio feature can be used as a reference feature for matching in the current interaction session, without affecting other interaction sessions invoked before or after.
[0053] By initiating semantic recognition for an interruption operation in response to determining the matching of the second audio feature and the first audio feature, invalid information given by non-target users and environmental noise can be excluded through the consistency of the audio features, thereby reducing the false interruption rate of the electronic device. In an example, the matching degree of the second audio feature and the first audio feature can be obtained by calculating the pre-similarity of the first audio feature and the second audio feature.
[0054] In step S204, the higher the environmental noise level, the lower the matching threshold can be. In some implementation manners, the matching threshold can be determined according to the environmental noise level and a reference matching threshold. An exemplary matching threshold determination formula can be: matching threshold = reference matching threshold - k * environmental noise level. Wherein, the reference matching threshold can be a value predetermined according to the usage scenario, such as 80%, 85%, etc. k can be a predetermined constant, such as 0.1, 0.2, etc. The environmental noise level can be a measured value in dB. The background noise energy value (unit: dB) can be calculated through a microphone array, sampled once every 100 ms, and the matching threshold can be dynamically updated according to the current noise level. Any other method can also be used to determine the matching threshold, as long as the matching threshold changes adaptively with the change of the environmental noise. By dynamically adjusting the matching threshold according to the environmental noise, the matching difficulty of the audio feature can be adaptively adjusted according to the current environment, and the robustness of the interruption method in complex scenarios can be improved.
[0055] In step S206, in response to the result of semantic recognition of the subsequent part of the received second audio including an interruption keyword, the current output of the electronic device is interrupted.
[0056] In some embodiments, step S202 and step S204 can be performed simultaneously with the announcement operation of the electronic device. That is to say, when the electronic device is outputting announcement content, the environmental voice can be monitored through a microphone array, the received audio is received and the audio feature thereof is verified, so that an interruption operation for the current announcement content can be realized, and the interaction efficiency between the user and the electronic device can be improved.
[0057] In step S206, incremental parsing can be performed on the subsequently received audio, that is, semantic recognition is gradually performed on the newly received audio content, without the need to perform full parsing on the audio received before the end point after the end point is detected. Using this method, the computational complexity of semantic recognition can be reduced, and the current output of the electronic device can be quickly interrupted after the interruption keyword is recognized, thereby reducing the latency of the interruption operation.
[0058] In some embodiments, when allocating computing resources of the electronic device, the thread for determining and matching the audio features of the audio received by the electronic device has a higher priority than the thread for outputting content. By preferentially allocating computing resources (such as CPU and GPU resources) to the determination and matching of audio features, the latency of the interruption operation can be reduced. Through experiments, it is obtained that through reasonable computing resource scheduling, the latency can be reduced from 300 ms to 180 ms.
[0059] The interruption keyword can be a word related to the interruption command. Exemplary keywords can include "um", "then", "pause", "skip", etc. In the example, the interruption keyword can be selected from the vocabulary corresponding to the current scenario. Different recognition vocabularies can be designed for different scenarios, so as to improve the interruption efficiency in different scenarios. In the example, the scale of the vocabulary can be lightweight. For example, the total number of keywords in the vocabulary does not exceed 50. The corresponding recognition vocabulary can be dynamically loaded for different business scenarios. By simultaneously verifying the degree of audio feature matching and the interruption keyword, the accuracy of the interruption operation can be improved, thereby improving the utilization efficiency of the computing resources of the electronic device.
[0060] After interrupting the current output of the electronic device, the electronic device can enter the listening state and be ready to execute subsequent instructions.
[0061] Taking the electronic device as a smart speaker as an example, an exemplary interruption process can include: The instruction issued by the user after waking up the electronic device can be: Why is the sky blue. In response to the above instruction, the electronic device can broadcast: The sky appears blue due to the interaction between sunlight and the Earth's atmosphere, and its core mechanism is Rayleigh scattering. (Sunlight is a composite light composed of multiple colors of light, which can be decomposed into color bands such as red, orange, yellow, green, blue, indigo, and violet through a prism. Among them, the wavelength of blue light is shorter (about 450-480 nanometers), and the wavelength of red light is longer (about 700 nanometers)). When the device broadcasts to "Rayleigh scattering", the user issues a new instruction "Then, what is Rayleigh scattering". In this case, when saying the word "then", the broadcast will pause, the device will listen to the subsequent instruction, and respond to the new instruction "What is Rayleigh scattering".
[0062] Figure 3 Shows an exemplary block diagram of a device for controlling an electronic device according to an embodiment of the present disclosure. It can be usedFigure 3 implemented by the device shown in Figure 2 the method 200 for controlling an electronic device described.
[0063] As Figure 3 shown, the device 300 may include an audio feature determination unit 310, a matching unit 320, and an interruption unit 330.
[0064] The audio feature determination unit may be configured to determine a second audio feature of the second audio being received and a portion of the second audio that has already been received.
[0065] The matching unit may be configured to initiate semantic recognition of a subsequent portion of the received second audio in response to determining that the degree of matching between the second audio feature and the first audio feature exceeds a matching threshold.
[0066] The interruption unit may be configured to interrupt the current output of the electronic device in response to the result of semantic recognition of a subsequent portion of the received second audio including an interruption keyword.
[0067] In some embodiments, before receiving the second audio, the audio feature determination unit may further be configured to: in response to detecting that the received first audio contains a trigger word, determine a first audio feature of the first audio.
[0068] In some embodiments, the first audio feature is stored in a local cache until the current session including the first audio ends.
[0069] In some embodiments, the audio feature determination unit may be configured to determine the second audio feature of the second audio in real time while receiving the second audio.
[0070] In some embodiments, the higher the ambient noise level, the lower the matching threshold.
[0071] In some embodiments, the matching threshold is determined according to the ambient noise level and a reference matching threshold.
[0072] In some embodiments, when allocating computing resources of the electronic device, the thread for determining and matching the audio features of the audio received by the electronic device has a higher priority than the thread for outputting content.
[0073] In some embodiments, the interruption keyword is selected from a thesaurus corresponding to the current scenario.
[0074] It should be understood that Figure 3 each module or unit of the device 300 shown in Figure 2corresponds to each step in the described method 200. Thus, the operations, features, and advantages described above for method 200 also apply to apparatus 300 and the modules and units included therein. For the sake of brevity, some operations, features, and advantages are not described herein again.
[0075] Although specific functions have been discussed above with reference to specific modules, it should be noted that the functions of the various units discussed herein can be divided into multiple units, and / or at least some of the functions of multiple units can be combined into a single unit.
[0076] In the technical solution of the present disclosure, the processing of the user's personal information involved (such as the user's voiceprint feature), including collection, storage, use, processing, transmission, provision, and disclosure, etc., all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0077] According to an embodiment of the present disclosure, there is also provided an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method according to the embodiment of the present disclosure.
[0078] According to an embodiment of the present disclosure, there is also provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method according to the embodiment of the present disclosure.
[0079] According to an embodiment of the present disclosure, there is also provided a computer program product including a computer program, wherein the computer program, when executed by a processor, implements the method according to the embodiment of the present disclosure.
[0080] According to an embodiment of the present disclosure, there is also provided a smart speaker, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method according to the embodiment of the present disclosure.
[0081] Reference Figure 4, a block diagram of an electronic device 400 that can be a server or a client of the present disclosure will now be described. It is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as, for example, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, for example, personal digital assistants, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0082] As Figure 4 shown, the electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 can also be stored. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0083] Multiple components in the electronic device 400 are connected to the I / O interface 405, including: an input unit 406, an output unit 407, a storage unit 408, and a communication unit 409. The input unit 406 can be any type of device that can input information into the electronic device 400. The input unit 406 can receive input digital or character information, and generate key signal inputs related to user settings and / or function controls of the electronic device, and can include, but is not limited to, a mouse, a keyboard, a touch screen, a trackpad, a trackball, a joystick, a microphone, and / or a remote control. The output unit 407 can be any type of device that can present information, and can include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 408 can include, but is not limited to, magnetic disks, optical disks. The communication unit 409 allows the electronic device 400 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks, and can include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0084] The computing unit 401 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 401 executes the various methods and processes described above, such as method 200. For example, in some embodiments, method 200 can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 408. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 400 via the ROM 402 and / or the communication unit 409. When the computer program is loaded into the RAM 403 and executed by the computing unit 401, one or more steps of the method 200 described above can be executed. Alternatively, in other embodiments, the computing unit 401 can be configured to execute method 200 in any other suitable manner (e.g., by means of firmware).
[0085] Various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field-programmable gate arrays (FPGA), application-specific integrated circuits (ASIC), application-specific standard products (ASSP), systems-on-a-chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0086] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowchart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0087] In the context of this disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0088] In order to provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).
[0089] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.
[0090] A computer system may include a client and a server. The client and the server are generally far away from each other and usually interact via a communication network. The relationship between the client and the server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, or a server of a distributed system, or a server incorporating a blockchain.
[0091] It should be understood that various forms of the processes shown above can be used, with steps reordered, added or deleted. For example, the steps recited in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this is not limited herein.
[0092] Although embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but is only defined by the authorized claims and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by their equivalent elements. In addition, the steps can be executed in an order different from that described in the present disclosure. Further, various elements in the embodiments or examples can be combined in various ways. Importantly, with the evolution of technology, many of the elements described herein can be replaced by equivalent elements that emerge after the present disclosure.
Claims
1. A method for controlling an electronic device, comprising: determining a second audio being received and second audio features of a portion of the second audio that has been received; in response to determining that a degree of matching between the second audio features and first audio features exceeds a matching threshold, initiating semantic recognition of a subsequent portion of the received second audio; and in response to a result of semantic recognition of a subsequent portion of the received second audio including an interruption keyword, interrupting a current output of the electronic device.
2. The method according to claim 1, wherein Before receiving the second audio, the method further comprises: in response to detecting that a received first audio includes a trigger word, determining first audio features of the first audio.
3. The method according to claim 2, wherein, The first audio features are stored in a local cache until the end of a current session including the first audio.
4. The method according to claim 1, wherein While receiving the second audio, determining second audio features of the second audio in real time.
5. The method according to claim 1, wherein, The higher the ambient noise level, the lower the matching threshold.
6. The method according to claim 5, wherein, The matching threshold is determined based on an ambient noise level and a reference matching threshold.
7. The method according to claim 1, wherein, When allocating computing resources of the electronic device, a thread for determining and matching audio features of audio received by the electronic device has a higher priority than a thread for outputting content.
8. The method according to claim 1, wherein, The keyword is selected from a thesaurus corresponding to a current scenario.
9. A device for controlling an electronic device, comprising: an audio feature determination unit configured to determine a second audio being received and second audio features of a portion of the second audio that has been received; a matching unit configured to, in response to determining that a degree of matching between the second audio features and first audio features exceeds a matching threshold, initiate semantic recognition of a subsequent portion of the received second audio; and an interruption unit configured to, in response to a result of semantic recognition of a subsequent portion of the received second audio including an interruption keyword, interrupt a current output of the electronic device.
10. An electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method according to any one of claims 1-8.
11. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the method according to any one of claims 1-8.
12. A computer program product comprising a computer program, wherein, The computer program, when executed by a processor, implements the method according to any one of claims 1-8.
13. An intelligent speaker, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method according to any one of claims 1-8.