Intelligent device and sound source positioning method
By using two sound collectors and second-order filtering delay estimation technology in smart devices, the problem of smart devices having difficulty accurately locating users' positions is solved, thus improving the user experience.
Patent Information
- Application Number
- CN202211561972.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-07
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2042-12-07
AI Technical Summary
Existing smart devices struggle to accurately pinpoint the user's location when executing specific control commands, resulting in a poor user experience.
By setting up two sound acquisition devices in a smart device, the user's voice audio data is collected, and the user's direction relative to the device is obtained through second-order filtering delay estimation, thereby executing control commands.
It enables smart devices to accurately locate the user's position, improving the user experience, especially when control commands need to be executed based on the user's location.
Smart Images

Figure CN116246619B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of display device technology, and more particularly to a smart device and a sound source localization method. Background Technology
[0002] Users can control different smart devices to perform various functions to meet their diverse needs. To make it easier for users to control smart devices, these devices can have intelligent voice control functionality. Intelligent voice control is a new type of interaction that performs semantic recognition on the user's voice input and then generates specific control commands based on the semantic recognition results to control the smart device.
[0003] After a user issues a voice command, the smart device can detect the specific voice input through its hardware, then process the input voice through its software, converting it into a control command. Finally, the device will execute the corresponding control command and provide feedback on the execution result through its hardware. For example, when using a smart TV, a user can input "I want to watch a movie" through the microphone, and the smart TV can automatically play movie media for the user to watch.
[0004] However, for some specific control commands input by users, the smart device needs to determine the user's location before executing the command. For example, when using an air conditioner, a user might want the air conditioner to blow air directly on them or not, thus inputting the voice command "blow air on me" or "don't blow air on me." Or, when using the camera function of a smart TV, a user might want the camera to take a picture of themselves. Therefore, how to enable smart devices to accurately locate the user's position has become a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] Some embodiments of this application provide a smart device and a sound source localization method. This method can accurately locate the user's position, thereby enabling the smart device to execute corresponding control commands and improve the user experience.
[0006] In a first aspect, some embodiments of this application provide a smart device, including a sound acquisition module and a controller. The sound acquisition module is configured to acquire user voice audio data and includes a first sound acquisition unit and a second sound acquisition unit. The controller is configured to perform the following steps:
[0007] Acquire the first voice audio data collected by the first sound collector and the second voice audio data collected by the second sound collector;
[0008] The first or second voice audio data is identified to obtain the user's control commands.
[0009] The speech delay is obtained by performing second-order filtering and time delay estimation on the first and second speech audio data.
[0010] The user's orientation relative to the smart device is obtained based on the voice delay.
[0011] The control command is executed based on the user's orientation.
[0012] Secondly, some embodiments of this application provide a sound source localization method, applied to a smart device, including:
[0013] Acquire the first voice audio data collected by the first sound acquisition device and the second voice audio data collected by the second sound acquisition device;
[0014] The first or second voice audio data is identified to obtain the user's control commands.
[0015] The speech delay is obtained by performing second-order filtering and time delay estimation on the first and second speech audio data.
[0016] The user's orientation relative to the smart device is obtained based on the voice delay.
[0017] The control command is executed based on the user's orientation.
[0018] As can be seen from the above technical solutions, some embodiments of this application provide a smart device and a sound source localization method. The smart device can acquire first speech audio data collected by a first sound collector and second speech audio data collected by a second sound collector, and identify the first or second speech audio data to obtain the user's control commands. The smart device performs second-order filtering and time delay estimation on the first and second speech audio data to obtain the speech delay. Based on the speech delay, the user's direction relative to the smart device can be obtained, thereby executing control commands based on the user's direction. The smart device can obtain the user's direction to achieve user localization, thereby controlling the smart device to execute corresponding control commands and improving the user experience. Attached Figure Description
[0019] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 An exemplary system architecture for which the sound source localization method and smart device of this application can be applied is shown;
[0021] Figure 2 A hardware configuration block diagram of a smart device according to an exemplary embodiment is shown;
[0022] Figure 3 System schematics of smart devices in some embodiments are shown;
[0023] Figure 4 This is a schematic diagram of the voice interaction network architecture in some embodiments of this application;
[0024] Figure 5 A schematic diagram of sound source localization mode confirmation information is shown in some embodiments;
[0025] Figure 6 The diagrams show the interaction flowcharts of various components of a smart device in some embodiments;
[0026] Figure 7 Schematic diagrams of the speech signal to the sound acquisition unit in some embodiments are shown;
[0027] Figure 8 Schematic diagrams of the speech signal to the sound acquisition unit in some embodiments are shown;
[0028] Figure 9 A schematic diagram of a user image is shown in some embodiments;
[0029] Figure 10 A schematic diagram of a user image is shown in some embodiments. Detailed Implementation
[0030] To make the objectives and implementation methods of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the exemplary embodiments described are only some embodiments of this application, and not all embodiments.
[0031] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0032] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.
[0033] Figure 1 An exemplary system architecture for which the sound source localization method and smart device of this application can be applied is shown. Figure 1As shown, 10 is a server and 200 is a smart device, including (smart TV 200a, mobile device 200b, smart speaker 200c).
[0034] In this application, server 10 and smart device 200 communicate via various communication methods. Smart device 200 can communicate via local area network (LAN), wireless local area network (WLAN), and other networks. Server 10 can provide various content and interactive features to smart device 200. For example, smart device 200 and server 10 can send and receive information, and receive software updates.
[0035] Server 10 can be a server that provides various services, such as a backend server that supports audio data collected by smart device 200. The backend server can analyze and process the received audio and other data, and feed back the processing results (such as endpoint information) to the smart device. Server 10 can be a server cluster or multiple server clusters, and can include one or more types of servers.
[0036] The smart device 200 can be either hardware or software. When the smart device 200 is hardware, it can be various electronic devices with sound acquisition capabilities, including but not limited to smart speakers, smartphones, televisions, tablets, e-book readers, smartwatches, media players, computers, AI devices, robots, smart vehicles, etc. When the smart devices 200a, 200b, and 200c are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software programs or software modules (e.g., used to provide sound acquisition services) or as a single software program or software module. No specific limitations are made here.
[0037] It should be noted that the method for sound source localization provided in this application embodiment can be executed by server 10, by smart device 200, or by both server 10 and smart device 200. This application does not limit this.
[0038] Figure 2 A hardware configuration block diagram of a smart device 200 according to an exemplary embodiment is shown. For example... Figure 2 The intelligent device 200 shown includes at least one of the following: a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface 280. The controller includes a central processing unit, an audio processor, a graphics processor, RAM, ROM, and a first to an nth interface for input / output.
[0039] The display 260 includes a display screen assembly for presenting images, a driving assembly for driving image display, a component for receiving image signals from the controller output, and a user control UI interface for displaying video content, image content, menu control interface, and user control UI interface.
[0040] The display 260 can be an LCD display, an OLED display, or a projection display, and can also be a projection device and a projection screen.
[0041] The communicator 220 is a component used to communicate with external devices or servers according to various communication protocol types. For example, the communicator may include at least one of the following: a Wi-Fi module, a Bluetooth module, a wired Ethernet module, other network communication protocol chips or near-field communication protocol chips, and an infrared receiver. The smart device 200 can establish the transmission and reception of control signals and data signals through the communicator 220 and the server 10.
[0042] The user interface can be used to receive external control signals.
[0043] Detector 230 is used to collect signals from the external environment or to interact with the external environment. For example, detector 230 includes a light receiver, a sensor for collecting ambient light intensity; or, detector 230 includes an image acquisition device, such as a camera, which can be used to collect external environmental scenes, user attributes, or user interaction gestures; or, detector 230 includes a sound acquisition device, such as a microphone, for receiving external sounds.
[0044] The sound acquisition device can be a microphone, also known as a "microphone" or "voice transducer," which can be used to receive the user's voice and convert the sound signal into an electrical signal. The smart device 200 can be equipped with at least one microphone. In some embodiments, the smart device 200 can be equipped with two microphones, which, in addition to acquiring sound signals, can also perform noise reduction. In other embodiments, the smart device 200 can also be equipped with three, four, or more microphones, enabling sound signal acquisition, noise reduction, sound source identification, and directional recording functions, etc.
[0045] Furthermore, the microphone can be built into the smart device 200, or it can be connected to the smart device 200 via wired or wireless means. Of course, this embodiment does not limit the location of the microphone on the smart device 200. Alternatively, the smart device 200 may not include a microphone, meaning the microphone is not located within the smart device 200. The smart device 200 can connect an external microphone (also called a microphone) via an interface (such as USB interface 130). This external microphone can be fixed to the smart device 200 using an external fastener (such as a camera bracket with a clip).
[0046] The controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in the memory. The controller 250 controls the overall operation of the intelligent device 200.
[0047] For example, the controller includes at least one of a central processing unit (CPU), an audio processor, a graphics processing unit (GPU), RAM (random access memory), ROM (read-only memory), a first to an nth interface for input / output, a communication bus, etc.
[0048] In some examples, the smart device uses the Android operating system, such as... Figure 3 As shown, the smart device 200 can be logically divided into an application layer (referred to as "application layer") 21, a kernel layer 22, and a hardware layer 23.
[0049] Among them, such as Figure 3 As shown, the hardware layer may include Figure 2 The controller 250, communicator 220, detector 230, etc., are shown. Application layer 21 includes one or more applications. These applications can be system applications or third-party applications. For example, application layer 21 includes a voice recognition application, which can provide a voice interaction interface and services to enable connection between smart device 200 and server 10.
[0050] The kernel layer 22 serves as a software middleware between the hardware layer and the application layer 21, and is used to manage and control hardware and software resources.
[0051] In some examples, kernel layer 22 includes a detector driver that sends voice data collected by detector 230 to a speech recognition application. For instance, when the speech recognition application in smart device 200 starts and a communication connection is established between smart device 200 and server 10, the detector driver sends user-input voice data collected by detector 230 to the speech recognition application. The speech recognition application then sends query information containing this voice data to intent recognition module 102 in the server. Intent recognition module 102 inputs the voice data sent by smart device 200 into the intent recognition model.
[0052] To clearly illustrate the embodiments of this application, the following description is provided in conjunction with... Figure 4 The speech recognition network architecture in some embodiments of this application is described.
[0053] See Figure 4 , Figure 4 This is a schematic diagram of the voice interaction network architecture in some embodiments of this application. Figure 4 In this system, the intelligent device receives input information and outputs the processing results of that information. The speech recognition module deploys a speech recognition service to convert audio into text; the semantic understanding module deploys a semantic understanding service to perform semantic parsing on the text; the business management module deploys a business instruction management service to provide business instructions; the language generation module deploys a language generation service (NLG) to convert instructions instructing the intelligent device to execute into text language; and the speech synthesis module deploys a text-to-speech (TTS) service to process the text language corresponding to the instructions and send it to a speaker for playback. In one embodiment, Figure 4 The architecture shown can contain multiple entity service devices with different business services deployed, or it can combine one or more functional services in one or more entity service devices.
[0054] In some embodiments, the following describes the basis Figure 4 The process of processing input information from smart devices in the architecture shown is illustrated with an example, taking a query statement input via voice as an example:
[0055] [Speech Recognition]
[0056] After receiving a query statement input via voice, the smart device can perform noise reduction and feature extraction on the audio of the query statement. The noise reduction process may include steps such as removing echoes and environmental noise.
[0057] [Semantic understanding]
[0058] Using acoustic and language models, natural language understanding is performed on the identified candidate text and associated contextual information. The text is parsed into structured, machine-readable information, including business domain, intent, slots, and other semantic information. An executable intent confidence score is obtained, and the semantic understanding module selects one or more candidate executable intents based on the determined intent confidence score.
[0059] [Business Management]
[0060] Based on the semantic parsing results of the query statement text, the semantic understanding module sends query instructions to the corresponding business management module to obtain the query results provided by the business service, as well as the actions required to "complete" the user's final request, and feeds back the device execution instructions corresponding to the query results.
[0061] Language generation
[0062] Natural Language Generation (NLG) is configured to generate spoken text from information or instructions. Specifically, it can be categorized into casual conversation, task-oriented, knowledge-based question-answering, and recommendation-based systems. In casual conversation, NLG performs intent recognition and sentiment analysis based on context to generate open-ended responses. In task-oriented conversations, learned strategies are used to generate responses, typically including clarifying needs, guiding the user, asking questions, confirming, and closing remarks. In knowledge-based question-answering conversations, the required knowledge (knowledge, entities, fragments, etc.) is generated based on question type identification and classification, information retrieval, or text matching. In recommendation-based conversation systems, user interests are matched, candidate content is ranked, and then recommended content is generated for the user.
[0063] [Speech Synthesis]
[0064] The speech synthesis module is configured to present voice output to the user. It synthesizes voice output based on text provided by the digital assistant. For example, the generated dialogue response is in the form of a text string. The speech synthesis module then converts the text string into audible voice output.
[0065] It should be noted that, Figure 4 The architecture shown is merely an example and is not intended to limit the scope of protection of this application. Other architectures can also be used to achieve similar functions in the embodiments of this application. For example, all or part of the above process can be completed by a smart terminal, which will not be elaborated here.
[0066] In some embodiments, a user can control the smart device 200 by voice.
[0067] The smart device 200 may have a built-in intelligent voice system to support intelligent voice control by the user. Intelligent voice control refers to the interactive process where the user operates the smart device 200 by inputting voice audio data. To achieve intelligent voice control, the smart device 200 may include an audio input device and an audio output device. The audio input device is used to collect the voice audio data input by the user and may be a microphone device built into or external to the smart device 200. The audio output device is used to emit sound to play a voice response. For example, such as... Figure 4 As shown, when a user inputs a wake-up word such as "Hi! Little X" through the audio input device, the smart device 200 can play a voice response of "I'm here" through the audio output device to guide the user to complete subsequent voice input.
[0068] In some embodiments, the intelligent voice system built into the smart device 200 also supports a one-shot mode. In this mode, users can directly control functions with fewer voice inputs. For example, in traditional mode, if a user wants to control the smart device 200 to play movie resources, they need to first input the voice command "Hi, Xiao X," wait for the smart device 200 to respond "I'm here," and then input "I want to watch a movie," at which point the smart device 200 will respond "The following movies have been found for you." However, in one-shot mode, the user can directly input "Hi! Xiao X, I want to watch a movie," and the smart device 200 will directly respond "The following movies have been found for you" upon receiving the voice command, reducing the number of voice interactions and improving voice interaction efficiency.
[0069] In some embodiments, smart devices can recognize and execute voice commands corresponding to user speech. However, for some specific voice commands, it may be necessary to identify the user's location before execution. For example, a user can use an air conditioner to change the ambient temperature by blowing air to meet their needs. The air conditioner can change parameters such as the direction and speed of its airflow to alter the airflow pattern. Influenced by their needs, a user may prefer the air conditioner to blow air towards them or not. Therefore, the air conditioner can be equipped with an airflow direction adjustment function, allowing the user to choose to adjust the airflow direction vertically or horizontally as needed. However, this method of adjusting the airflow direction requires manual adjustment, which is time-consuming and laborious, resulting in a poor user experience. Therefore, the air conditioner needs to be able to automatically locate the user's external location, such as their direction, and thus blow air towards or away from the user.
[0070] For example, when using a smart TV, users can utilize the TV's image capture device, such as a camera, to perform specific functions, such as taking photos, video chatting, or motion-sensing games. These functions require the camera to capture an image of the user, which is then displayed. It's important to note that the user's position within the image varies depending on their location relative to the TV. The user might be in the center or at the edge of the image. Due to positional influence, when a user is at the edge, they might prefer to be centered in the camera's image. In this case, the TV needs to be able to determine the user's orientation so that the camera can turn in that direction, placing the user in the center of the image.
[0071] To address the aforementioned issues, the smart device provided in this application embodiment has a sound source localization function. When a user issues a voice command, the smart device can automatically locate the user's position based on the user's voice, such as the user's direction, and then execute the corresponding user command based on the user's position to improve the user experience. The smart device can be set to a sound source localization mode, allowing the user to send a sound source localization command to the smart device to activate the sound source localization mode and locate the user.
[0072] In some embodiments, a user can send a sound source localization command to the smart device 200 by operating designated buttons on the remote control. Alternatively, a user can send a sound source localization command to the smart device 200 via voice input to control the smart device 200 to enter sound source localization mode.
[0073] In some embodiments, for a smart device 200 with an image sensor, the user can also send a sound source localization command to the smart device 200 via a preset gesture. The smart device 200 can detect the user's behavior through the image sensor. When the user makes a preset gesture or action, it is considered that the user has sent a sound source localization command to the smart device 200.
[0074] In some embodiments, when a user controls the smart device 200 using a terminal device, such as a mobile phone, the terminal device can also send a sound source localization command to the smart device 200. In practical applications, a control can be set in the mobile phone, which allows the user to select whether to enter the sound source localization mode, thereby sending the sound source localization command to the smart device 200.
[0075] In some embodiments, for a smart device 200 with a display, a sound source localization mode enable option can be set in the UI interface of the smart device 200. When the user clicks the option, the smart device 200 can be controlled to enter the sound source localization mode.
[0076] In some embodiments, for a smart device 200 equipped with a display, it is possible to prevent users from accidentally triggering the sound source localization mode. When the controller 250 receives a sound source localization command, it can control the display 260 to display sound source localization mode confirmation information, thereby allowing the user to make a secondary confirmation as to whether to control the smart device 200 to enter the sound source localization mode. Figure 5 A schematic diagram of sound source localization mode confirmation information is shown in some embodiments.
[0077] In some embodiments, when the smart device 200 enters the sound source localization mode, it can locate the user's position, such as the user's direction, based on the user's voice command, so as to execute the user's command according to the user's direction.
[0078] Figure 6The diagram illustrates the interaction flowcharts of various components of a smart device in some embodiments. It includes the following steps:
[0079] Step 601: Obtain the first voice audio data collected by the first sound collector and the second voice audio data collected by the second sound collector;
[0080] Step 602: Recognize the first voice audio data or the second voice audio data to obtain the user's control commands;
[0081] Step 603: Perform second-order filtering delay estimation on the first speech audio data and the second speech audio data to obtain the speech delay;
[0082] Step 604: Obtain the user's orientation relative to the smart device based on the voice delay;
[0083] Step 605: Execute the control command based on the user's orientation.
[0084] In some embodiments, a user can input voice commands to a smart device to control the device to perform corresponding functions. The controller 250 can control the sound acquisition module to collect the user's input voice audio data. Both the first and second sound acquisition units can collect the user's voice audio data, and the data collected by the two units is identical; only the timing of the voice acquisition may differ. For example, if the user is closer to the first sound acquisition unit, the first unit may acquire the user's voice first, while the second unit will acquire it later.
[0085] The controller 250 can acquire the voice audio data collected by the first sound collector, referred to as the first voice audio data in this embodiment. The controller 250 can also acquire the voice audio data collected by the second sound collector, referred to as the second voice audio data in this embodiment.
[0086] In some embodiments, after acquiring user speech collected by the sound acquisition device, the controller 250 can parse the user speech to obtain the corresponding speech text. The controller can perform semantic analysis on the speech text to determine the user's control commands. For example, the controller can send the speech audio data to a built-in voice interaction network architecture to obtain the control commands corresponding to the speech audio data.
[0087] The controller 250 can recognize the first voice audio data to obtain the user's control commands. The controller 250 can also recognize the second voice audio data to obtain the user's control commands. The controller can also simultaneously recognize both the first and second voice audio data to obtain the user's control commands.
[0088] It should be noted that since both the first and second voice audio data are user voice, the content of the two types of data is the same, and the same control commands will be recognized. It is sufficient to recognize either one of the voice audio data.
[0089] In some embodiments, the smart device 200 may include a third-party voice recognition interface, which may be connected to a third-party voice recognition device. Upon receiving voice input from a user, the controller 250 can send the voice audio data to the third-party voice recognition interface, whereby the third-party voice recognition device converts the user's voice audio data into voice-to-text. After obtaining the voice-to-text, the controller 250 can parse the voice-to-text to obtain the control commands corresponding to the voice audio data.
[0090] In some embodiments, the controller 250 may also send voice audio data to a server. The server can parse the voice audio data to obtain voice text, and then send the voice text back to the smart device. The smart device can parse the voice text to obtain control commands. Alternatively, the server may directly parse the voice text into control commands and send them to the smart device.
[0091] In some embodiments, after receiving a user's control command, the controller 250 can detect the control command. Depending on different user needs, some control commands may require the smart device 200 to locate the user's position before execution, while others may not require the smart device 200 to locate the user's position. The controller 250 can determine whether sound source localization processing for the user is currently needed based on the control command.
[0092] Taking a smart device as an example, a display device can be used by users to play media files or take photos using a camera. If a user needs the display device to play media files, they can input the voice command "Play Movie A," and the controller 250 can obtain the corresponding control command, namely the media file playback command "Play Movie A." Since the execution of the media file playback command does not require the user's location, the controller 250 can directly execute the media file playback command so that the user can watch the media file. However, when the user needs the display device to perform camera functions such as taking photos or video chatting, for example, by inputting the voice command "Take a picture of me," the controller 250, after obtaining the corresponding control command, can determine that it needs to call the camera to capture the user's image. The controller 250 needs to locate the user's position before it can obtain a satisfactory image. In this case, the controller 250 can first perform sound source localization processing to obtain the user's position and then execute the control command based on the user's position.
[0093] Taking an air conditioner as an example of a smart device, a user can use it to adjust the room temperature. The controller 250 can determine whether it needs to locate the user's position based on whether the control command requires the user's location. For example, when a user needs to turn on the air conditioner or adjust the temperature, they can input the voice command "Turn on the air conditioner" or "Set the air conditioner to 25 degrees." After obtaining the corresponding voice command, the controller 250 can determine whether the command is an "on" command or a temperature adjustment command. These types of commands only control the air conditioner's adjustment parameters and do not require the user's location, so the controller 250 can directly execute the command. However, when a user wants the air conditioner to blow air towards them, they can input the voice command "The air should blow towards me." The controller 250 can determine that the current control command requires the user's location and that the air should blow towards the user. In this case, the controller 250 can first perform sound source localization processing to obtain the user's location and then execute the control command based on that location.
[0094] It should be noted that the control commands requiring sound source localization differ for different smart devices. Therefore, the target control commands requiring sound source localization for each type of smart device can be pre-calculated. After the controller 250 recognizes the voice and obtains the control command, it can detect whether the control command is the target control command. If so, it can first perform sound source localization processing on the user, and then execute the control command based on the user's location. If not, it can directly execute the control command.
[0095] In some embodiments, when locating the sound source for a user, the controller 250 may first perform second-order filtering delay estimation on the first and second speech audio data to obtain the speech delay.
[0096] Since users may be in different locations relative to the smart device, and the distances between users and the first and second sound acquisition devices may also be different, the time it takes for the user's voice to reach the two sound acquisition devices differs, resulting in a certain delay, referred to as voice delay in this embodiment. Second-order filtering delay estimation is a specific method provided in this embodiment for obtaining voice delay.
[0097] Second-order filtering delay estimation may include the following steps:
[0098] The controller 250 can first perform frame-segmentation processing on the first voice audio data and the second voice audio data respectively to obtain several frames of audio data corresponding to the first voice audio data, referred to as the first audio frame in this embodiment, and several frames of audio data corresponding to the second voice audio data, referred to as the second audio frame in this embodiment.
[0099] When framing the first and second audio data, the same number of frames are used; that is, the number of frames in the first audio frame is the same as the number of frames in the second audio frame. For example, if an 8-second audio data segment is divided into 800 frames, then there will be 100 frames of audio data per second. It should be noted that since the content of the first and second audio data is identical and they are divided into the same number of audio frames, the audio data corresponding to each frame will also be identical. For example, the first frame of the first audio data and the first frame of the second audio data are the same data, the second frame of the first audio data and the second frame of the second audio data are the same data, and so on.
[0100] After obtaining the audio frames corresponding to the two audio data segments, the controller 250 can process the first audio frame and the second audio frame based on the time delay estimation method to obtain the time delay value, which is referred to as the initial time delay in this embodiment.
[0101] The time delay estimation method can be the generalized cross-correlation time delay estimation method (GCC), the cross-power spectrum phase time delay estimation method (GCC-PHAT), or other time delay estimation methods. This application embodiment uses the cross-power spectrum phase time delay estimation method as an example for illustration, including the following steps:
[0102] To obtain the initial delay, the controller 250 can first perform cross-correlation processing on the first audio frame and the second audio frame to obtain the first cross-correlation function. The cross-correlation function is expressed as:
[0103] R x1x2 (τ)=E[x1(n)x2(n-τ)]
[0104] in,
[0105] x1 and x2 are the audio signals received by the two sound acquisition devices, respectively, and τ is the initial time delay from the sound source to the two sound acquisition devices.
[0106] Considering that ambient noise has a certain impact on the signal received by the sound acquisition device, a noisy audio signal model can be obtained, represented as:
[0107] x m (n)=a m s(n-τ m )+v m (n)
[0108] in,
[0109] 'a' is the attenuation factor for sound wave propagation, and 'v' is the ambient noise.
[0110] Therefore, the first cross-correlation function can be obtained as:
[0111] R x1x2 (τ)=a1*a2*Rss(τ-τ12)+R v1v2 (τ)
[0112] The controller 250 can first perform a Fourier transform on the first cross-correlation function, and then perform an inverse Fourier transform to obtain the second cross-correlation function.
[0113] The second cross-correlation function can be expressed as:
[0114]
[0115] in,
[0116] Represents the weighting function. This represents the power spectrum function.
[0117] After obtaining the second cross-correlation function, the controller 250 can obtain the initial delay based on the second cross-correlation function. The controller 250 can obtain the maximum value of the peak value in the second cross-correlation function and obtain the delay corresponding to the maximum value, and determine the delay as the initial delay. The initial delay of each frame of audio data can be obtained according to the above steps.
[0118] The accuracy of the initial delay is low, so the initial delay can be processed to obtain an accurate delay value, i.e., the speech delay.
[0119] In some embodiments, the controller 250 can perform second-order filtering on the acquired initial delay to obtain the speech delay. The second-order filtering can be a pre-set processing method, including first-order filtering and second-order filtering.
[0120] This application employs an IIR (Infinite Impulse Response) digital filter, also known as a recursive filter, to perform second-order filtering on the initial time delay. The processing algorithm of the IIR digital filter can be expressed by the following formula:
[0121]
[0122] Where q represents the order, which is related to the computational complexity of the algorithm; t(n) is the input sequence, and u(n) is the output sequence.
[0123] In this embodiment, the applicant pre-obtains the calculation formulas for the first-order and second-order filtering processes based on the algorithm formula of the IIR digital filter, and stores them in the IIR digital filter. In applications that perform second-order filtering on the initial time delay, the initial time delay can be directly input into the IIR digital filter to perform the second-order filtering.
[0124] Second-order filtering may include the following steps:
[0125] The controller 250 can first perform a first-order filter on the initial time delay to obtain the first time delay value. The first-order filter is used to evaluate the real-time performance of the signal to speed up the response. To accelerate the response, a first-order autoregressive filter can be selected. The formula corresponding to the first-order filtering is:
[0126] u(n)=αt(n)+(1-α)u(n-1),α∈(0,1)
[0127] in,
[0128] α represents the weighting coefficient, which can be a pre-set parameter. The weighting coefficient α is closely related to the rise time and steady-state error of the step response. For a first-order filter, the real-time response speed is a key factor; the larger α is, the shorter the rise time. α can be set to a value of 0.9.
[0129] n represents the initial delay, and u(n) represents the first delay value corresponding to the initial delay.
[0130] After obtaining the first delay value, the controller 250 can calculate the deviation value of the first delay value. The deviation value refers to the difference between the first delay value corresponding to the initial delay of a certain frame of audio data and the first delay value corresponding to the initial delay of the previous frame of audio data.
[0131] That is, σn = u(n) - u(n-1), where σn represents the deviation value of u(n), and u(n-1) is the first delay value corresponding to the initial delay of the audio data of the previous frame of u(n).
[0132] After obtaining the deviation value, the controller 250 can perform a second-order filtering process on the first time delay value based on the deviation value to obtain a second time delay value. The second-order filtering process introduces variable parameters to calculate the deviation of the first-order output signal. The formula corresponding to the second-order filtering process is:
[0133]
[0134] in,
[0135] η is a reference value for measuring the deviation, η1 and η2 are pre-set parameters, and β is a preset parameter, which can be 0.85. The second delay value can be obtained according to the above formula, and the voice delay can be obtained from the second delay value.
[0136] The controller 250 can first obtain the audio frame frequency based on the frame count of the first audio frame or the frame count of the second audio frame. Since the frame count of the first audio frame is the same as the frame count of the second audio frame, the frame count of either audio frame can be calculated. The audio frame frequency is the number of audio frames per second. For example, if an 8-second audio data segment is divided into 800 frames, then there will be 100 audio frames per second, that is, the audio frame frequency is 100.
[0137] The controller 250 can calculate the ratio of the second delay value to the audio frame frequency, which is referred to as the first ratio in this embodiment. The controller 250 can determine the first ratio as the voice delay.
[0138] In some embodiments, after obtaining the voice latency, the controller 250 can obtain the user's orientation relative to the smart device based on the voice latency.
[0139] It's important to note that the propagation pattern of the user's voice signal to the two sound acquisition devices may differ depending on the distance between the user and the smart device. When the user is far from the smart device, it may cause signal distortion in the sound acquisition devices. In this case, the sound source can be considered a line, meaning the voice signal can be considered to propagate in a parallel manner. However, when the user is close to the smart device, there is no signal distortion. It's as if the signal propagates from the location of the sound source to the two sound acquisition devices, and the voice signal does not propagate in a parallel manner.
[0140] Therefore, smart devices can first determine whether the user's current voice input signal is propagating in a parallel form, and then process it accordingly based on different situations.
[0141] The controller 250 can first obtain the first distance from the user to the first sound collector based on the voice delay, or obtain the second distance from the user to the second sound collector, or obtain the first distance and the second distance simultaneously.
[0142] In this embodiment, the distance between the first and second sound collectors is small, such as 10 centimeters. Considering the small distance between the sound collectors, the difference in distance from the user to the two sound collectors will also be small, i.e., the difference between the first distance and the second distance is small. Therefore, the distance from the user to the smart device can be determined based on either the first distance or the second distance.
[0143] After determining the voice delay, i.e., the time difference between the user's voice and the two sound acquisition devices, the distance difference between the user and the two sound acquisition devices can be obtained by calculating the product of the time difference and the speed of sound, i.e., the difference between the first distance and the second distance. The controller 250 can obtain the distance from the user to either sound acquisition device based on the geometric positioning method.
[0144] The controller 250 can obtain the distance type between the user and the smart device based on a first distance or a second distance. In this embodiment, the distance type includes a first type of distance and a second type of distance. The first type of distance, also known as far-field distance, indicates that the user is far from the smart device, and the user's voice signal is considered to propagate to the two sound collectors in a parallel manner. The second type of distance, also known as near-field distance, indicates that the user is close to the smart device, and the user's voice signal is considered not to propagate to the two sound collectors in a parallel manner.
[0145] The controller 250 can determine the distance type based on preset distance conditions. The preset distance conditions can be expressed as:
[0146] r < 2L 2 / λ
[0147] in,
[0148] r represents the distance from the sound source to the sound collector, which can be a first distance or a second distance in this embodiment. L is the array length of the two sound collectors, and λ is the maximum wavelength of the sound.
[0149] If the above conditions are met, it means that the distance type from the user to the smart device is near-field distance; if not, it means that the distance type from the user to the smart device is far-field distance.
[0150] If the distance type is the first type of distance, i.e. far-field distance, the controller 250 can obtain the distance between the first and second sound collectors and calculate the user direction based on the voice delay and the distance between the sound collectors.
[0151] Figure 7 Schematic diagrams of speech signal to sound acquisition unit in some embodiments are shown. For example... Figure 7 As shown, the distance between the first and second sound collectors is d, that is, the spacing between the sound collectors is d. The distance from the user to the first sound collector is d1, and the distance from the user to the second sound collector is d2. The difference between the second distance and the first distance is d2-d1.
[0152] According to the relationships shown in the diagram:
[0153] τ=d*cos(θ) / c
[0154] in,
[0155] τ represents speech delay, c represents the speed of sound, and θ represents the user direction. The user direction refers to the angle between the line connecting the two sound acquisition devices and the line connecting the user to any one of the sound acquisition devices.
[0156] The controller 250 can first calculate the product of the voice delay and the speed of sound, which is the difference between the first distance and the second distance, i.e., d2-d1.
[0157] The controller 250 can calculate a second ratio between the product and the distance between the sound acquisition devices. This second ratio is the cosine of the user's direction. Based on this second ratio, the controller 250 can calculate the user's direction.
[0158] User orientation can be represented as:
[0159]
[0160] In some embodiments, if the distance type is a second type of distance, i.e., near-field distance, the controller 250 can calculate a first angle from the user to the first sound collector based on the first distance, voice delay, and the distance between the sound collectors. Alternatively, the controller 250 can calculate a second angle from the user to the second sound collector based on the second distance, voice delay, and the distance between the sound collectors.
[0161] Figure 8 Schematic diagrams of speech signal to sound acquisition unit in some embodiments are shown. For example... Figure 8 As shown, the distance between the first and second sound collectors is d, i.e., the spacing between the sound collectors is d. The distance from the user to the first sound collector is d1, and the distance from the user to the second sound collector is d2. The difference between the second distance and the first distance is d2-d1. The user's direction from the first sound collector is θ1, and the user's direction from the first sound collector is θ2.
[0162] Based on the triangular relationship in the diagram and incorporating voice latency, the user's orientation can be determined:
[0163]
[0164]
[0165] The controller 250 can determine the first angle or the second angle as the user direction.
[0166] In some embodiments, after acquiring the user's orientation, the controller 250 can execute control commands based on the user's orientation. Different processes can be performed using the user's orientation to execute control commands, depending on the type of smart device.
[0167] In the case of a smart device being an air conditioner, the air conditioner includes an air outlet, which can then blow air outwards to change the ambient temperature.
[0168] The controller 250 can detect the type of control command to determine whether user location is required. For control commands that do not require user location, such as turning the air conditioner on or off, or adjusting the air conditioner temperature, the controller 250 can directly execute the control command.
[0169] If the control command instructs the smart device to blow air towards the user, for example, if the user's voice says "blow air towards me," then the controller 250 can adjust the air outlet angle to the user's direction and control the smart device to blow air towards the user.
[0170] If the control command instructs the smart device to blow air away from the user, for example, if the user's voice says "wind away from me," then the controller 250 can obtain the range of air outlet angles supported by the air outlet. To meet the user's needs, the air conditioner can be directed to blow air in the direction furthest from the user. The controller 250 can obtain the target angle furthest from the user within the air outlet angle range and adjust the air outlet angle to the target angle. The controller 250 can control the smart device to blow air towards the user.
[0171] In some embodiments, considering that the user's distance from the air conditioner may vary and the required airflow speed may differ, the controller 250 can automatically adjust the airflow speed of the air conditioner.
[0172] The controller 250 can determine the distance type between the user and the smart device.
[0173] If the distance type is Class 1, meaning the user is currently at a far-field distance, it indicates that the user is relatively far from the air conditioner and has a greater need for airflow speed. Controller 250 can adjust the airflow speed from the vent to a first speed, which can be the air conditioner's maximum fan speed, and control the smart device to direct airflow towards the user at that first speed.
[0174] If the distance type is the second type, meaning the user is currently at near-field distance, it indicates that the user is relatively close to the air conditioner and has a lower demand for airflow. The controller 250 can adjust the airflow speed from the vent to the second speed. The second speed can be the minimum airflow speed of the air conditioner or a speed lower than the currently set speed, and can control the smart device to blow air towards the user at the second speed.
[0175] In some embodiments, where the smart device is a display device, the display device may be equipped with an image acquisition device, such as a camera. The display device may have a built-in camera or may connect to a camera via an external device interface.
[0176] If the user is located in a relatively remote position from the camera, the user will appear at the edge of the image captured by the camera. Figure 9 Schematic diagrams of user images in some embodiments are shown. For example... Figure 9As shown, the user is located on the left edge of the image, which may result in a poor user experience.
[0177] Therefore, when a user's control command requires the camera to capture an image of the user, the controller 250 can adjust the camera's shooting angle so that the user is in the center of the image captured by the camera.
[0178] Considering that the camera may not be able to rotate, the controller 250 can first detect the rotation of the camera, that is, detect whether the center position of the camera can be rotated to the user's direction.
[0179] If possible, the controller 250 can control the camera to rotate so that the center position of the camera is in the direction of the user, and control the camera to capture the user's image. Figure 10 Schematic diagrams of user images in some embodiments are shown. For example... Figure 10 As shown, the user is positioned in the central area of the image, improving the user experience.
[0180] If not, the controller 250 can directly control the camera to capture images of the user.
[0181] This application also provides a sound source localization method, applied to a smart device, the method comprising:
[0182] Acquire the first voice audio data collected by the first sound acquisition device and the second voice audio data collected by the second sound acquisition device;
[0183] The user's control commands are obtained by recognizing the first or second voice audio data.
[0184] The speech delay is obtained by performing second-order filtering and time delay estimation on the first and second speech audio data.
[0185] The user's orientation relative to the smart device is obtained based on voice latency;
[0186] Execute control commands based on user direction.
[0187] In some embodiments, performing second-order filtering delay estimation on the first and second speech audio data further includes:
[0188] The first and second audio data are processed into frames to obtain a first audio frame and a second audio frame; the number of frames in the first and second audio frames is the same. The first and second audio frames are then processed based on a time delay estimation method to obtain an initial time delay. A second-order filter is then applied to the initial time delay to obtain the speech time delay.
[0189] In some embodiments, processing the first audio frame and the second audio frame based on a time delay estimation method further includes:
[0190] Cross-correlation processing is performed on the first and second audio frames to obtain the first cross-correlation function. Fourier transform and inverse Fourier transform are then performed on the first cross-correlation function to obtain the second cross-correlation function. The initial time delay is then obtained based on the second cross-correlation function.
[0191] In some embodiments, the second-order filtering of the initial time delay further includes:
[0192] The initial delay is subjected to a first-order filter to obtain a first delay value. The deviation of the first delay value is calculated. Based on the deviation, the first delay value is subjected to a second-order filter to obtain a second delay value. The audio frame frequency is obtained based on the frame number of the first or second audio frame. A first ratio is calculated between the second delay value and the audio frame frequency, and this first ratio is determined as the speech delay.
[0193] In some embodiments, obtaining the user's orientation relative to the smart device based on voice latency further includes:
[0194] The system obtains either a first distance from the user to a first sound collector or a second distance from the user to a second sound collector based on voice latency. It then determines the distance type from the user to the smart device based on either the first or second distance. If the distance type is a first type, it obtains the distance between the first and second sound collectors and calculates the user's direction based on the voice latency and the distance between the sound collectors. If the distance type is a second type, it calculates a first angle from the user to the first sound collector based on the first distance, voice latency, and the distance between the sound collectors; or, it calculates a second angle from the user to the second sound collector based on the second distance, voice latency, and the distance between the sound collectors. The first or second angle is then determined as the user's direction.
[0195] In some embodiments, calculating the user's direction based on voice latency and the distance between sound collectors further includes:
[0196] Calculate the product of speech delay and sound velocity. Calculate the ratio of this product to the second ratio of the distance between the sound acquisition units; this second ratio is the cosine of the user's direction. Calculate the user's direction based on this second ratio.
[0197] In some embodiments, the smart device includes an air outlet, executes control commands based on user orientation, and further includes:
[0198] If the control command instructs the smart device to blow air towards the user, adjust the air outlet angle to the user's direction so that the smart device blows air towards the user. If the control command instructs the smart device to blow air away from the user, obtain the range of air outlet angles supported by the air outlet; obtain the target angle that is farthest from the user's direction within the air outlet angle range, and adjust the air outlet angle to the target angle so that the smart device blows air towards the target angle.
[0199] In some embodiments, controlling the smart device to blow air toward the user further includes:
[0200] Obtain the distance type between the user and the smart device. If the distance type is Class 1, adjust the air outlet speed to the first speed so that the smart device outputs air at the first speed. If the distance type is Class 2, adjust the air outlet speed to the second speed so that the smart device outputs air at the second speed.
[0201] The same or similar parts among the various embodiments in this specification can be referred to mutually, and will not be repeated here.
[0202] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or certain parts of the embodiments of the present invention.
[0203] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0204] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better utilize the embodiments and various different variations of embodiments suitable for specific application considerations.
Claims
1. A smart device, characterized in that, include: The sound acquisition module is configured to collect the user's voice audio data; The sound acquisition module includes a first sound acquisition unit and a second sound acquisition unit; The controller is configured as follows: Acquire the first voice audio data collected by the first sound collector and the second voice audio data collected by the second sound collector; The first or second voice audio data is identified to obtain the user's control commands. The first and second voice audio data are processed into frames to obtain the first audio frame and the second audio frame. The first audio frame has the same number of frames as the second audio frame; The first audio frame and the second audio frame are processed based on the time delay estimation method to obtain the initial time delay; The initial time delay is subjected to a first-order filter to obtain a first time delay value; Calculate the deviation value of the first time delay value; The first time delay value is subjected to a second-order filtering process based on the deviation value to obtain a second time delay value; The audio frame frequency is obtained based on the frame number of the first audio frame or the frame number of the second audio frame. Calculate the first ratio of the second delay value to the audio frame frequency, and determine the first ratio as the speech delay; The user's orientation relative to the smart device is obtained based on the voice delay. The control command is executed based on the user's orientation.
2. The intelligent device according to claim 1, characterized in that, The controller performs processing on the first and second audio frames based on a time delay estimation method, and is further configured to: Perform cross-correlation processing on the first audio frame and the second audio frame to obtain the first cross-correlation function; The first cross-correlation function is processed by Fourier transform and inverse Fourier transform to obtain the second cross-correlation function; The initial delay is obtained based on the second cross-correlation function.
3. The intelligent device according to claim 1, characterized in that, The controller performs the task of obtaining the user's orientation relative to the smart device based on the voice delay, and is further configured to: Based on the voice delay, obtain the first distance from the user to the first sound collector or the second distance from the user to the second sound collector; The distance type from the user to the smart device is obtained based on the first distance or the second distance; If the distance type is a first type of distance, obtain the distance between the first and second sound collectors; and calculate the user direction based on the speech delay and the distance between the sound collectors; the first type of distance is a far-field distance. If the distance type is the second type of distance, a first angle from the user to the first sound collector is calculated based on the first distance, the voice delay, and the distance between the sound collectors; or, a second angle from the user to the second sound collector is calculated based on the second distance, the voice delay, and the distance between the sound collectors; the second type of distance is a near-field distance; The first angle or the second angle is determined as the user direction.
4. The intelligent device according to claim 3, characterized in that, The controller performs the calculation of user direction based on the speech delay and the distance between the sound collectors, and is also configured to: Calculate the product of the speech delay and the speed of sound; Calculate the product and a second ratio to the distance between the sound collectors, where the second ratio is the cosine of the user's direction; The user direction is calculated based on the second ratio.
5. The intelligent device according to claim 1, characterized in that, include: Air vent; The controller executes the control instructions based on the user's orientation and is further configured to: If the control command instructs the smart device to blow air towards the user, the air outlet angle is adjusted to the user's direction so that the smart device blows air towards the user. If the control command instructs the smart device to blow air away from the user, the range of air outlet angles supported by the air outlet is obtained; the target angle that is farthest from the user in the range of air outlet angles is obtained, and the air outlet angle is adjusted to the target angle so that the smart device blows air towards the target angle.
6. The intelligent device according to claim 5, characterized in that, The controller controls the smart device to blow air towards the user and is also configured to: Obtain the distance type between the user and the smart device; If the distance type is a first type of distance, the air outlet speed is adjusted to a first speed so that the smart device emits air at the first speed; the first type of distance is a far-field distance. If the distance type is the second type of distance, the air outlet speed is adjusted to the second speed so that the smart device outputs air at the second speed; the second type of distance is the near-field distance.
7. A method for locating a sound source, characterized in that, Applied to smart devices, the method includes: Acquire the first voice audio data collected by the first sound acquisition device and the second voice audio data collected by the second sound acquisition device; The first or second voice audio data is identified to obtain the user's control commands. The first audio data and the second audio data are processed into frames to obtain a first audio frame and a second audio frame; the number of frames in the first audio frame and the number of frames in the second audio frame are the same. The first audio frame and the second audio frame are processed based on the time delay estimation method to obtain the initial time delay; The initial time delay is subjected to a first-order filter to obtain a first time delay value; Calculate the deviation value of the first time delay value; The first time delay value is subjected to a second-order filtering process based on the deviation value to obtain a second time delay value; The audio frame frequency is obtained based on the frame number of the first audio frame or the frame number of the second audio frame. Calculate the first ratio of the second delay value to the audio frame frequency, and determine the first ratio as the speech delay; The user's orientation relative to the smart device is obtained based on the voice delay. The control command is executed based on the user's orientation.
Citation Information
Patent Citations
Information processing method and terminal
CN107689228A
A voice control method and apparatus, and household appliance device
WO2018188287A1
