Offline voiceprint real-time comparison method and device based on portable equipment and readable medium
Through the portable device, the voiceprint characteristics are extracted in segments and the comparison results are updated, which solves the problem of long waiting time for offline voiceprint comparison of portable devices, real-time real-time The acquisition of comparison results improves user experience and accuracy.
Patent Information
- Application Number
- CN202410949723.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-11-26
AI Technical Summary
The offline voiceprint comparison technology of portable devices has a long wait time, which leads to poor user experience and is unable to obtain real-time comparison results during voice collection.
Using the offline voiceprint real-time comparison method based on portable devices, by performing real-time effective sound detection and offline voiceprint comparison during the voice acquisition process, voiceprint features are extracted in segments, and similarity scores are performed within the preset time period, and step by step Update the comparison results and narrow the comparison range to reduce calculation effort and time-consuming.
It realizes instant feedback of comparison results during voice acquisition, reduces waiting time, improves the real-time and accuracy of comparison, and enhances the user experience.
Smart Images

Figure CN119028356A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of voiceprint recognition, and in particular to an offline voiceprint real-time comparison method, device and readable medium based on a portable device. Background Art
[0002] Voiceprint matching technology refers to extracting the voiceprint features in the target voice, scoring the similarity with the voiceprint features to be compared, and judging the identity characteristics of the target voice based on the score. Offline voiceprint matching of portable devices refers to the collection of voice, voiceprint feature extraction and similarity scoring are all performed on the device. Due to the limitations of the computing performance of the device and the amount of calculation for voiceprint feature extraction and similarity scoring, it takes a long time to get the results after collecting the voice.
[0003] The current voiceprint comparison process is a linear process of voice collection, voiceprint feature extraction, and voiceprint similarity calculation. For offline scene applications based on portable devices, the experience is poor, and it takes a long time to get the results after voice collection. Summary of the invention
[0004] The purpose of this application is to propose an offline voiceprint real-time comparison method, device and readable medium based on a portable device to address the above-mentioned technical problems.
[0005] In a first aspect, the present invention provides an offline voiceprint real-time comparison method based on a portable device, wherein the portable device has the functions of voice collection, voiceprint feature extraction and similarity scoring, and comprises the following steps:
[0006] Initialize the voiceprint feature set V, the maximum number of comparisons and the preset duration. The voiceprint feature set V is initially empty.
[0007] Collect the target person's voice, and perform real-time effective sound detection and offline voiceprint comparison on the target person's voice during the collection process;
[0008] In response to determining that the duration of the effective sound of the target person's voice reaches the preset duration for the first time, voiceprint features are extracted for the effective sound that reaches the preset duration for the first time, and the extracted voiceprint features are put into a voiceprint feature set V. The average value of all voiceprint features in the voiceprint feature set V is scored for similarity with each voiceprint feature in the registered voiceprint feature library, and the first comparison result is obtained and displayed on the portable device. The first N voiceprint features with the highest similarity to the average value of all voiceprint features in the voiceprint feature set V are selected from the registered voiceprint feature library as the first comparison set;
[0009] In response to determining that the duration of the effective sound of the target person's voice reaches a preset duration for the nth time, where n is a positive integer greater than or equal to 2, voiceprint features are extracted from the effective sound from the time when the preset duration is reached for the n-1th time to the time when the preset duration is reached for the nth time, the extracted voiceprint features are put into a voiceprint feature set V, the average value of all voiceprint features in the voiceprint feature set V is scored for similarity with the voiceprint features in the n-1th comparison set, the nth comparison result is obtained and displayed on the portable device, and the first m voiceprint features with the highest similarity to the average value of all voiceprint features in the voiceprint feature set V are selected in the n-1th comparison set as the nth comparison set;
[0010] Repeat the previous step until n is equal to the maximum number of comparisons or the voice collection process is completed, and display the last comparison result on the portable device as the final comparison result.
[0011] Preferably, m=N, that is, the n-1th alignment set and the nth alignment set are both the first alignment set.
[0012] Preferably, m is determined by N and n, and first decreases and then remains unchanged as n increases.
[0013] As a preference, N = 10000, when n = 2 or 3, When n≥4, m=100.
[0014] Preferably, the preset duration is the duration of the effective sound from which the voiceprint feature can be extracted, and the range of the preset duration is 5-30s.
[0015] Preferably, the effective sound is the speech retained after removing the silent segments and the noise segments in the speech.
[0016] In a second aspect, the present invention provides an offline voiceprint real-time comparison device based on a portable device, wherein the portable device has the functions of voice collection, voiceprint feature extraction and similarity scoring, including:
[0017] An initialization module is configured to initialize a voiceprint feature set V, a maximum number of comparisons, and a preset duration, wherein the voiceprint feature set V is initially empty;
[0018] The collection and comparison module is configured to collect the voice of the target person, and perform real-time effective sound detection and offline voiceprint comparison on the voice of the target person during the collection process;
[0019] The first comparison judgment module is configured to extract voiceprint features of the first valid sound reaching the preset time length in response to determining that the time length of the effective sound of the target person's voice reaches the preset time length for the first time, put the extracted voiceprint features into a voiceprint feature set V, perform similarity scoring on the average value of all voiceprint features in the voiceprint feature set V and each voiceprint feature in the registered voiceprint feature library, obtain the first comparison result and display it on the portable device, and select the top N voiceprint features with the highest similarity to the average value of all voiceprint features in the voiceprint feature set V in the registered voiceprint feature library as the first comparison set;
[0020] The nth comparison judgment module is configured to extract voiceprint features from the valid sound when the preset duration is reached for the nth time to the valid sound when the preset duration is reached for the nth time in response to determining that the duration of the valid sound of the target person's voice reaches the preset duration for the nth time, where n is a positive integer greater than or equal to 2, put the extracted voiceprint features into a voiceprint feature set V, perform similarity scoring on the average value of all voiceprint features in the voiceprint feature set V and the voiceprint features in the n-1th comparison set, obtain the nth comparison result and display it on the portable device, and select the first m voiceprint features with the highest similarity to the average value of all voiceprint features in the voiceprint feature set V in the n-1th comparison set as the nth comparison set;
[0021] The repetition module is configured to repeat the previous step until n is equal to the maximum number of comparisons or the voice collection process is completed, and the last comparison result is displayed on the portable device as the final comparison result.
[0022] In a third aspect, the present invention provides an electronic device comprising one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.
[0023] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.
[0024] In a fifth aspect, the present invention provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.
[0025] Compared with the prior art, the present invention has the following beneficial effects:
[0026] (1) The offline voiceprint real-time comparison method based on a portable device proposed in the present invention performs voiceprint comparison simultaneously during the process of voice collection, thereby reducing waiting time and even returning the comparison result during collection.
[0027] (2) The offline voiceprint real-time comparison method based on a portable device proposed in the present invention can split long speech into short speech, detect effective sound and judge its duration while collecting speech, and perform offline voiceprint comparison on effective sound of preset duration during the collection process. The comparison result can be fed back in time, and the comparison result can be continuously updated as the speech collection process proceeds, so that the comparison result is more accurate.
[0028] (3) The offline voiceprint real-time comparison method based on portable devices proposed in the present invention can determine the first comparison set according to the first scoring result, and use the n-1th comparison set as the comparison range of voiceprint features in the nth offline voiceprint comparison process, and select the first m voiceprint features with the highest similarity to the average value of all voiceprint features in the voiceprint feature set V as the nth comparison set. The nth comparison set can be the same as the n-1th comparison set, or it can be reduced gradually and finally remain the same. Therefore, the comparison range can be narrowed, the time and calculation amount of subsequent comparisons can be effectively reduced, and the real-time performance and accuracy can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 A flowchart of an offline voiceprint real-time comparison method based on a portable device according to an embodiment of the present application;
[0031] Figure 2 A schematic diagram of an offline voiceprint real-time comparison device based on a portable device according to an embodiment of the present application;
[0032] Figure 3 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] Embodiment 1
[0035] Figure 1An offline voiceprint real-time comparison method based on a portable device provided in an embodiment of the present application is shown. The portable device has the functions of voice collection, voiceprint feature extraction and similarity scoring, and includes the following steps:
[0036] S1, initialize the voiceprint feature set V, the maximum number of comparisons and the preset duration. The voiceprint feature set V is initially empty.
[0037] In a specific embodiment, the preset duration is the duration of effective sound from which the voiceprint feature can be extracted, and the range of the preset duration is 5-30s.
[0038] Specifically, after initialization, the voiceprint feature set V = {}, the maximum number of comparisons is M, and the preset time is t. The preset time only needs to meet the requirements of voiceprint feature extraction and does not need to be set very long. In one embodiment, t = 15s. In other embodiments, it can also be selected according to actual needs.
[0039] S2, collect the target person's voice, and perform real-time effective sound detection and offline voiceprint comparison on the target person's voice during the collection process.
[0040] In a specific embodiment, the effective sound is the speech that is retained after removing the silent segment and the noise segment in the speech.
[0041] Specifically, the effective sound is the human voice, and the silent segments and noise segments in the voice are removed, and the effective sound can be obtained after removal. In the process of voice collection, the embodiment of the present application can perform effective sound detection and voiceprint comparison in real time, so the comparison result can be obtained in the process of voice collection, while the traditional offline voiceprint comparison needs to collect a long voice, generally about 1 minute, and then perform voiceprint feature extraction and voiceprint comparison after the collection is completed, so it takes a long time to wait for the comparison result.
[0042] S3, in response to determining that the duration of the effective sound of the target person's voice reaches the preset duration for the first time, voiceprint features are extracted for the effective sound that reaches the preset duration for the first time, and the extracted voiceprint features are put into a voiceprint feature set V, and the average value of all voiceprint features in the voiceprint feature set V is scored for similarity with each voiceprint feature in the registered voiceprint feature library to obtain the first comparison result and display it on the portable device, and the top N voiceprint features with the highest similarity to the average value of all voiceprint features in the voiceprint feature set V are selected in the registered voiceprint feature library as the first comparison set.
[0043] Specifically, when the duration of the effective sound reaches the preset duration for the first time, the voiceprint feature of the effective sound is extracted to obtain the voiceprint feature v1 and put it into the voiceprint feature set. At this time, V = {v1}. The average value of all voiceprint features in the voiceprint feature set V is scored for similarity with each voiceprint feature in the registered voiceprint feature library. At this time, since there is only one element, the voiceprint feature v1, in the voiceprint feature set V, the average value of all voiceprint features in the voiceprint feature set V is also the voiceprint feature v1. Therefore, the voiceprint feature v1 is scored for similarity with each voiceprint feature in the registered voiceprint feature library. The comparison result is determined based on the scoring result and displayed on the portable device, and the display prompt is the first comparison result. In one embodiment, the similarity scoring method can select the plda or cosine scoring method. The comparison result can select the speaker identity corresponding to the voiceprint feature in the registered voiceprint feature library with the highest similarity to the average value of all voiceprint features in the voiceprint feature set V, or select the speaker identity corresponding to the voiceprint features in the top 10 registered voiceprint feature libraries with the highest similarity to the average value of all voiceprint features in the voiceprint feature set V, which can be set according to specific needs. Finally, the voiceprint features in the top N registered voiceprint feature libraries with the highest similarity to the average value of all voiceprint features in the voiceprint feature set V are put into the first comparison set to reduce the calculation amount of subsequent voiceprint comparisons. In this embodiment, N=1000. In other embodiments, N can select other appropriate values.
[0044] S4, in response to determining that the duration of the effective sound of the target person's voice reaches the preset duration for the nth time, where n is a positive integer greater than or equal to 2, voiceprint features are extracted for the effective sound from the n-1th time when the preset duration is reached to the nth time when the preset duration is reached, and the extracted voiceprint features are put into a voiceprint feature set V, and the average value of all voiceprint features in the voiceprint feature set V is scored for similarity with the voiceprint features in the n-1th comparison set to obtain the nth comparison result and display it on the portable device, and the top m voiceprint features with the highest similarity to the average value of all voiceprint features in the voiceprint feature set V are selected in the n-1th comparison set as the nth comparison set.
[0045] S5, repeat the previous step until n is equal to the maximum number of comparisons or the voice collection process is completed, and display the last comparison result as the final comparison result on the portable device.
[0046] In a specific embodiment, m=N, that is, the n-1th alignment set and the nth alignment set are both the first alignment set.
[0047] Specifically, the target person's voice collection work will not stop during the voiceprint comparison process, but will be carried out synchronously. That is to say, while obtaining the first comparison result, the target person's voice will continue to be collected. When the effective sound of the collected voice reaches the preset duration for the second time, the voiceprint feature of the effective sound is extracted to obtain the voiceprint feature v2, and the voiceprint feature v2 is placed in the voiceprint feature set V, where V = {v1, v2}; the average value of all voiceprint features in the voiceprint feature set V is calculated and the similarity score is performed with each voiceprint feature in the first comparison set to obtain the second comparison result and display it on the portable device, that is, the result display on the portable device is updated, and the first m voiceprint features with the highest similarity to the average value of all voiceprint features in the voiceprint feature set V are selected in the first comparison set as the second comparison set. Since m = N, the second comparison set is the same as the first comparison set.
[0048] When the valid sound of the collected speech reaches the preset duration for the third time, the voiceprint feature is extracted for the valid sound to obtain the voiceprint feature v3, and the voiceprint feature v3 is placed in the voiceprint feature set V, where V = {v1, v2, v3}; the average value of all voiceprint features in the voiceprint feature set V is calculated and the similarity score is performed with each voiceprint feature in the second comparison set to obtain the third comparison result and display it on the portable device, that is, the result display on the portable device is updated, and the first m voiceprint features with the highest similarity to the average value of all voiceprint features in the voiceprint feature set V are selected in the second comparison set as the third comparison set. Since m = N, the third comparison set is the same as the second comparison set and the first comparison set. By analogy, the comparison sets obtained in the second and above offline voiceprint comparison processes are the same as the first comparison set. After multiple offline voiceprint comparisons, when the number of comparisons n reaches the maximum number of comparisons M or the voice collection ends, the offline voiceprint comparison process is terminated, and the last comparison result is displayed on the portable device, and the identity of the target person is determined based on the last comparison result.
[0049] Embodiment 2
[0050] The difference between the second embodiment of the present application and the first embodiment is that m is determined by N and n, and first decreases and then remains unchanged as n increases.
[0051] In a specific embodiment, N=10000, when n=2 or 3, When n≥4, m=100.
[0052] In one embodiment, when N=10000, when n=2 or 3, When n≥4, m=100 is taken as an example and described in detail.
[0053] During the first offline voiceprint comparison process, the voiceprint features in the top N registered voiceprint feature libraries with the highest similarity to the average value of all voiceprint features in the voiceprint feature set V are put into the first comparison set. When N=10000, the voiceprint features in the top 10000 registered voiceprint feature libraries with the voiceprint features extracted for the first time are selected and put into the first comparison set.
[0054] When n=2, that is, in the second offline voiceprint comparison process, the first m voiceprint features with the highest similarity to the average value of all voiceprint features in the voiceprint feature set V are selected in the first comparison set as the second comparison set. Therefore, the first 1000 voiceprint features with the highest similarity to the voiceprint features extracted the second time are selected from the first comparison set and put into the second comparison set.
[0055] When n=3, that is, in the third offline voiceprint comparison process, the first m voiceprint features with the highest similarity to the average value of all voiceprint features in the voiceprint feature set V are selected from the second comparison set as the third comparison set. Therefore, the first 100 voiceprint features with the highest similarity to the voiceprint features extracted for the third time are selected from the second comparison set and put into the third comparison set.
[0056] When n≥4, that is, in the 4th and above offline voiceprint comparison processes, since m=100, the 4th comparison set is the same as the 3rd comparison set. Similarly, the comparison sets obtained in the 4th and above offline voiceprint comparison processes are the same as the 3rd comparison set, and the top 100 voiceprint features with the highest similarity to the average value of all voiceprint features in the voiceprint feature set V are retained. The rest is the same as in Example 1, and the identity of the target person is finally determined.
[0057] The above steps S1-S5 do not necessarily represent the order between the steps, but are represented by step symbols, and the order between the steps can be adjusted.
[0058] Further references Figure 2 As an implementation of the methods shown in the above figures, the present application provides an embodiment of an offline voiceprint real-time comparison device based on a portable device. Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0059] The embodiment of the present application provides an offline voiceprint real-time comparison device based on a portable device, and the portable device has the functions of voice collection, voiceprint feature extraction and similarity scoring, including:
[0060] Initialization module 1 is configured to initialize the voiceprint feature set, the maximum number of comparisons and the preset duration, and the voiceprint feature set V is initially empty;
[0061] The collection and comparison module 2 is configured to collect the voice of the target person, and perform real-time effective sound detection and offline voiceprint comparison on the voice of the target person during the collection process;
[0062] The first comparison judgment module 3 is configured to extract voiceprint features of the first valid sound reaching the preset time in response to determining that the duration of the target person's voice reaches the preset time for the first time, put the extracted voiceprint features into a voiceprint feature set V, perform similarity scoring on the average value of all voiceprint features in the voiceprint feature set V and each voiceprint feature in the registered voiceprint feature library, obtain the first comparison result and display it on the portable device, and select the top N voiceprint features with the highest similarity to the average value of all voiceprint features in the voiceprint feature set V in the registered voiceprint feature library as the first comparison set;
[0063] The nth comparison judgment module 4 is configured to extract voiceprint features from the valid sound when the n-1th time reaches the preset time to the nth time when the preset time is reached in response to determining that the duration of the effective sound of the target person's voice reaches the preset time for the nth time, where n is a positive integer and is greater than or equal to 2, and put the extracted voiceprint features into a voiceprint feature set V, and score the similarity between the average value of all voiceprint features in the voiceprint feature set V and the voiceprint features in the n-1th comparison set, to obtain the nth comparison result and display it on the portable device, and select the first m voiceprint features with the highest similarity to the average value of all voiceprint features in the voiceprint feature set V in the n-1th comparison set as the nth comparison set;
[0064] The repetition module 5 is configured to repeat the previous step until n is equal to the maximum number of comparisons or the voice collection process is completed, and the last comparison result is displayed on the portable device as the final comparison result.
[0065] Figure 3 Schematic diagram of the hardware structure of the electronic device provided by the embodiment of the present invention. Figure 3 As shown, the electronic device of this embodiment includes: a processor 301 and a memory 302; wherein the memory 302 is used to store computer-executable instructions; the processor 301 is used to execute the computer-executable instructions stored in the memory to implement the various steps performed by the electronic device in the above embodiment. For details, please refer to the relevant description in the above method embodiment.
[0066] Optionally, the memory 302 may be independent or integrated with the processor 301 .
[0067] When the memory 302 is independently provided, the electronic device further includes a bus 303 for connecting the memory 302 and the processor 301 .
[0068] An embodiment of the present invention further provides a computer storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the above method is implemented.
[0069] An embodiment of the present invention further provides a computer program product, including a computer program. When the computer program is executed by a processor, the above method is implemented.
[0070] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0071] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to implement the solution of this embodiment.
[0072] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each module may exist physically separately, or two or more modules may be integrated into one unit. The above-mentioned module-composed unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0073] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.
[0074] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
[0075] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0076] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0077] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0078] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device or a main control device.
[0079] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0080] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A real-time offline voiceprint comparison method based on a portable device, wherein the portable device has the functions of voice collection, voiceprint feature extraction and similarity scoring, characterized in that: The following steps are involved: Initialize the voiceprint feature set V, the maximum number of comparisons and the preset duration, wherein the voiceprint feature set V is initially empty; Collect the target person's voice, and perform real-time effective sound detection and offline voiceprint comparison on the target person's voice during the collection process; In response to determining that the duration of the effective sound of the target person's voice reaches the preset duration for the first time, voiceprint features are extracted for the effective sound that reaches the preset duration for the first time, and the extracted voiceprint features are put into the voiceprint feature set V, and the average value of all voiceprint features in the voiceprint feature set V is scored for similarity with each voiceprint feature in the registered voiceprint feature library to obtain the first comparison result and display it on the portable device, and the first N voiceprint features with the highest similarity to the average value of all voiceprint features in the voiceprint feature set V are selected from the registered voiceprint feature library as the first comparison set; In response to determining that the duration of the effective sound of the target person's voice reaches a preset duration for the nth time, where n is a positive integer greater than or equal to 2, voiceprint features are extracted from the effective sound from the time when the preset duration is reached for the nth time to the time when the preset duration is reached for the nth time, the extracted voiceprint features are put into the voiceprint feature set V, the average value of all voiceprint features in the voiceprint feature set V is scored for similarity with the voiceprint features in the n-1th comparison set, the nth comparison result is obtained and displayed on the portable device, and the first m voiceprint features with the highest similarity to the average value of all voiceprint features in the voiceprint feature set V are selected in the n-1th comparison set as the nth comparison set; Repeat the previous step until n is equal to the maximum number of comparisons or the voice collection process is completed, and display the last comparison result as the final comparison result on the portable device.
2. The offline voiceprint real-time comparison method based on portable device according to claim 1 is characterized in that: m=N, that is, the n-1th alignment set and the nth alignment set are both the first alignment set.
3. The offline voiceprint real-time comparison method based on portable device according to claim 1 is characterized in that: m is determined by N and n, and first decreases and then remains unchanged as n increases.
4. The offline voiceprint real-time comparison method based on portable device according to claim 3 is characterized in that: N = 10000, when n = 2 or 3, When n≥4, m=100.
5. The offline voiceprint real-time comparison method based on portable device according to claim 1 is characterized in that: The preset duration is the duration of the effective sound from which the voiceprint feature can be extracted, and the range of the preset duration is 5-30s.
6. The offline voiceprint real-time comparison method based on portable device according to claim 1 is characterized in that: The effective sound is the speech that is retained after removing the silent segments and the noise segments in the speech.
7. An offline voiceprint real-time comparison device based on a portable device, wherein the portable device has the functions of voice collection, voiceprint feature extraction and similarity scoring, characterized in that: include: An initialization module is configured to initialize a voiceprint feature set V, a maximum number of comparisons, and a preset duration, wherein the voiceprint feature set V is initially empty; The collection and comparison module is configured to collect the voice of the target person, and perform real-time effective sound detection and offline voiceprint comparison on the voice of the target person during the collection process; The first comparison judgment module is configured to extract voiceprint features of the first valid sound reaching the preset duration in response to determining that the duration of the effective sound of the target person's voice reaches the preset duration for the first time, put the extracted voiceprint features into the voiceprint feature set V, perform similarity scoring on the average value of all voiceprint features in the voiceprint feature set V and each voiceprint feature in the registered voiceprint feature library, obtain the first comparison result and display it on the portable device, and select the top N voiceprint features with the highest similarity to the average value of all voiceprint features in the voiceprint feature set V from the registered voiceprint feature library as the first comparison set; The nth comparison judgment module is configured to, in response to determining that the duration of the effective sound of the target person's voice reaches a preset duration for the nth time, where n is a positive integer greater than or equal to 2, extract voiceprint features from the effective sound from the time when the preset duration is reached for the nth time to the time when the preset duration is reached for the nth time, put the extracted voiceprint features into the voiceprint feature set V, perform similarity scoring on the average value of all voiceprint features in the voiceprint feature set V and the voiceprint features in the n-1th comparison set, obtain the nth comparison result and display it on the portable device, and select the first m voiceprint features with the highest similarity to the average value of all voiceprint features in the voiceprint feature set V in the n-1th comparison set as the nth comparison set; The repetition module is configured to repeat the previous step until n is equal to the maximum number of comparisons or the voice collection process is completed, and the last comparison result is displayed on the portable device as the final comparison result.
8. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
