Speech matching method, apparatus, device, and storage medium
By obtaining the location coordinates of the sound source in the speech data and calculating the target distance, the speech matching range is determined, which solves the problem of inaccurate sound source localization in existing speech matching systems and achieves higher speech matching accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HAINING MICRO NANO SENSING COMPUTING TECH CO LTD
- Filing Date
- 2022-11-03
- Publication Date
- 2026-05-12
AI Technical Summary
Existing voice matching systems cannot pinpoint the exact location of the sound source, resulting in low accuracy and poor matching results.
By obtaining the coordinates of the sound source location of the target speech data, calculating the target distance between the sound source location and the speech receiving location, determining the speech matching range in the preset speech database, and using the target distance as a reference for speech matching processing.
It improves the accuracy of voice matching and avoids the impact of the large variety and volume of data in the voice database on the matching effect.
Smart Images

Figure CN115810344B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of speech matching technology, and in particular to a speech matching method, apparatus, device and storage medium. Background Technology
[0002] Voice matching refers to the matching and processing of audio and speech. With the development of voice recognition technology, voice matching has been widely used in the field of detection, such as vehicle horn detection and equipment fault detection, all of which require the use of voice matching systems. However, current voice matching systems lack the ability to locate sound sources and cannot obtain the specific location of sound sources, resulting in low accuracy and poor matching effects. Summary of the Invention
[0003] In view of this, embodiments of this application provide a voice matching method, apparatus, device, and storage medium, aiming to solve the technical problems of low accuracy and poor matching effect in the prior art.
[0004] A first aspect of this application provides a voice matching method, comprising: acquiring target voice data and the coordinates of a sound source location of the target voice data; calculating a target distance between a sound source location and a voice receiving location based on the sound source coordinates; determining a voice matching range in a preset voice database based on the target distance, wherein the voice data included in the voice matching range forms a first voice dataset, the voice data included in the voice database forms a second voice dataset, and the first voice dataset is a subset of the second voice dataset; and performing voice matching processing on the target voice data and the voice data in the first voice dataset to obtain a voice matching result corresponding to the target voice data.
[0005] In conjunction with the first aspect, in a first possible implementation of the first aspect, the step of acquiring target speech data includes: performing sound source sensing on the target scene to obtain a plurality of speech signals, wherein each speech signal corresponds to a sensing point; performing sound intensity detection on the plurality of speech signals respectively to obtain a sound intensity value corresponding to each speech signal; determining a target sensing point based on the sound intensity value corresponding to each speech signal, and determining the speech signal corresponding to the target sensing point as target speech data, wherein the target sensing point is the sensing point corresponding to the speech signal with the largest sound intensity value among the plurality of speech signals.
[0006] In conjunction with the first possible implementation of the first aspect, in the second possible implementation of the first aspect, the step of obtaining the sound source location coordinates of the target speech data includes: performing feature extraction processing on the target speech data to obtain speech features corresponding to the target speech data; establishing a coordinate system based on the speech features to obtain an initial coordinate system; and performing positioning processing on the target speech data based on the initial coordinate system to obtain the sound source location coordinates of the target speech data.
[0007] In conjunction with the second possible implementation of the first aspect, the third possible implementation of the first aspect, after obtaining the sound source location coordinates of the target speech data, further includes: segmenting the target speech data to obtain several speech segments; performing feature extraction processing on the several speech segments to obtain several speech segment features, wherein the several speech segments correspond one-to-one with the several speech segment features; optimizing the initial coordinate system based on the several speech segment features to obtain an optimized coordinate system; and adjusting the sound source location coordinates based on the optimized coordinate system.
[0008] In conjunction with the second possible implementation of the first aspect, in the fourth possible implementation of the first aspect, before the step of performing localization processing on the target speech data according to the initial coordinate system to obtain the sound source location coordinates of the target speech data, the method further includes: performing environmental noise intensity detection processing on the target speech data, extracting environmental noise features from the target speech data, and deleting the environmental noise features.
[0009] In conjunction with the first aspect, in the fifth possible implementation of the first aspect, the step of performing voice matching processing on the target voice data and the voice data in the first voice dataset to obtain the voice matching result corresponding to the target voice data includes: segmenting the target voice data to obtain several voice segments; performing data comparison processing on the several voice segments to obtain data comparison results, wherein the data comparison processing includes voice feature comparison, voice parameter comparison, voice duration comparison, and voice storage size comparison; performing segment statistical processing on the several voice segments according to the data comparison results to obtain segment statistical results; performing voice integration processing on the several voice segments according to the segment statistical results to obtain integrated voice data, wherein the voice integration processing includes voice integration processing with the same feature, voice integration with the same parameter, voice integration with the same duration, and voice integration processing with the range storage size; and performing voice matching processing on the integrated voice data and the voice data in the first voice dataset to obtain the voice matching result corresponding to the target voice data.
[0010] In conjunction with the fifth possible implementation of the first aspect, in the sixth possible implementation of the first aspect, before the step of segmenting the target speech data to obtain several speech segments, the method further includes: preprocessing the target speech data, wherein the preprocessing includes: blurry segment removal processing, speech filtering processing, and noisy speech processing.
[0011] A second aspect of this application provides a voice matching device, comprising: an acquisition module for acquiring target voice data and the coordinates of a sound source location of the target voice data; a calculation module for calculating a target distance between a sound source location and a voice receiving location based on the sound source coordinates; a determination module for determining a voice matching range in a preset voice database based on the target distance, wherein the voice data included in the voice matching range forms a first voice dataset, the voice data included in the voice database forms a second voice dataset, and the first voice dataset is a subset of the second voice dataset; and a matching module for performing voice matching processing on the target voice data and the voice data in the first voice dataset to obtain a voice matching result corresponding to the target voice data.
[0012] A third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the electronic device, wherein the processor executes the computer program to implement the steps of the voice matching method provided in the first aspect.
[0013] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the voice matching method provided in the first aspect.
[0014] The voice matching method, apparatus, electronic device, and storage medium provided in this application have the following beneficial effects:
[0015] This application obtains target speech data and the coordinates of the sound source location of the target speech data; calculates the target distance between the sound source location and the speech receiving location based on the sound source location coordinates; determines a speech matching range in a preset speech database based on the target distance, wherein the speech data included in the speech matching range forms a first speech dataset, the speech data included in the speech database forms a second speech dataset, and the first speech dataset is a subset of the second speech dataset; and performs speech matching processing between the target speech data and the speech data in the first speech dataset to obtain the speech matching result corresponding to the target speech data. The above method, by calculating the target distance between the sound source location and the sound receiving location, uses the target distance as a reference for speech matching, which can greatly improve the accuracy of speech matching. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 A flowchart illustrating the implementation of a speech matching method provided in this application embodiment;
[0018] Figure 2 A flowchart of a method for acquiring target speech data in the speech matching method provided in the embodiments of this application;
[0019] Figure 3 A flowchart illustrating a method for obtaining the sound source location coordinates of target speech data in the speech matching method provided in this application embodiment;
[0020] Figure 4 A flowchart illustrating a method for adjusting and optimizing the location coordinates of a sound source in the speech matching method provided in this application embodiment;
[0021] Figure 5 A flowchart of a method for performing voice matching on target voice data in the voice matching method provided in the embodiments of this application;
[0022] Figure 6 A basic structural block diagram of a voice matching device provided in an embodiment of this application;
[0023] Figure 7 This is a basic structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0025] Please see Figure 1 , Figure 1 A flowchart illustrating the implementation of a speech matching method provided in this application embodiment is shown below. Details are as follows:
[0026] S11: Obtain the target speech data and the coordinates of the sound source location of the target speech data;
[0027] S12: Calculate the target distance between the sound source location and the voice receiving location based on the sound source location coordinates;
[0028] S13: Based on the target distance, determine the voice matching range in a preset voice database, wherein the voice data included in the voice matching range forms a first voice dataset, the voice data included in the voice database forms a second voice dataset, and the first voice dataset is a subset of the second voice dataset;
[0029] S14: Perform voice matching processing on the target voice data and the voice data in the first voice dataset to obtain the voice matching result corresponding to the target voice data.
[0030] In this embodiment, the speech matching method is applied in a speech matching system with sound source localization functionality. In the speech matching system, a speech collection module can be used to collect and process speech data to obtain target speech data to be matched. After obtaining the target speech data, the sound source localization module further performs sound source localization on the target speech data to obtain the sound source location coordinates. For example, when obtaining the sound source location coordinates of the target speech data, one of the following methods can be used for sound source localization: a localization method based on controllable beamforming with maximum output power, a localization method based on high-resolution spectrum estimation, a localization method based on time delay difference estimation, or a machine learning-based method. After obtaining the sound source location coordinates, the position coordinates of the speech receiving position in the coordinate system corresponding to the sound source location coordinates are obtained. The target distance between the sound source location and the speech receiving position is calculated using the sound source location coordinates and the position coordinates of the speech receiving position in the coordinate system corresponding to the sound source location coordinates. It can be understood that the target distance is the straight-line distance between the point represented by the sound source location coordinates and the point represented by the position coordinates of the speech receiving position in the coordinate system. The voice matching system has a pre-set voice database containing a large amount of voice data, which is categorized according to type, distance, and other dimensions. In this embodiment, after calculating the target distance between the sound source location and the voice receiving location of the target voice data, this target distance can be used as a reference for voice matching. The voice matching range is determined within the voice database; that is, voice data that meets the target distance requirement is selected from the database to form a first voice dataset. Then, voice data from this first voice dataset is used to perform voice matching with the target voice data. This allows for the acquisition of the corresponding voice matching result based on the first voice dataset. This avoids the impact of a large volume and variety of voice data in the database on the voice matching effect, significantly improving the accuracy of voice matching. It should be noted that in this embodiment, it is assumed that all voice data contained in the voice database forms a second voice dataset, and the first voice dataset is a subset of the second voice dataset.
[0031] In some embodiments of this application, please refer to Figure 2 , Figure 2 A flowchart illustrating a method for acquiring target speech data in the speech matching method provided in this application embodiment is shown below. Details are as follows:
[0032] S21: Perform sound source sensing on the target scene to obtain several speech signals, wherein one speech signal corresponds to one sensing point;
[0033] S22: Perform sound intensity detection on the plurality of speech signals respectively to obtain the sound intensity value corresponding to each speech signal;
[0034] S23: Determine a target sensing point based on the sound intensity value corresponding to each speech signal, and determine the speech signal corresponding to the target sensing point as target speech data, wherein the target sensing point is the sensing point corresponding to the speech signal with the largest sound intensity value among the plurality of speech signals.
[0035] In this embodiment, target voice data can be obtained through the sound source sensing module and the sound intensity detection module in the voice matching system. The target scene refers to the real scene where sound detection is required, such as a road section requiring vehicle horn detection, or an area where equipment is installed for monitoring. In this embodiment, a spherical microphone array can be installed in the target scene as a sound source sensing module to perform sound source sensing. For example, in this embodiment, the process of obtaining target voice data can be as follows: using a spherical microphone array to perform sound source sensing on the target scene can obtain several voice signals. Each voice signal corresponds to a sensing point. After obtaining several voice signals through the spherical microphone array, since the voice signals are represented as digital signals, this embodiment can use a frequency domain signal conversion module to convert the voice signals from digital signals to frequency domain signals for use in subsequent steps. After converting the voice signals to frequency domain signals, a sound intensity detection sensor can be used as a sound intensity detection module to detect the sound intensity of each voice signal one by one, obtaining the sound intensity value corresponding to each voice signal. Furthermore, by comparing the magnitude of the sound intensity values corresponding to each speech signal, the speech signal with the largest sound intensity value is determined, the sensing point corresponding to the speech signal with the largest sound intensity value is determined as the target sensing point, and the speech signal with the largest sound intensity value is determined as the target speech data.
[0036] In some embodiments of this application, please refer to Figure 3 , Figure 3 This is a flowchart illustrating a method for obtaining the sound source location coordinates of target speech data in the speech matching method provided in this application embodiment. Details are as follows:
[0037] S31: Perform feature extraction processing on the target speech data to obtain the speech features corresponding to the target speech data;
[0038] S32: Establish a coordinate system based on the spoken features to obtain an initial coordinate system;
[0039] S33: Based on the initial coordinate system, perform localization processing on the target speech data to obtain the sound source location coordinates of the target speech data.
[0040] In this embodiment, after obtaining the target speech data, coordinate establishment can be performed using the coordinate establishment module in the speech matching system to obtain the sound source location coordinates of the target speech data. For example, in this embodiment, the process of obtaining the sound source location coordinates of the target speech data can be as follows: Feature extraction processing can be performed on the obtained target speech data to obtain the corresponding speech features. It is understood that in this embodiment, the speech features can be frequency features, time features, etc., of the target speech data. Then, after obtaining the speech features of the target speech data, the initial position of the coordinate axes is determined based on the speech features, establishing the coordinate axes of the coordinate system. This is then extended to a plane through parallel relationships to obtain an initial coordinate system. It is understood that this initial coordinate system can be a two-dimensional planar coordinate system or a three-dimensional spatial coordinate system. After obtaining the initial coordinate system, the target speech data can be located based on the position of the target sensing point representing the location of the target speech data in the initial coordinate system, thereby obtaining the sound source location coordinates of the target speech data.
[0041] In some embodiments of this application, please refer to Figure 4 , Figure 4 This is a flowchart illustrating a method for adjusting and optimizing the location coordinates of a sound source in the speech matching method provided in this application embodiment. Details are as follows:
[0042] S41: The target speech data is segmented to obtain several speech segments;
[0043] S42: Perform feature extraction processing on the plurality of speech segments to obtain a plurality of speech segment features, wherein the plurality of speech segments correspond one-to-one with the plurality of speech segment features;
[0044] S43: Based on the features of the several speech segments, the initial coordinate system is optimized to obtain an optimized coordinate system;
[0045] S44: Adjust the coordinates of the sound source position according to the optimized coordinate system.
[0046] In this embodiment, the voice matching system can also use a coordinate integration and adjustment module to adjust and optimize the sound source location coordinates obtained by the coordinate establishment module. Specifically, the target voice data can be segmented into several voice segments. Then, feature extraction is performed on these voice segments to obtain several voice segment features, where each voice segment corresponds one-to-one with its feature. Based on each voice segment feature, the initial position of the coordinate axis is determined, resulting in several coordinate axes. The coordinate integration and adjustment module determines an optimal position for each obtained coordinate axis. Based on the optimal position of each coordinate axis, the initial coordinate system is optimized to obtain an optimized coordinate system. According to the relative positional relationship between the optimized coordinate system and the initial coordinate system, the sound source location coordinates located in the initial coordinate system can be mapped to the optimized coordinate system, thereby adjusting and optimizing the sound source location coordinates.
[0047] In some embodiments of this application, before coordinate establishment is performed by the coordinate establishment module in the voice matching system, the target voice data can be processed by the data processing module in the voice matching system to remove blank signal frames from the target voice data. Specifically, after the voice matching system obtains the target voice data through the sound intensity detection module, it can transmit the target voice data to the data processing module through the data transmission module. The data processing module performs signal frame detection on the target voice data, detecting one or more parameters among the signal strength, short-time energy, and zero-crossing rate of each signal frame in the target voice data. The parameter values are used to determine whether the signal frame is a blank signal frame. If it is determined to be a blank signal frame, the blank signal frame is deleted from the target voice data. For example, suppose a signal strength threshold is set to determine whether a signal frame is a blank signal frame. By detecting the signal strength of the signal frames in the target voice data, the detected signal strength is compared with the set signal strength threshold. If the signal strength is less than the signal strength threshold, the signal frame is determined to be a blank signal frame and is deleted from the target voice data. By removing blank signal frames from the target speech data, the sound source localization of the target speech data can be avoided from being affected by blank signal frames, thus improving the accuracy of sound source localization.
[0048] In some embodiments of this application, before establishing coordinates through the coordinate establishment module in the voice matching system, the environmental noise intensity detection module in the voice matching system can also perform environmental noise intensity detection processing on the target voice data, extract environmental noise features from the target voice data, and delete the environmental noise features. Specifically, in the voice matching system, the environmental noise intensity detection module and the data processing module can be connected through the voice transmission module to realize bidirectional interaction between the environmental noise intensity detection module and the data processing module. The data processing module transmits the target voice data to the environmental noise intensity detection module through the data transmission module. After extracting the environmental noise features from the target voice data and deleting the environmental noise features, the environmental noise intensity detection module returns the target voice data with the environmental noise features removed to the data processing module through the data transmission module. For example, in the environmental noise intensity detection module, the process of performing environmental noise intensity detection processing on the target voice data can be: extracting noise information from the target voice data to obtain environmental noise features. For example, by segmenting the target speech data into frames, non-speech segments are obtained. These non-speech segments are identified as pure noise segments, and the noise information extracted from these segments is the environmental noise feature, such as obtaining the noise spectrum through Fourier transform. After extracting the environmental noise feature, it can be removed from the target speech data by using spectral subtraction, Wiener filtering, or other methods to delete it. For instance, in the environmental noise intensity detection module, the process of detecting environmental noise intensity in the target speech data can also be as follows: A noise database is established, for example, collecting noise features, including blank noise features, and storing these features as vectors. The target speech data is then segmented into frames, and data features are extracted frame by frame. The data features of each frame are compared with the noise features stored in the noise database to determine if the vectors are similar. If they are similar, the data features of that frame are determined to be noise features, and these features can be directly deleted, thus removing the extracted environmental noise features from the target speech data. This embodiment removes environmental noise features from the target speech data, thereby avoiding the influence of environmental noise features on the sound source localization of the target speech data and improving the accuracy of sound source localization.
[0049] In some embodiments of this application, please refer to Figure 5 , Figure 5 This is a flowchart illustrating a method for performing voice matching on target voice data in the voice matching method provided in this application embodiment. Details are as follows:
[0050] S51: The target speech data is segmented to obtain several speech segments;
[0051] S52: Perform data comparison processing on the plurality of speech segments to obtain data comparison results, wherein the data comparison processing includes speech feature comparison, speech parameter comparison, speech duration comparison, and speech storage size comparison.
[0052] S53: Based on the data comparison results, perform segment statistical processing on the several speech segments to obtain segment statistical results;
[0053] S54: Based on the statistical results of the paragraphs, perform speech integration processing on the several speech segments to obtain integrated speech data. The speech integration processing includes speech integration processing with the same feature, speech integration with the same parameter, speech integration with the same duration, and speech integration processing with the same range and storage size.
[0054] S55: Perform voice matching processing on the integrated voice data and the voice data in the first voice dataset to obtain the voice matching result corresponding to the target voice data.
[0055] In this embodiment, the voice matching system includes a voice comparison module, a voice integration module, and a voice matching module to perform voice matching processing on target voice data. In this embodiment, the process of voice matching on the obtained target voice data can be as follows: First, the target voice data is segmented and numbered to obtain several voice segments with numbering labels. Then, these numbered voice segments are compared pairwise to obtain data comparison results. This comparison includes, but is not limited to, at least one of the following dimensions: voice feature comparison, voice parameter comparison, voice duration comparison, and voice storage size comparison. In this way, data comparison results across multiple dimensions can be obtained. Taking speech feature comparison processing as an example, assuming the target speech data is segmented into 5 speech segments numbered 1-5, feature extraction can be performed on each of these 5 segments to obtain their respective speech features. By comparing the speech features corresponding to speech segment number 1 with those corresponding to speech segments numbered 2, 3, 4, and 5 one by one, we can determine whether speech segment number 1 has the same speech features as speech segment number 2, 3, 4, and 5, obtaining 4 comparison results. Then, by comparing the speech features corresponding to speech segment number 2 with those corresponding to speech segments numbered 3, 4, and 5, we can determine whether speech segment number 2 has the same speech features as speech segment number 2. To determine if a speech segment has the same speech features as segment 3, segment 2, segment 4, and segment 5, we can obtain three comparison results. Then, by comparing the speech features corresponding to segment 3 with those corresponding to segments 4 and 5 one by one, we can obtain two more comparison results. Finally, by comparing the speech features corresponding to segment 4 with those corresponding to segment 5, we can obtain one more comparison result. In total, we can obtain ten comparison results based on feature comparison dimensions. Other data comparison processes are similar and will not be elaborated here. After comparing all the data comparison results, the paragraph statistics of several speech segments can be performed based on the data comparison results to obtain the paragraph statistics results.Specifically, the segment statistical processing can be as follows: For each speech segment, the number of speech segments with identical data across different comparison dimensions is counted, and the numbering of these segments is recorded to obtain the segment statistical results. Specifically, based on the segment statistical results, it can be determined which numbered speech segments share the same speech features, which share the same speech parameters, which share the same speech duration, and which share the same speech space. Furthermore, based on the segment statistical results, integrated speech data can be obtained by performing speech integration processing on several speech segments. This speech integration processing includes integration processing for speech segments with the same features, speech segments with the same parameters, speech segments with the same duration, and speech segments with the same space size. For example, assuming that three speech segments numbered 1, 3, and 5 have the same speech features, integrated speech data can be obtained by performing speech integration processing on these three segments. Understandably, speech integration processing can involve sequentially splicing speech segments according to their numbered order. After obtaining the integrated speech data, it can be matched with speech data in a first speech dataset to determine if they match. Based on the speech type corresponding to the matching speech data in the first speech dataset, the speech type of the target speech data is determined, thus obtaining the speech matching result for the target speech data. Similarly, when multiple integrated speech data are obtained, each integrated speech data can be matched with speech data in the first speech dataset to obtain multiple corresponding speech types. From these multiple speech types, the final speech type is determined through probability calculation as the speech matching result for the target speech data.
[0056] In some embodiments of this application, the voice matching system further includes a voice processing module. Before performing voice matching on the target voice data, this module can preprocess the target voice data, optimizing it, improving the overall quality of the voice signal, significantly increasing the efficiency and effectiveness of subsequent voice matching, avoiding matching errors, and enhancing the overall application effect of voice matching. Specifically, the preprocessing of the target voice data may include fuzzy segment removal, voice filtering, and noisy voice processing. In this embodiment, the noisy voice processing of the target voice data also includes voice analysis, voice form determination, noisy sound recognition, and noisy sound elimination, as well as noisy sound learning. This allows the system to learn the noisy voice processing process using deep learning algorithms, significantly improving the efficiency and effectiveness of subsequent noisy voice processing, resulting in good application performance and greatly increasing the error tolerance of the processing.
[0057] It is understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0058] In some embodiments of this application, please refer to Figure 6 , Figure 6 This is a basic structural block diagram of a voice matching device provided in an embodiment of this application. In this embodiment, the device includes units used to perform the steps in the above-described method embodiments. Please refer to the relevant descriptions in the above-described method embodiments for details. For ease of explanation, only the parts relevant to this embodiment are shown. Figure 6 As shown, the voice matching device includes: an acquisition module 61, a calculation module 62, a determination module 63, and a matching module 64. The acquisition module 61 acquires target voice data and the coordinates of the sound source location of the target voice data. The calculation module 62 calculates the target distance between the sound source location and the voice receiving location based on the sound source coordinates. The determination module 63 determines a voice matching range in a preset voice database based on the target distance. The voice data included in the voice matching range forms a first voice dataset, and the voice data included in the voice database forms a second voice dataset. The first voice dataset is a subset of the second voice dataset. The matching module 64 performs voice matching processing on the target voice data and the voice data in the first voice dataset to obtain a voice matching result corresponding to the target voice data.
[0059] It should be understood that the above-mentioned voice matching device corresponds one-to-one with the above-mentioned voice matching method, and will not be described again here.
[0060] In some embodiments of this application, please refer to Figure 7 , Figure 7 This is a basic structural block diagram of an electronic device provided in an embodiment of this application. Figure 7 As shown, the electronic device 7 of this embodiment includes: a processor 71, a memory 72, and a computer program 73 stored in the memory 72 and executable on the processor 71, such as a program for a voice matching method. When the processor 71 executes the computer program 73, it implements the steps in the various embodiments of the above-described voice matching methods. Alternatively, when the processor 71 executes the computer program 73, it implements the functions of each module in the embodiments corresponding to the above-described voice matching device. Please refer to the relevant descriptions in the embodiments for details, which will not be repeated here.
[0061] For example, the computer program 73 can be divided into one or more modules (units), which are stored in the memory 72 and executed by the processor 71 to complete this application. The one or more modules can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 73 in the electronic device 7. For example, the computer program 73 can be divided into an acquisition module, a calculation module, a determination module, and a matching module, with the specific functions of each module as described above.
[0062] The electronic device may include, but is not limited to, a processor 71 and a memory 72. Those skilled in the art will understand that... Figure 7 This is merely an example of electronic device 7 and does not constitute a limitation on electronic device 7. It may include more or fewer components than shown, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.
[0063] The processor 71 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0064] The memory 72 can be an internal storage unit of the electronic device 7, such as a hard disk or memory. The memory 72 can also be an external storage device of the electronic device 7, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 72 can include both internal and external storage units of the electronic device 7. The memory 72 is used to store the computer program and other programs and data required by the electronic device. The memory 72 can also be used to temporarily store data that has been output or will be output.
[0065] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0066] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above. In this embodiment, the computer-readable storage medium can be either non-volatile or volatile.
[0067] This application provides a computer program product that, when run on a mobile terminal, enables the mobile terminal to implement the steps described in the above-described method embodiments.
[0068] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0069] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0070] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0071] The above-described 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 of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A voice matching method, characterized in that, include: Obtain the target speech data and the coordinates of the sound source location of the target speech data; Calculate the target distance between the sound source location and the voice receiving location based on the sound source location coordinates; Based on the target distance, a voice matching range is determined in a preset voice database, wherein the voice data included in the voice matching range forms a first voice dataset, the voice data included in the voice database forms a second voice dataset, and the first voice dataset is a subset of the second voice dataset. The target speech data is matched with the speech data in the first speech dataset to obtain the speech matching result corresponding to the target speech data. The step of obtaining the sound source location coordinates of the target speech data includes: The target speech data is subjected to feature extraction processing to obtain speech features corresponding to the target speech data, the speech features including frequency features and time features of the target speech data; A coordinate system is established based on the spoken features to obtain an initial coordinate system; Based on the initial coordinate system, the target speech data is localized to obtain the sound source location coordinates of the target speech data; After obtaining the sound source location coordinates of the target speech data, the method further includes: The target speech data is segmented to obtain several speech segments; Feature extraction processing is performed on the plurality of speech segments to obtain a plurality of speech segment features, wherein the plurality of speech segments and the plurality of speech segment features correspond one-to-one; Based on the features of the aforementioned speech segments, the initial coordinate system is optimized to obtain an optimized coordinate system; The coordinates of the sound source location are adjusted according to the optimized coordinate system. The step of performing voice matching processing on the target voice data and the voice data in the first voice dataset to obtain the voice matching result corresponding to the target voice data includes: The target speech data is segmented to obtain several speech segments; The data comparison process is performed on the aforementioned speech segments to obtain the data comparison results. The data comparison process includes speech feature comparison, speech parameter comparison, speech duration comparison, and speech storage size comparison. Based on the data comparison results, segment statistical processing is performed on the several speech segments to obtain segment statistical results; Based on the statistical results of the aforementioned segments, speech integration processing is performed on the aforementioned speech segments to obtain integrated speech data. The speech integration processing includes speech integration processing with the same feature, speech integration with the same parameter, speech integration with the same duration, and speech integration processing with the same range and storage size. The integrated speech data is matched with the speech data in the first speech dataset to obtain the speech matching result corresponding to the target speech data.
2. The speech matching method according to claim 1, characterized in that, The steps to acquire target speech data include: Sound source sensing is performed on the target scene to obtain several speech signals, where each speech signal corresponds to a sensing point; The sound intensity of each of the several speech signals is detected to obtain the sound intensity value corresponding to each speech signal; Based on the sound intensity value corresponding to each speech signal, a target sensing point is determined, and the speech signal corresponding to the target sensing point is determined as the target speech data. The target sensing point is the sensing point corresponding to the speech signal with the largest sound intensity value among the plurality of speech signals.
3. The voice matching method according to claim 1, characterized in that, Before the step of performing localization processing on the target speech data according to the initial coordinate system to obtain the sound source location coordinates of the target speech data, the method further includes: The target speech data is subjected to environmental noise intensity detection processing to extract environmental noise features from the target speech data, and the environmental noise features are then deleted.
4. The voice matching method according to claim 1, characterized in that, Before the step of segmenting the target speech data to obtain several speech segments, the method further includes: The target speech data is preprocessed, wherein the preprocessing includes: blur segment removal processing, speech filtering processing, and noisy speech processing.
5. A voice matching device, characterized in that, include: The acquisition module is used to acquire target speech data and the coordinates of the sound source of the target speech data; The calculation module is used to calculate the target distance between the sound source location and the voice receiving location based on the sound source location coordinates; The determining module is used to determine a voice matching range in a preset voice database based on the target distance, wherein the voice data included in the voice matching range forms a first voice dataset, the voice data included in the voice database forms a second voice dataset, and the first voice dataset is a subset of the second voice dataset. The matching module is used to perform voice matching processing on the target voice data and the voice data in the first voice dataset to obtain the voice matching result corresponding to the target voice data; The step of obtaining the sound source location coordinates of the target speech data includes: The target speech data is subjected to feature extraction processing to obtain speech features corresponding to the target speech data, the speech features including frequency features and time features of the target speech data; A coordinate system is established based on the spoken features to obtain an initial coordinate system; Based on the initial coordinate system, the target speech data is localized to obtain the sound source location coordinates of the target speech data; After obtaining the sound source location coordinates of the target speech data, the method further includes: The target speech data is segmented to obtain several speech segments; Feature extraction processing is performed on the plurality of speech segments to obtain a plurality of speech segment features, wherein the plurality of speech segments and the plurality of speech segment features correspond one-to-one; Based on the features of the aforementioned speech segments, the initial coordinate system is optimized to obtain an optimized coordinate system; The coordinates of the sound source location are adjusted according to the optimized coordinate system. The step of performing voice matching processing on the target voice data and the voice data in the first voice dataset to obtain the voice matching result corresponding to the target voice data includes: The target speech data is segmented to obtain several speech segments; The data comparison process is performed on the aforementioned speech segments to obtain the data comparison results. The data comparison process includes speech feature comparison, speech parameter comparison, speech duration comparison, and speech storage size comparison. Based on the data comparison results, segment statistical processing is performed on the several speech segments to obtain segment statistical results; Based on the statistical results of the paragraphs, the several speech segments are subjected to speech integration processing to obtain integrated speech data. The speech integration processing includes speech integration processing with the same feature, speech integration with the same parameter, speech integration with the same duration, and speech integration processing with the same range and storage size. The integrated speech data is matched with the speech data in the first speech dataset to obtain the speech matching result corresponding to the target speech data.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 4.