WO2020186695A1 - 语音信息的批量处理方法、装置、计算机设备及存储介质 - Google Patents
语音信息的批量处理方法、装置、计算机设备及存储介质 Download PDFInfo
- Publication number
- WO2020186695A1 WO2020186695A1 PCT/CN2019/103345 CN2019103345W WO2020186695A1 WO 2020186695 A1 WO2020186695 A1 WO 2020186695A1 CN 2019103345 W CN2019103345 W CN 2019103345W WO 2020186695 A1 WO2020186695 A1 WO 2020186695A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- preset
- script
- voice information
- running
- voice
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L15/00—Speech recognition
- G10L15/02—Feature extraction for speech recognition; Selection of recognition unit
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L15/00—Speech recognition
- G10L15/06—Creation of reference templates; Training of speech recognition systems, e.g. adaptation to the characteristics of the speaker's voice
- G10L15/063—Training
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L15/00—Speech recognition
- G10L15/08—Speech classification or search
- G10L15/16—Speech classification or search using artificial neural networks
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L21/00—Speech or voice signal processing techniques to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
- G10L21/02—Speech enhancement, e.g. noise reduction or echo cancellation
- G10L21/0208—Noise filtering
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- This application relates to the field of data processing, and in particular to a method, device, computer equipment and storage medium for batch processing of voice information.
- the embodiments of the present application provide a batch processing method, device, computer equipment, and storage medium for voice information, which can efficiently and accurately realize the unified conversion of multiple voice information to be processed, and reduce errors in the conversion process.
- an embodiment of the present application provides a method for batch processing of voice information, the method including:
- the preset Bash script includes at least one preset sub-running script, and each sub-running script is used to implement batch processing of all voice information to be processed.
- the number of voice messages is less than or equal to the number of voice messages to be processed;
- an embodiment of the present application also provides a batch processing device for voice information, which includes:
- An obtaining unit configured to obtain a preset training set if an information processing instruction is received, the training set including a plurality of to-be-processed voice information;
- the batch processing unit is used to sequentially call and run the sub-running scripts in the preset Bash script according to the information processing instruction, so that when one of the sub-running scripts is executed, all the voice messages to be processed will be processed in batches.
- multiple target voice information is obtained, wherein the preset Bash script includes at least one preset sub-running script, and each sub-running script is used to implement the processing of all voice information to be processed
- the quantity of the target voice information is less than or equal to the quantity of the voice information to be processed;
- the noise removal unit is used to filter all target voice information through preset voice activation detection to obtain the intermediate voice information after noise removal;
- the framing unit performs framing processing on all intermediate voice information through preset framing rules to obtain test voice information for training the voice recognition model.
- an embodiment of the present application also provides a computer device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the above method when the computer program is executed.
- an embodiment of the present application also provides a computer-readable storage medium, where the storage medium stores a computer program, and the computer program can implement the foregoing method when executed by a processor.
- FIG. 1 is a schematic flowchart of a method for batch processing of voice information provided by an embodiment of the present application
- FIG. 2 is a schematic diagram of a sub-flow of a method for batch processing of voice information provided by an embodiment of the present application
- FIG. 3 is a schematic diagram of a sub-flow of a method for batch processing of voice information provided by an embodiment of the present application
- FIG. 4 is a schematic diagram of a sub-flow of a method for batch processing of voice information provided by an embodiment of the present application
- FIG. 5 is a schematic block diagram of an apparatus for batch processing of voice information according to an embodiment of the present application.
- FIG. 6 is a schematic block diagram of a batch processing unit of a voice information batch processing apparatus provided by an embodiment of the present application.
- FIG. 7 is another schematic block diagram of a batch processing unit of a voice information batch processing apparatus provided by an embodiment of the present application.
- FIG. 8 is another schematic block diagram of a batch processing unit of a voice information batch processing apparatus provided by an embodiment of the present application.
- FIG. 9 is a schematic diagram of the structural composition of a computer device provided by an embodiment of the present application.
- Fig. 1 is a schematic flowchart of a method for batch processing of voice information provided by an embodiment of the present application.
- the batch processing method of voice information is applied to the management server.
- the management server trains the neural network through the training set, it performs batch preprocessing on the to-be-processed voice information in the acquired training set, such as removing damaged and too short to-be-processed voice information from the training set; Convert the audio format and sampling rate of the voice information to be processed in the training set to a uniform audio format and sampling rate; rename all the voice information to be processed according to specific rules, etc., through the above-mentioned batch processing Efficiently and accurately realize the unified conversion of multiple to-be-processed voice information in the training set, and can effectively reduce errors in the process of processing and converting another to-be-processed voice information after each to-be-processed voice information is processed and converted , In order to accurately realize the training of the neural network.
- the steps of the method include steps
- Step S101 If an information processing instruction is received, a preset training set is obtained, and the training set includes a plurality of to-be-processed voice information.
- the training set can be preset, that is, voice information can be collected and stored from various applications capable of obtaining voice information. At this time, the voice information stored in the training set is the voice information to be processed.
- the management server receives the information processing instruction initiated by the user, it obtains a preset training set, that is, obtains multiple to-be-processed voice information in the training set to facilitate subsequent operations.
- Step S102 according to the information processing instruction, call and run the sub-running scripts in the preset Bash script in turn, so that when one of the sub-running scripts is executed, all the voice messages to be processed are processed in batches and all the voice messages are processed.
- the preset Bash script includes at least one preset sub-run script, and each sub-run script is used to realize batch processing of all voice information to be processed, The quantity of the target voice information is less than or equal to the quantity of the voice information to be processed.
- the preset Bash script can be integrated with multiple pre-set sub-run scripts.
- Each sub-run script can realize batch processing of all audio files to be processed in the same processing step.
- Running a sub-run script is able to perform the same conversion or change processing on all pending audio files, and the management server can call another sub-run script after all pending audio files have completed the corresponding processing. On the basis of the previous process, another conversion or change process is realized.
- the management server can sequentially call the sub-running scripts in the preset Bash script according to the information processing instruction, and each sub-running script is called once, so as to perform corresponding batch processing on all the voice information to be processed, and then Call another sub-run script in the Bash script again until all sub-run scripts have been run to obtain multiple target voice messages that have been completely converted or changed.
- Each batch conversion or change mentioned above requires all waiting The next batch conversion or change is performed after the processing of the voice information is completed, which can effectively reduce errors caused by the number of voice information to be processed and too many conversion steps in the current conversion process, thereby greatly improving the processing efficiency of the voice information to be processed.
- the management server can generally execute the Bash script through Python, that is, it can execute multiple preset sub-run scripts in the Bash script in turn through Python to sequentially implement batch processing operations on the voice information to be processed in the training set, reducing gradual iterative processing Errors in the process improve the efficiency and accuracy of conversion.
- the step S102 may include steps S201 to S202.
- the management server may call the first running script in the preset Bash script according to the received information processing instruction, so as to facilitate subsequent processing.
- the first running script can realize the conversion of audio format and sampling rate of all voice information to be processed in the preset training set.
- the first running script may be an FFmpeg script.
- the FFmpeg script is a set of open source computer programs that can be used to record, convert digital audio and video, and convert them into streams.
- the FFmpeg script can convert the audio format and sample rate of the voice information to be tested.
- S202 Run the first running script to perform audio format conversion and sample rate conversion on all voice information to be processed, so as to obtain multiple target voice information with preset audio formats and preset sampling rates.
- all the voice information to be tested can be converted into a unified audio format and a unified sampling rate.
- the management server runs the first running script, it can batch convert all the voice information to be processed into preset audio formats and preset samples according to the preset audio format and preset sampling rate set in the first running script Rate the target voice information.
- common audio formats can include WAV, MIDI, MP3, RA, MP4 and other format types.
- the preset audio format can be set to WAV format, that is, when all audio formats are non-preset audio formats, It can be converted to WAV format by running the first run script.
- sampling rate is also called sampling speed or sampling rate, which defines the number of samples extracted from a continuous signal per second to form a discrete signal, and it is expressed in Hertz (Hz).
- sampling period or sampling time, which is the time interval between samples.
- sampling frequency refers to how many signal samples the computer collects per second.
- Sampling rate indicates how many sampling points are collected per second, then 8k means 8000 times of 1s acquisition, and 16k means 1s acquisition of 16000 times, that is, if the preset sampling rate is 8k, and the sampling rate of the voice information to be converted is 16k, then pass
- the first running script converts the sampling rate of the voice information to be processed from 16k to 8k.
- the preset Bash script includes a first running script for audio format conversion and a second running script for effective audio filtering.
- the step S102 may include Steps S301 to S304.
- S301 Invoke a first running script in a preset Bash script according to the information processing instruction.
- the management server may call the first running script in the preset Bash script according to the received information processing instruction, so as to facilitate subsequent processing.
- the first running script can realize the conversion of audio format and sampling rate of all voice information to be processed in the preset training set.
- all the voice information to be tested can be converted into a unified audio format and a unified sampling rate.
- the management server runs the first running script, it can batch convert all the voice information to be processed into preset audio formats and preset samples according to the preset audio format and preset sampling rate set in the first running script Rate the target voice information.
- the management server needs to call the second running script for effective audio filtering in the preset Bash script.
- the preset specifications in the second running script set conditions for screening voice information, so that voice information that meets the preset specifications can be selected from a plurality of first voice messages as valid voice information.
- the second running script may be SOX.
- SOX can filter out effective voice information from a plurality of first voice information according to a set preset specification.
- S304 Run the second running script to filter all the first voice information, so as to obtain a plurality of target voice information meeting preset specifications, and the number of the target voice information is less than or equal to the number of the first voice information.
- the management server runs the second running script, it can filter all the first voice information according to the preset specifications to obtain the target voice information that meets the conditions, so after the screening, the number of the target voice information is less than or equal to The number of first voice messages.
- the preset specification may be a preset voice duration threshold. For example, if the duration of the first voice message is lower than the preset threshold, the first voice message is deleted.
- the preset specification can also be a preset threshold for the sampling point of the voice information, or a preset threshold for the scaling factor of the voice information, or a preset threshold for the maximum amplitude of the voice information. value.
- the preset Bash script includes a first running script for audio format conversion, a second running script for effective audio filtering, and a script for renaming.
- the third running script, the step S102 may include steps S401 to S406.
- S401 Call a first running script in a preset Bash script according to the information processing instruction.
- the management server may call the first running script in the preset Bash script according to the received information processing instruction, so as to facilitate subsequent processing.
- the first running script can realize the conversion of audio format and sampling rate of all voice information to be processed in the preset training set.
- S402 Run the first running script to perform audio format conversion and sample rate conversion on all voice information to be processed, so as to obtain a corresponding number of first voice information with the same audio format and sampling rate.
- all the voice information to be tested can be converted into a unified audio format and a unified sampling rate.
- the management server runs the first running script, it can batch convert all the voice information to be processed into preset audio formats and preset samples according to the preset audio format and preset sampling rate set in the first running script Rate the target voice information.
- the management server needs to call the second running script for effective audio filtering in the preset Bash script.
- the preset specifications in the second running script set conditions for screening voice information, so that voice information that meets the preset specifications can be selected from multiple first voice messages as valid voice information.
- the second running script may be SOX.
- SOX can filter out effective voice information from a plurality of first voice information according to a set preset specification.
- the management server runs the second running script, it can filter all the first voice information according to the preset specifications to obtain the target voice information that meets the conditions, so after the screening, the number of the target voice information is less than or equal to The number of first voice messages.
- the preset specification may be a preset voice duration threshold. For example, if the duration of the first voice message is lower than the preset threshold, the first voice message is deleted.
- the preset specification can also be a preset threshold for the sampling point of the voice information, or a preset threshold for the scaling factor of the voice information, or a preset threshold for the maximum amplitude of the voice information. value.
- the management server needs to call the third running script for renaming in the preset Bash script, so that the renamed voice message can be more accurately and quickly Read.
- a preset name format is preset in the third running script, so that multiple second voice messages can be renamed according to the preset name format.
- the third running script is a renaming function, and the renaming function may be a function rename() for renaming files.
- S406 Run the third running script to rename all the second voice information, so as to obtain a corresponding number of target voice information with a preset name format.
- all the voice information in the training set can be generated by the same subject, that is, each subject can correspond to multiple pieces of different voice information.
- it needs to be based on the preset name format and the second voice information.
- Rename the existing information The management server can obtain the corresponding renamed target voice information after running the third running script.
- the naming of the target voice information conforms to the preset name format.
- the number of target voice information is the same as that of the second voice. The amount of information is equal, and there is a one-to-one correspondence between the two.
- Step S103 Perform filtering processing on all target voice information through preset voice activation detection to obtain intermediate voice information after noise removal.
- the voice activation detection is Voice Activity Detection, or VAD for short, which can distinguish voices in voice signals. Signal and background noise, thereby improving the accuracy of training neural networks and reducing the time required for training.
- VAD Voice Activity Detection
- the voice activation detection can cut off the mute at the beginning and the end of the voice information and reduce the interference caused to the subsequent steps. That is, the voice activation detection can filter all target voice information in batch processing to obtain multiple corresponding intermediate voices after denoising information.
- Step S104 Perform framing processing on all intermediate voice information according to preset framing rules to obtain test voice information for training a voice recognition model.
- the management server also needs to perform framing processing on all intermediate voice information according to preset framing rules, so as to obtain a corresponding number of framed test voice information.
- the test speech information can be used to train a speech recognition model, so as to obtain a speech recognition model capable of corresponding speech recognition.
- the preset framing rule may refer to sound framing through a moving window function, that is, the voice information is cut into a small segment and a small segment, each segment is called a frame, and there is generally a frame between each frame. Overlapping.
- the step S104 may specifically include: performing framing processing on the intermediate voice information through the Enframe function to obtain test voice information for training a voice recognition model.
- the Enframe function is a specific framing function
- the management server can perform unified framing processing on all intermediate voice information after calling the framing function, so as to obtain the final test voice information for training.
- the embodiments of the present application can efficiently and accurately realize the unified conversion of multiple to-be-processed voice information in the training set, and reduce errors in the conversion process, so as to accurately implement neural network training.
- the program can be stored in a computer readable storage medium. When executed, it may include the processes of the above-mentioned method embodiments.
- the storage medium may be a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), etc.
- an embodiment of the present application also proposes a device for batch processing of voice information.
- the device 100 includes: an acquisition unit 101, a batch processing unit 102, a noise removal unit 103, and Framing unit 104.
- the obtaining unit 101 is configured to obtain a preset training set if an information processing instruction is received, and the training set includes a plurality of to-be-processed voice information.
- the batch processing unit 102 is configured to sequentially call and run the sub-running scripts in the preset Bash script according to the information processing instruction, so that when one of the sub-running scripts is executed, all the voice messages to be processed are batched accordingly Process and run until all the sub-run scripts are finished, so as to obtain multiple target voice messages.
- the preset Bash script includes at least one preset sub-run script, and each sub-run script is used to realize the processing of all the sub-run scripts.
- the quantity of the target voice information is less than or equal to the quantity of the voice information to be processed.
- the preset Bash script includes a first running script for converting audio format and sampling rate
- the batch processing unit 102 may include: a first calling unit 201 and The first operating unit 202.
- the first calling unit 201 is configured to call the first running script in the preset Bash script according to the information processing instruction.
- the first running unit 202 is configured to run the first running script to perform audio format conversion and sample rate conversion on all voice information to be processed, thereby obtaining multiple targets with preset audio formats and preset sampling rates voice message.
- the preset Bash script includes a first running script for audio format conversion and a second running script for effective audio filtering.
- the batch processing unit 102 It may include a first calling unit 301, a first running unit 302, a second calling unit 303, and a second running unit 304.
- the first calling unit 301 is configured to call the first running script in the preset Bash script according to the information processing instruction.
- the first running unit 302 is configured to run the first running script to perform audio format conversion and sample rate conversion on all the voice information to be processed, so as to obtain a corresponding number of audio formats with preset audio formats and preset sampling rates.
- the first voice message is configured to run the first running script to perform audio format conversion and sample rate conversion on all the voice information to be processed, so as to obtain a corresponding number of audio formats with preset audio formats and preset sampling rates.
- the second calling unit 303 is configured to call a second running script in the preset Bash script.
- the second running unit 304 is configured to run the second running script to filter all the first voice information, so as to obtain a plurality of target voice information meeting preset specifications, and the number of the target voice information is less than or Equal to the number of first voice messages.
- the preset Bash script includes a first running script for audio format conversion, a second running script for effective audio filtering, and a renaming script.
- the third running script, the batch processing unit 102 may include a first calling unit 401, a first running unit 402, a second calling unit 403, a second running unit 404, a third calling unit 405, and a third running unit 406.
- the first calling unit 401 is configured to call the first running script in the preset Bash script according to the information processing instruction.
- the first running unit 402 is configured to run the first running script to perform audio format conversion and sample rate conversion on all voice information to be processed, so as to obtain a corresponding number of first voices with the same audio format and sampling rate information.
- the second calling unit 403 is configured to call a second running script in the preset Bash script.
- the second running unit 404 is configured to run the second running script to filter all the first voice messages, so as to obtain a plurality of second voice messages that meet the preset specifications, and the number of the second voice messages Less than or equal to the number of first voice messages.
- the third calling unit 405 is configured to call the third running script in the preset Bash script.
- the third running unit 406 is configured to run the third running script to rename all the second voice information, so as to obtain a corresponding number of target voice information with a preset name format.
- the noise removal unit 103 is configured to perform filtering processing on all target voice information through preset voice activation detection to obtain intermediate voice information after noise removal.
- the framing unit 104 performs framing processing on all intermediate voice information according to a preset framing rule to obtain test voice information for training a voice recognition model.
- the framing unit 104 may be specifically configured to perform framing processing on the intermediate voice information through the Enframe function to obtain test voice information for training a voice recognition model.
- the above acquisition unit 101, batch processing unit 102, noise removal unit 103, and framing unit 104 can be embedded in hardware or independent of life insurance reporting devices, or can be in software Stored in the memory of the batch processing device for voice information, so that the processor can call and execute the operations corresponding to the above units.
- the processor can be a central processing unit (CPU), a microprocessor, a single-chip microcomputer, etc.
- the foregoing apparatus for batch processing of voice information can be implemented in the form of a computer program, and the computer program can be run on a computer device as shown in FIG. 9.
- FIG. 9 is a schematic diagram of the structural composition of a computer device of this application.
- the device can be a server, where the server can be an independent server or a server cluster composed of multiple servers.
- the computer device 500 includes a processor 502, a memory, an internal memory 504, and a network interface 505 connected through a system bus 501, where the memory may include a non-volatile storage medium 503 and the internal memory 504.
- the non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032.
- the processor 502 can execute a method for batch processing of voice information.
- the processor 502 is used to provide computing and control capabilities, and support the operation of the entire computer device 500.
- the internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503.
- the processor 502 can execute a method for batch processing of voice information.
- the network interface 505 is used for network communication with other devices.
- FIG. 9 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied.
- the specific computer device 500 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
- the processor 502 is configured to run a computer program 5032 stored in a memory, so as to implement the method for batch processing of voice information in any of the foregoing embodiments.
- the processor 502 may be a central processing unit (Central Processing Unit, CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
- the general-purpose processor may be a microprocessor or the processor may also be any conventional processor.
- the computer program may be stored in a storage medium, and the storage medium is a computer-readable storage medium.
- the computer program is executed by at least one processor in the computer system to implement the process steps of the foregoing method embodiment.
- the storage medium may be a computer-readable storage medium.
- the storage medium stores a computer program, and when the computer program is executed by the processor, the processor executes the voice information batch processing method in any of the above embodiments.
- the storage medium is a physical, non-transitory storage medium, such as a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a magnetic disk, or an optical disk that can store program codes. medium.
- a physical, non-transitory storage medium such as a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a magnetic disk, or an optical disk that can store program codes. medium.
- the disclosed device and method may be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of each unit is only a logical function division, and there may be other division methods in actual implementation.
- multiple units or components can be combined or integrated into another system, or some features can be omitted or not implemented.
- the steps in the method of the embodiment of the present application can be adjusted, merged, and deleted in order according to actual needs.
- the units in the device in the embodiment of the present application may be combined, divided, and deleted according to actual needs.
- the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
- the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium.
- the technical solution of this application is essentially or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium It includes several instructions to make a computer device (which may be a personal computer, a terminal, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Human Computer Interaction (AREA)
- Acoustics & Sound (AREA)
- Multimedia (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Computation (AREA)
- Quality & Reliability (AREA)
- Signal Processing (AREA)
- Telephonic Communication Services (AREA)
Abstract
本申请实施例公开了一种语音信息的批量处理方法、装置、计算机设备及存储介质,其中所述方法包括若接收到信息处理指令,获取预设的训练集,所述训练集包括多个待处理语音信息;根据所述信息处理指令依次调用并运行预设的Bash脚本中的子运行脚本,以对所有的待处理语音信息进行相应的批量处理,从而得到多个目标语音信息;通过预设的语音激活检测对所有目标语音信息进行滤波处理以得到除噪之后的中间语音信息;通过预设分帧规则对所有中间语音信息进行分帧处理以得到用于训练语音识别模型的测试语音信息。
Description
本申请要求于2019年03月15日提交中国专利局、申请号为201910197848.0、申请名称为“语音信息的批量处理方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及数据处理领域,尤其涉及一种语音信息的批量处理方法、装置、计算机设备及存储介质。
在语音识别项目中通常需要从各种渠道收集或采集大量语音信息,并利用这些语音信息作为训练集中的训练样本对神经网络进行训练,从而得到相应的用于进行特征的语音识别的识别模型。而为了确保神经网络的训练过程的顺利以及所获取的识别模型的精准性,通常需要对所获取的语音信息进行训练前的预先处理,而实现对大量的语音信息的预处理工作需要逐步迭代才能完成,但是重复迭代处理的过程因数据量大,非常容易出现操作失误,造成语音信息处理不准确的问题。
发明内容
本申请实施例提供一种语音信息的批量处理方法、装置、计算机设备及存储介质,能够高效准确地实现对多个待处理语音信息的统一转换,并减少转换过程的错误。
第一方面,本申请实施例提供了一种语音信息的批量处理方法,该方法包括:
若接收到信息处理指令,获取预设的训练集,所述训练集包括多个待处理语音信息;
根据所述信息处理指令依次调用并运行预设的Bash脚本中的子运行脚本,以运行其中一个子运行脚本时即对所有的待处理语音信息进行相应的批量处理 并直至运行完所有的子运行脚本,从而得到多个目标语音信息,其中,所述预设的Bash脚本至少包括一个预设的子运行脚本,每个子运行脚本均用于实现对所有待处理语音信息的批量处理,所述目标语音信息的数量小于或等于所述待处理语音信息的数量;
通过预设的语音激活检测对所有目标语音信息进行滤波处理以得到除噪之后的中间语音信息;
通过预设分帧规则对所有中间语音信息进行分帧处理以得到用于训练语音识别模型的测试语音信息。
第二方面,本申请实施例还提供了一种语音信息的批量处理装置,该装置包括:
获取单元,用于若接收到信息处理指令,获取预设的训练集,所述训练集包括多个待处理语音信息;
批量处理单元,用于根据所述信息处理指令依次调用并运行预设的Bash脚本中的子运行脚本,以运行其中一个子运行脚本时即对所有的待处理语音信息进行相应的批量处理并直至运行完所有的子运行脚本,从而得到多个目标语音信息,其中,所述预设的Bash脚本至少包括一个预设的子运行脚本,每个子运行脚本均用于实现对所有待处理语音信息的批量处理,所述目标语音信息的数量小于或等于所述待处理语音信息的数量;
除噪单元,用于通过预设的语音激活检测对所有目标语音信息进行滤波处理以得到除噪之后的中间语音信息;
分帧单元,通过预设分帧规则对所有中间语音信息进行分帧处理以得到用于训练语音识别模型的测试语音信息。
第三方面,本申请实施例还提供了一种计算机设备,其包括存储器及处理器,所述存储器上存储有计算机程序,所述处理器执行所述计算机程序时实现上述方法。
第四方面,本申请实施例还提供了一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序当被处理器执行时可实现上述方法。
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要 使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种语音信息的批量处理方法的流程示意图;
图2是本申请实施例提供的一种语音信息的批量处理方法的子流程示意图;
图3是本申请实施例提供的一种语音信息的批量处理方法的子流程示意图;
图4是本申请实施例提供的一种语音信息的批量处理方法的子流程示意图;
图5是本申请实施例提供的一种语音信息的批量处理装置的示意性框图;
图6是本申请实施例提供的一种语音信息的批量处理装置的批量处理单元的示意性框图;
图7是本申请实施例提供的一种语音信息的批量处理装置的批量处理单元的另一示意性框图;
图8是本申请实施例提供的一种语音信息的批量处理装置的批量处理单元的另一示意性框图;
图9是本申请实施例提供的一种计算机设备结构组成示意图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。
请参阅图1,图1是本申请实施例提供的一种语音信息的批量处理方法的示 意流程图。该语音信息的批量处理方法应用于管理服务器中。该管理服务器通过训练集对神经网络进行训练之前,对获取到的训练集中的待处理语音信息进行批量预处理,如将损坏的待处理语音信息、过短的待处理语音信息从训练集中剔除;将训练集中的待处理语音信息的音频格式、采样率均转换为统一的音频格式和采样率;按照特定的规则进行对所有的待处理语音信息进行重命名等,通过上述的分次批处理能够高效准确地实现对训练集中的多个待处理语音信息的统一转换,并能有效减少因每个待处理语音信息完成处理转换后再对另一待处理语音信息进行处理转换的过程中发生的错误,以便于精准地实现神经网络的训练。如图1所示,该方法的步骤包括步骤S101~S104。
步骤S101,若接收到信息处理指令,获取预设的训练集,所述训练集包括多个待处理语音信息。
在本实施例中,为了对神经网络进行训练从而得到相应的语音识别模型,需要对获取到的训练集中的语音信息进行批量的预处理,从而达到符合训练神经网络的要求,提高训练得到的语音识别模型的精准度。而训练集可以是预先设置的,即可以从各个能够进行语音信息获取的应用程序中收集语音信息进行存储,此时存储在训练集中的语音信息即为待处理的语音信息。当管理服务器接收到用户发起的信息处理指令,那么则获取预先设置的训练集,即获取训练集中的多个待处理的语音信息,以便于后续操作。
步骤S102,根据所述信息处理指令依次调用并运行预设的Bash脚本中的子运行脚本,以运行其中一个子运行脚本时即对所有的待处理语音信息进行相应的批量处理并直至运行完所有的子运行脚本,从而得到多个目标语音信息,其中,所述预设的Bash脚本至少包括一个预设的子运行脚本,每个子运行脚本均用于实现对所有待处理语音信息的批量处理,所述目标语音信息的数量小于或等于所述待处理语音信息的数量。
在本实施例中,预设的Bash脚本能够集成有多个预先设置的子运行脚本,每个子运行脚本均能够实现对所有待处理音频文件的实现同一个处理步骤的批量处理,具体是指每运行一个子运行脚本即能够对所有的待处理音频文件的进行同一项转换或改变的处理,并且要在所有的待处理音频文件完成相应的处理后,管理服务器才能调用另一个子运行脚本从而在上一项处理的基础上实现另一项转换或改变的处理。
具体的,管理服务器能够根据所述信息处理指令依次调用预设的Bash脚本中的子运行脚本,每调用一个子运行脚本即运行一次,从而对所有的待处理语音信息进行相应的批量处理,然后再次调用Bash脚本中的另一个子运行脚本,并直至运行完所有的子运行脚本,从而得到多个已完成全部转换或者改变的目标语音信息,上述的每次批量转换或改变都要所有的待处理语音信息完成之后才会进行下一次批量转换或改变,可以有效减少当前转换过程中因待处理语音信息的数量以及转换步骤过多造成的错误,从而能大大提高对待处理语音信息的处理效率。
其中,管理服务器一般可以通过Python执行Bash脚本,即可以通过Python依次执行Bash脚本中的多个预设的子运行脚本从而依次实现对训练集的待处理语音信息的批量处理操作,减少逐步迭代处理过程中出现的错误,提高转换的效率和准确度。
在一实施例中,如图2所述,所述步骤S102可以包括步骤S201~S202。
S201,根据所述信息处理指令调用预设的Bash脚本中的第一运行脚本。
其中,管理服务器可以根据接收到的信息处理指令调用预设的Bash脚本中的第一运行脚本,以便于进行后续处理。所述第一运行脚本能够实现对预设的训练集中的所有的待处理语音信息进行音频格式和采样率的转换。
作为可选的,所述第一运行脚本可以是FFmpeg脚本。所述FFmpeg脚本是一套可以用来记录、转换数字音频、视频,并能将其转化为流的开源计算机程序。在本申请中FFmpeg脚本能够对实现对待测语音信息的音频格式的转换和采样率的转换。
S202,运行所述第一运行脚本以对所有的待处理语音信息进行音频格式转换以及采样率转换,从而得到多个具有预设音频格式以及预设采样率的目标语音信息。
其中,为了使得训练集中的待测语音信息在训练神经网络的过程中快速地进行特征提取,可使得所有的待测语音信息转换为统一的音频格式以及统一的采样率。管理服务器运行了所述第一运行脚本后,可以根据第一运行脚本中设置的预设音频格式和预设采样率将所有的待处理语音信息批量地转换为具有预设音频格式和预设采样率的目标语音信息。
具体的,常见的音频格式可以包括WAV、MIDI、MP3、RA、MP4等格式 类型,为了统一音频格式,预设音频格式可以设置为WAV格式,即当所有音频格式为非预设音频格式时,可以通过运行第一运行脚本将其转换为WAV格式。
而所述采样率也称为采样速度或者采样率,定义了每秒从连续信号中提取并组成离散信号的采样个数,它用赫兹(Hz)来表示。采样率的倒数是采样周期或者叫作采样时间,它是采样之间的时间间隔。通俗的讲采样频率是指计算机每秒钟采集多少个信号样本。采样率表示每秒采多少个采样点,那么8k就是1s采8000次,而16k表示1s采集16000次,即若预设采样率为8k,而待转换语音信息的采样率为16k,那么则通过第一运行脚本将该待处理语音信息的采样率从16k转换为8k。
在一实施例中,如图3所述,所述预设的Bash脚本包括用于进行音频格式转换的第一运行脚本以及用于进行有效音频筛选的第二运行脚本,所述步骤S102可以包括步骤S301~S304。
S301,根据所述信息处理指令调用预设的Bash脚本中的第一运行脚本。
其中,管理服务器可以根据接收到的信息处理指令调用预设的Bash脚本中的第一运行脚本,以便于进行后续处理。所述第一运行脚本能够实现对预设的训练集中的所有的待处理语音信息进行音频格式和采样率的转换。
S302,运行所述第一运行脚本以对所有的待处理语音信息进行音频格式转换以及采样率转换,从而得到相应数量的具有预设音频格式以及预设采样率的第一语音信息。
其中,为了使得训练集中的待测语音信息在训练神经网络的过程中快速地进行特征提取,可使得所有的待测语音信息转换为统一的音频格式以及统一的采样率。管理服务器运行了所述第一运行脚本后,可以根据第一运行脚本中设置的预设音频格式和预设采样率将所有的待处理语音信息批量地转换为具有预设音频格式和预设采样率的目标语音信息。
S303,调用预设的Bash脚本中的第二运行脚本。
其中,为了对当前的已经转换音频格式和采样率的第一语音信息进行筛选,需要管理服务器调用预设的Bash脚本中的用于进行有效音频筛选的第二运行脚本。该第二运行脚本中的预设规格为筛选语音信息设定了条件,从而能够从多个第一语音信息中筛选符合该预设规格的语音信息作为有效的语音信息。作为可选的,所述第二运行脚本可以是SOX,SOX作为语音处理工具,能够根据设 置的预设规格从多个第一语音信息中筛选出有效的语音信息。
S304,运行所述第二运行脚本以对所有的第一语音信息进行筛选,从而得到多个符合预设规格的目标语音信息,所述目标语音信息的数量小于或等于第一语音信息的数量。
其中,管理服务器运行所述第二运行脚本后,能够根据预设规格对所有的第一语音信息进行筛选,得到符合条件的目标语音信息,故筛选之后,所述目标语音信息的数量小于或等于第一语音信息的数量。再者,该预设规格可以是预先设置语音时长的阀值,例如若第一语音信息的时长低于预设阀值,则删除该第一语音信息。同理,该预设规格还可以是预先设置的语音信息的采样点的阀值,也可以是预先设置的语音信息的缩放系数的阀值,还可以是预先设置的语音信息的最大幅度的阀值。
在一实施例中,如图4所述,所述预设的Bash脚本包括用于进行音频格式转换的第一运行脚本、用于进行有效音频筛选的第二运行脚本以及用于进行重命名的第三运行脚本,所述步骤S102可以包括步骤S401~S406。
S401,根据所述信息处理指令调用预设的Bash脚本中的第一运行脚本。
其中,管理服务器可以根据接收到的信息处理指令调用预设的Bash脚本中的第一运行脚本,以便于进行后续处理。所述第一运行脚本能够实现对预设的训练集中的所有的待处理语音信息进行音频格式和采样率的转换。
S402,运行所述第一运行脚本以对所有的待处理语音信息进行音频格式转换以及采样率转换,从而得到相应数量的具有相同音频格式以及采样率的第一语音信息。
其中,为了使得训练集中的待测语音信息在训练神经网络的过程中快速地进行特征提取,可使得所有的待测语音信息转换为统一的音频格式以及统一的采样率。管理服务器运行了所述第一运行脚本后,可以根据第一运行脚本中设置的预设音频格式和预设采样率将所有的待处理语音信息批量地转换为具有预设音频格式和预设采样率的目标语音信息。
S403,调用预设的Bash脚本中的第二运行脚本。
其中,为了对当前的已经转换音频格式和采样率的第一语音信息进行筛选,需要管理服务器调用预设的Bash脚本中的用于进行有效音频筛选的第二运行脚本。该第二运行脚本中的预设规格为筛选语音信息设定了条件,从而能够从多 个第一语音信息中筛选符合该预设规格的语音信息作为有效的语音信息。作为可选的,所述第二运行脚本可以是SOX,SOX作为语音处理工具,能够根据设置的预设规格从多个第一语音信息中筛选出有效的语音信息。
S404,运行所述第二运行脚本以对所有的第一语音信息进行筛选,从而得到多个符合预设规格的第二语音信息,所述第二语音信息的数量小于或等于第一语音信息的数量。
其中,管理服务器运行所述第二运行脚本后,能够根据预设规格对所有的第一语音信息进行筛选,得到符合条件的目标语音信息,故筛选之后,所述目标语音信息的数量小于或等于第一语音信息的数量。再者,该预设规格可以是预先设置语音时长的阀值,例如若第一语音信息的时长低于预设阀值,则删除该第一语音信息。同理,该预设规格还可以是预先设置的语音信息的采样点的阀值,也可以是预先设置的语音信息的缩放系数的阀值,还可以是预先设置的语音信息的最大幅度的阀值。
S405,调用预设的Bash脚本中的第三运行脚本。
其中,为了对当前的第二语音信息重命名,需要管理服务器调用预设的Bash脚本中的用于进行重命名的第三运行脚本,以便于重命名后的语音信息能够更为准确快速地被读取。该第三运行脚本中预先设置有预设名称格式,从而能够根据预设名称格式对多个第二语音信息进行重命名。作为可选的,第三运行脚本为重命名函数,该重命名函数可是函数rename()用于重命名文件。
S406,运行所述第三运行脚本以对所有的第二语音信息进行重命名,从而得到相应数量的具有预设名称格式的目标语音信息。
其中,训练集中的所有的语音信息可以是同一个主体生成,即每一个主体可以对应多条不同的语音信息,为便于进行区分设置,需要根据预先设置的预设名称格式以及第二语音信息的现有信息对其进行重命名。管理服务器在运行所述第三运行脚本后即能够得到相应的被重命名的目标语音信息,同时目标语音信息的命名是符合预设名称格式的,再者,目标语音信息的数量跟第二语音信息的数量是相等的,且两者之间是一一对应的关系。
步骤S103,通过预设的语音激活检测对所有目标语音信息进行滤波处理以得到除噪之后的中间语音信息。
在本实施例中,在进行神经网络训练之前,还需要通过语音激活检测来对 目标语音信息进行滤波处理,其中所述语音激活检测是Voice Activity Detection,简称VAD,其能够区分语音信号中的语音信号和背景噪音,从而提高训练神经网络的准确度,减少训练所需的时间。其中,语音激活检测能够将语音信息的首尾端的静音切除,降低对后续步骤造成的干扰,即该语音激活检测能够将所有目标语音信息进行滤波批量处理,得到除噪之后的多个相应的中间语音信息。
步骤S104,通过预设分帧规则对所有中间语音信息进行分帧处理以得到用于训练语音识别模型的测试语音信息。
在本实施例中,管理服务器还需要根据预设分帧规则对所有中间语音信息进行分帧处理,从而得到相应数量的分帧后的测试语音信息。其中,测试语音信息能够用于训练语音识别模型,从而得到能够进行相应的语音识别的语音识别模型。具体的,所述预设的分帧规则可以是指通过移动窗函数进行声音分帧,也就是把语音信息切开成一小段一小段,每小段称为一帧,其中各帧之间一般是有交叠的。
在另一实施例中,所述步骤S104具体可以包括:通过Enframe函数对所述中间语音信息进行分帧处理以得到用于训练语音识别模型的测试语音信息。
其中,所述Enframe函数即为具体的分帧函数,管理服务器调用该分帧函数后能够将所有的中间语音信息进行统一的分帧处理,从而得到最终的用于进行训练的测试语音信息。
综上,本申请实施例能够高效准确地实现对训练集中的多个待处理语音信息的统一转换,并减少转换过程的错误,以便于精准地实现神经网络的训练。
本领域普通技术员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等。
请参阅图5,对应上述一种语音信息的批量处理方法,本申请实施例还提出一种语音信息的批量处理装置,该装置100包括:获取单元101、批量处理单元102、除噪单元103以及分帧单元104。
所述获取单元101,用于若接收到信息处理指令,获取预设的训练集,所述训练集包括多个待处理语音信息。
所述批量处理单元102,用于根据所述信息处理指令依次调用并运行预设的Bash脚本中的子运行脚本,以运行其中一个子运行脚本时即对所有的待处理语音信息进行相应的批量处理并直至运行完所有的子运行脚本,从而得到多个目标语音信息,其中,所述预设的Bash脚本至少包括一个预设的子运行脚本,每个子运行脚本均用于实现对所有待处理语音信息的批量处理,所述目标语音信息的数量小于或等于所述待处理语音信息的数量。
在一实施例中,如图6所述,所述预设的Bash脚本包括用于进行音频格式以及采样率转换的第一运行脚本,所述批量处理单元102可以包括:第一调用单元201以及第一运行单元202。
所述第一调用单元201,用于根据所述信息处理指令调用预设的Bash脚本中的第一运行脚本。
所述第一运行单元202,用于运行所述第一运行脚本以对所有的待处理语音信息进行音频格式转换以及采样率转换,从而得到多个具有预设音频格式以及预设采样率的目标语音信息。
在一实施例中,如图7所述,所述预设的Bash脚本包括用于进行音频格式转换的第一运行脚本以及用于进行有效音频筛选的第二运行脚本,所述批量处理单元102可以包括第一调用单元301、第一运行单元302、第二调用单元303以及第二运行单元304。
所述第一调用单元301,用于根据所述信息处理指令调用预设的Bash脚本中的第一运行脚本。
所述第一运行单元302,用于运行所述第一运行脚本以对所有的待处理语音信息进行音频格式转换以及采样率转换,从而得到相应数量的具有预设音频格式以及预设采样率的第一语音信息。
所述第二调用单元303,用于调用预设的Bash脚本中的第二运行脚本。
所述第二运行单元304,用于运行所述第二运行脚本以对所有的第一语音信息进行筛选,从而得到多个符合预设规格的目标语音信息,所述目标语音信息的数量小于或等于第一语音信息的数量。
在一实施例中,如图8所述,所述预设的Bash脚本包括用于进行音频格式转换的第一运行脚本、用于进行有效音频筛选的第二运行脚本以及用于进行重命名的第三运行脚本,所述批量处理单元102可以包括第一调用单元401、第一 运行单元402、第二调用单元403、第二运行单元404、第三调用单元405以及第三运行单元406。
所述第一调用单元401,用于根据所述信息处理指令调用预设的Bash脚本中的第一运行脚本。
所述第一运行单元402,用于运行所述第一运行脚本以对所有的待处理语音信息进行音频格式转换以及采样率转换,从而得到相应数量的具有相同音频格式以及采样率的第一语音信息。
所述第二调用单元403,用于调用预设的Bash脚本中的第二运行脚本。
所述第二运行单元404,用于运行所述第二运行脚本以对所有的第一语音信息进行筛选,从而得到多个符合预设规格的第二语音信息,所述第二语音信息的数量小于或等于第一语音信息的数量。
所述第三调用单元405,用于调用预设的Bash脚本中的第三运行脚本。
所述第三运行单元406,用于运行所述第三运行脚本以对所有的第二语音信息进行重命名,从而得到相应数量的具有预设名称格式的目标语音信息。
除噪单元103,用于通过预设的语音激活检测对所有目标语音信息进行滤波处理以得到除噪之后的中间语音信息。
分帧单元104,通过预设分帧规则对所有中间语音信息进行分帧处理以得到用于训练语音识别模型的测试语音信息。
在另一实施例中,所述分帧单元104具体可以用于通过Enframe函数对所述中间语音信息进行分帧处理以得到用于训练语音识别模型的测试语音信息。
需要说明的是,所属领域的技术人员可以清楚地了解到,上述语音信息的批量处理装置100和各单元的具体实现过程,可以参考前述方法实施例中的相应描述,为了描述的方便和简洁,在此不再赘述。
由以上可见,在硬件实现上,以上获取单元101、批量处理单元102、除噪单元103以及分帧单元104等可以以硬件形式内嵌于或独立于寿险报案的装置中,也可以以软件形式存储于语音信息的批量处理装置的存储器中,以便处理器调用执行以上各个单元对应的操作。该处理器可以为中央处理单元(CPU)、微处理器、单片机等。
上述语音信息的批量处理装置可以实现为一种计算机程序的形式,计算机程序可以在如图9所示的计算机设备上运行。
图9为本申请一种计算机设备的结构组成示意图。该设备可以是服务器,其中,服务器可以是独立的服务器,也可以是多个服务器组成的服务器集群。
参照图9,该计算机设备500包括通过系统总线501连接的处理器502、存储器、内存储器504和网络接口505,其中,存储器可以包括非易失性存储介质503和内存储器504。
该非易失性存储介质503可存储操作系统5031和计算机程序5032,该计算机程序5032被执行时,可使得处理器502执行一种语音信息的批量处理方法。
该处理器502用于提供计算和控制能力,支撑整个计算机设备500的运行。
该内存储器504为非易失性存储介质503中的计算机程序5032的运行提供环境,该计算机程序5032被处理器502执行时,可使得处理器502执行一种语音信息的批量处理方法。
该网络接口505用于与其它设备进行网络通信。本领域技术人员可以理解,图9中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备500的限定,具体的计算机设备500可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
其中,所述处理器502用于运行存储在存储器中的计算机程序5032,以实现上述任一实施例中的语音信息的批量处理方法。
应当理解,在本申请实施例中,处理器502可以是中央处理单元(Central Processing Unit,CPU),该处理器502还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
本领域普通技术人员可以理解的是实现上述实施例的方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成。该计算机程序可存储于一存储介质中,该存储介质为计算机可读存储介质。该计算机程序被该计算机系统中的至少一个处理器执行,以实现上述方法的实施例的流程步骤。
因此,本申请还提供一种存储介质。该存储介质可以为计算机可读存储介质。该存储介质存储有计算机程序,该计算机程序被处理器执行时使处理器执 行上述任一实施例中的语音信息的批量处理方法。
所述存储介质为实体的、非瞬时性的存储介质,例如可以是U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的实体存储介质。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的。例如,各个单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。
本申请实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。本申请实施例装置中的单元可以根据实际需要进行合并、划分和删减。另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。
该集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,终端,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。
Claims (20)
- 一种语音信息的批量处理方法,包括:若接收到信息处理指令,获取预设的训练集,所述训练集包括多个待处理语音信息;根据所述信息处理指令依次调用并运行预设的Bash脚本中的子运行脚本,以运行其中一个子运行脚本时即对所有的待处理语音信息进行相应的批量处理并直至运行完所有的子运行脚本,从而得到多个目标语音信息,其中,所述预设的Bash脚本至少包括一个预设的子运行脚本,每个子运行脚本均用于实现对所有待处理语音信息的批量处理,所述目标语音信息的数量小于或等于所述待处理语音信息的数量;通过预设的语音激活检测对所有目标语音信息进行滤波处理以得到除噪之后的中间语音信息;通过预设分帧规则对所有中间语音信息进行分帧处理以得到用于训练语音识别模型的测试语音信息。
- 如权利要求1所述的方法,其中,所述预设的Bash脚本包括用于进行音频格式以及采样率转换的第一运行脚本,所述根据所述信息处理指令依次调用并运行预设的Bash脚本中的子运行脚本,以运行其中一个子运行脚本时即对所有的待处理语音信息进行相应的批量处理并直至运行完所有的子运行脚本,从而得到多个目标语音信息的步骤,包括:根据所述信息处理指令调用预设的Bash脚本中的第一运行脚本;运行所述第一运行脚本以对所有的待处理语音信息进行音频格式转换以及采样率转换,从而得到多个具有预设音频格式以及预设采样率的目标语音信息。
- 如权利要求2所述的方法,其中,所述第一运行脚本为FFmpeg脚本,所述运行所述第一运行脚本以对所有的待处理语音信息进行音频格式转换以及采样率转换,从而得到多个具有预设音频格式以及预设采样率的目标语音信息的步骤,包括:运行所述FFmpeg脚本并确定所述FFmpeg脚本中设置的预设音频格式和预设采样率,以将所有的待处理语音信息批量地转换为具有预设音频格式和预设采样率的目标语音信息。
- 如权利要求1所述的方法,其中,所述预设的Bash脚本包括用于进行音 频格式转换的第一运行脚本以及用于进行有效音频筛选的第二运行脚本,所述根据所述信息处理指令依次调用并运行预设的Bash脚本中的子运行脚本,以运行其中一个子运行脚本时即对所有的待处理语音信息进行相应的批量处理并直至运行完所有的子运行脚本,从而得到多个目标语音信息的步骤,包括:根据所述信息处理指令调用预设的Bash脚本中的第一运行脚本;运行所述第一运行脚本以对所有的待处理语音信息进行音频格式转换以及采样率转换,从而得到相应数量的具有预设音频格式以及预设采样率的第一语音信息;调用预设的Bash脚本中的第二运行脚本;运行所述第二运行脚本以对所有的第一语音信息进行筛选,从而得到多个符合预设规格的目标语音信息,所述目标语音信息的数量小于或等于第一语音信息的数量。
- 如权利要求4所述的方法,其中,所述第二运行脚本为SOX语音处理工具,所述运行所述第二运行脚本以对所有的第一语音信息进行筛选,从而得到多个符合预设规格的目标语音信息的步骤,包括:运行所述SOX语音处理工具以对所有的第一语音信息进行筛选,从而得到多个符合预先设置的语音时长的阀值的目标语音信息。
- 如权利要求1所述的方法,其中,所述预设的Bash脚本包括用于进行音频格式转换的第一运行脚本、用于进行有效音频筛选的第二运行脚本以及用于进行重命名的第三运行脚本,所述根据所述信息处理指令依次调用并运行预设的Bash脚本中的子运行脚本,以运行其中一个子运行脚本时即对所有的待处理语音信息进行相应的批量处理并直至运行完所有的子运行脚本,从而得到多个目标语音信息的步骤,包括:根据所述信息处理指令调用预设的Bash脚本中的第一运行脚本;运行所述第一运行脚本以对所有的待处理语音信息进行音频格式转换以及采样率转换,从而得到相应数量的具有相同音频格式以及采样率的第一语音信息;调用预设的Bash脚本中的第二运行脚本;运行所述第二运行脚本以对所有的第一语音信息进行筛选,从而得到多个符合预设规格的第二语音信息,所述第二语音信息的数量小于或等于第一语音 信息的数量;调用预设的Bash脚本中的第三运行脚本;运行所述第三运行脚本以对所有的第二语音信息进行重命名,从而得到相应数量的具有预设名称格式的目标语音信息。
- 如权利要求6所述的方法,其中,第三运行脚本为重命名函数,所述重命名函数为函数rename()。
- 如权利要求1所述的方法,其中,所述通过预设分帧规则对所有中间语音信息进行分帧处理以得到用于训练语音识别模型的测试语音信息的步骤,包括:通过Enframe函数对所述中间语音信息进行分帧处理以得到用于训练语音识别模型的测试语音信息。
- 一种语音信息的批量处理装置,包括:获取单元,用于若接收到信息处理指令,获取预设的训练集,所述训练集包括多个待处理语音信息;批量处理单元,用于根据所述信息处理指令依次调用并运行预设的Bash脚本中的子运行脚本,以运行其中一个子运行脚本时即对所有的待处理语音信息进行相应的批量处理并直至运行完所有的子运行脚本,从而得到多个目标语音信息,其中,所述预设的Bash脚本至少包括一个预设的子运行脚本,每个子运行脚本均用于实现对所有待处理语音信息的批量处理,所述目标语音信息的数量小于或等于所述待处理语音信息的数量;除噪单元,用于通过预设的语音激活检测对所有目标语音信息进行滤波处理以得到除噪之后的中间语音信息;分帧单元,通过预设分帧规则对所有中间语音信息进行分帧处理以得到用于训练语音识别模型的测试语音信息。
- 如权利要求9所述的装置,其中,所述预设的Bash脚本包括用于进行音频格式以及采样率转换的第一运行脚本,所述批量处理单元,包括:第一调用单元,用于根据所述信息处理指令调用预设的Bash脚本中的第一运行脚本;第一运行单元,用于运行所述第一运行脚本以对所有的待处理语音信息进行音频格式转换以及采样率转换,从而得到多个具有预设音频格式以及预设采样率的目标语音信息。
- 一种计算机设备,所述计算机设备包括存储器及处理器,所述存储器上存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:若接收到信息处理指令,获取预设的训练集,所述训练集包括多个待处理语音信息;根据所述信息处理指令依次调用并运行预设的Bash脚本中的子运行脚本,以运行其中一个子运行脚本时即对所有的待处理语音信息进行相应的批量处理并直至运行完所有的子运行脚本,从而得到多个目标语音信息,其中,所述预设的Bash脚本至少包括一个预设的子运行脚本,每个子运行脚本均用于实现对所有待处理语音信息的批量处理,所述目标语音信息的数量小于或等于所述待处理语音信息的数量;通过预设的语音激活检测对所有目标语音信息进行滤波处理以得到除噪之后的中间语音信息;通过预设分帧规则对所有中间语音信息进行分帧处理以得到用于训练语音识别模型的测试语音信息。
- 根据权利要求11所述的计算机设备,其中,所述预设的Bash脚本包括用于进行音频格式以及采样率转换的第一运行脚本,所述根据所述信息处理指令依次调用并运行预设的Bash脚本中的子运行脚本,以运行其中一个子运行脚本时即对所有的待处理语音信息进行相应的批量处理并直至运行完所有的子运行脚本,从而得到多个目标语音信息的步骤,包括:根据所述信息处理指令调用预设的Bash脚本中的第一运行脚本;运行所述第一运行脚本以对所有的待处理语音信息进行音频格式转换以及采样率转换,从而得到多个具有预设音频格式以及预设采样率的目标语音信息。
- 根据权利要求12所述的计算机设备,其中,所述第一运行脚本为FFmpeg脚本,所述运行所述第一运行脚本以对所有的待处理语音信息进行音频格式转换以及采样率转换,从而得到多个具有预设音频格式以及预设采样率的目标语音信息的步骤,包括:运行所述FFmpeg脚本并确定所述FFmpeg脚本中设置的预设音频格式和预设采样率,以将所有的待处理语音信息批量地转换为具有预设音频格式和预设采样率的目标语音信息。
- 根据权利要求11所述的计算机设备,其中,所述预设的Bash脚本包括 用于进行音频格式转换的第一运行脚本以及用于进行有效音频筛选的第二运行脚本,所述根据所述信息处理指令依次调用并运行预设的Bash脚本中的子运行脚本,以运行其中一个子运行脚本时即对所有的待处理语音信息进行相应的批量处理并直至运行完所有的子运行脚本,从而得到多个目标语音信息的步骤,包括:根据所述信息处理指令调用预设的Bash脚本中的第一运行脚本;运行所述第一运行脚本以对所有的待处理语音信息进行音频格式转换以及采样率转换,从而得到相应数量的具有预设音频格式以及预设采样率的第一语音信息;调用预设的Bash脚本中的第二运行脚本;运行所述第二运行脚本以对所有的第一语音信息进行筛选,从而得到多个符合预设规格的目标语音信息,所述目标语音信息的数量小于或等于第一语音信息的数量。
- 根据权利要求14所述的计算机设备,其中,所述第二运行脚本为SOX语音处理工具,所述运行所述第二运行脚本以对所有的第一语音信息进行筛选,从而得到多个符合预设规格的目标语音信息的步骤,包括:运行所述SOX语音处理工具以对所有的第一语音信息进行筛选,从而得到多个符合预先设置的语音时长的阀值的目标语音信息。
- 根据权利要求11所述的计算机设备,其中,所述预设的Bash脚本包括用于进行音频格式转换的第一运行脚本、用于进行有效音频筛选的第二运行脚本以及用于进行重命名的第三运行脚本,所述根据所述信息处理指令依次调用并运行预设的Bash脚本中的子运行脚本,以运行其中一个子运行脚本时即对所有的待处理语音信息进行相应的批量处理并直至运行完所有的子运行脚本,从而得到多个目标语音信息的步骤,包括:根据所述信息处理指令调用预设的Bash脚本中的第一运行脚本;运行所述第一运行脚本以对所有的待处理语音信息进行音频格式转换以及采样率转换,从而得到相应数量的具有相同音频格式以及采样率的第一语音信息;调用预设的Bash脚本中的第二运行脚本;运行所述第二运行脚本以对所有的第一语音信息进行筛选,从而得到多个 符合预设规格的第二语音信息,所述第二语音信息的数量小于或等于第一语音信息的数量;调用预设的Bash脚本中的第三运行脚本;运行所述第三运行脚本以对所有的第二语音信息进行重命名,从而得到相应数量的具有预设名称格式的目标语音信息。
- 根据权利要求16所述的计算机设备,其中,第三运行脚本为重命名函数,所述重命名函数为函数rename()。
- 根据权利要求11所述的计算机设备,其中,所述通过预设分帧规则对所有中间语音信息进行分帧处理以得到用于训练语音识别模型的测试语音信息的步骤,包括:通过Enframe函数对所述中间语音信息进行分帧处理以得到用于训练语音识别模型的测试语音信息。
- 一种计算机可读存储介质,其中,所述存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器执行以下步骤:若接收到信息处理指令,获取预设的训练集,所述训练集包括多个待处理语音信息;根据所述信息处理指令依次调用并运行预设的Bash脚本中的子运行脚本,以运行其中一个子运行脚本时即对所有的待处理语音信息进行相应的批量处理并直至运行完所有的子运行脚本,从而得到多个目标语音信息,其中,所述预设的Bash脚本至少包括一个预设的子运行脚本,每个子运行脚本均用于实现对所有待处理语音信息的批量处理,所述目标语音信息的数量小于或等于所述待处理语音信息的数量;通过预设的语音激活检测对所有目标语音信息进行滤波处理以得到除噪之后的中间语音信息;通过预设分帧规则对所有中间语音信息进行分帧处理以得到用于训练语音识别模型的测试语音信息。
- 根据权利要求19所述的计算机可读存储介质,其中,所述预设的Bash脚本包括用于进行音频格式以及采样率转换的第一运行脚本,所述根据所述信息处理指令依次调用并运行预设的Bash脚本中的子运行脚本,以运行其中一个子运行脚本时即对所有的待处理语音信息进行相应的批量处理并直至运行完所 有的子运行脚本,从而得到多个目标语音信息的步骤,包括:根据所述信息处理指令调用预设的Bash脚本中的第一运行脚本;运行所述第一运行脚本以对所有的待处理语音信息进行音频格式转换以及采样率转换,从而得到多个具有预设音频格式以及预设采样率的目标语音信息。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910197848.0 | 2019-03-15 | ||
| CN201910197848.0A CN110060667B (zh) | 2019-03-15 | 2019-03-15 | 语音信息的批量处理方法、装置、计算机设备及存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020186695A1 true WO2020186695A1 (zh) | 2020-09-24 |
Family
ID=67317009
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/103345 Ceased WO2020186695A1 (zh) | 2019-03-15 | 2019-08-29 | 语音信息的批量处理方法、装置、计算机设备及存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN110060667B (zh) |
| WO (1) | WO2020186695A1 (zh) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110060667B (zh) * | 2019-03-15 | 2023-05-30 | 平安科技(深圳)有限公司 | 语音信息的批量处理方法、装置、计算机设备及存储介质 |
| CN112820309A (zh) * | 2020-12-31 | 2021-05-18 | 北京天润融通科技股份有限公司 | 基于rnn的降噪处理方法及系统 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5428707A (en) * | 1992-11-13 | 1995-06-27 | Dragon Systems, Inc. | Apparatus and methods for training speech recognition systems and their users and otherwise improving speech recognition performance |
| CN1588538A (zh) * | 2004-09-29 | 2005-03-02 | 上海交通大学 | 用于嵌入式自动语音识别系统的训练方法 |
| CN108922543A (zh) * | 2018-06-11 | 2018-11-30 | 平安科技(深圳)有限公司 | 模型库建立方法、语音识别方法、装置、设备及介质 |
| CN109326305A (zh) * | 2018-09-18 | 2019-02-12 | 易诚博睿(南京)科技有限公司 | 一种批量测试语音识别和文本合成的方法和测试系统 |
| CN110060667A (zh) * | 2019-03-15 | 2019-07-26 | 平安科技(深圳)有限公司 | 语音信息的批量处理方法、装置、计算机设备及存储介质 |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9286892B2 (en) * | 2014-04-01 | 2016-03-15 | Google Inc. | Language modeling in speech recognition |
| CN107908679B (zh) * | 2017-10-26 | 2020-11-27 | 平安科技(深圳)有限公司 | 脚本语句转换方法、装置及计算机可读存储介质 |
| CN108595656B (zh) * | 2018-04-28 | 2022-02-18 | 宁波银行股份有限公司 | 一种数据的处理方法及系统 |
| CN108877775B (zh) * | 2018-06-04 | 2023-03-31 | 平安科技(深圳)有限公司 | 语音数据处理方法、装置、计算机设备及存储介质 |
| CN109376166B (zh) * | 2018-08-20 | 2023-07-04 | 中国平安财产保险股份有限公司 | 脚本转换方法、装置、计算机设备及存储介质 |
-
2019
- 2019-03-15 CN CN201910197848.0A patent/CN110060667B/zh active Active
- 2019-08-29 WO PCT/CN2019/103345 patent/WO2020186695A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5428707A (en) * | 1992-11-13 | 1995-06-27 | Dragon Systems, Inc. | Apparatus and methods for training speech recognition systems and their users and otherwise improving speech recognition performance |
| CN1588538A (zh) * | 2004-09-29 | 2005-03-02 | 上海交通大学 | 用于嵌入式自动语音识别系统的训练方法 |
| CN108922543A (zh) * | 2018-06-11 | 2018-11-30 | 平安科技(深圳)有限公司 | 模型库建立方法、语音识别方法、装置、设备及介质 |
| CN109326305A (zh) * | 2018-09-18 | 2019-02-12 | 易诚博睿(南京)科技有限公司 | 一种批量测试语音识别和文本合成的方法和测试系统 |
| CN110060667A (zh) * | 2019-03-15 | 2019-07-26 | 平安科技(深圳)有限公司 | 语音信息的批量处理方法、装置、计算机设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110060667A (zh) | 2019-07-26 |
| CN110060667B (zh) | 2023-05-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10522164B2 (en) | Method and device for improving audio processing performance | |
| CN109831733B (zh) | 音频播放性能的测试方法、装置、设备和存储介质 | |
| WO2019227547A1 (zh) | 一种语音切分方法、装置、计算机设备及存储介质 | |
| WO2015188581A1 (zh) | 一种利用音频控制马达震动的方法及装置 | |
| WO2020140374A1 (zh) | 语音数据处理方法、装置、设备及存储介质 | |
| WO2019227580A1 (zh) | 语音识别方法、装置、计算机设备及存储介质 | |
| CN111916109B (zh) | 一种基于特征的音频分类方法、装置及计算设备 | |
| JP2022091933A (ja) | 音声応答速度確定方法、装置、コンピュータ読み取り可能な記憶媒体及びコンピュータプログラム | |
| WO2020228107A1 (zh) | 一种音频修复方法、设备及可读存储介质 | |
| JP2015537237A (ja) | リアルタイム交通検出 | |
| CN110290280A (zh) | 一种终端状态的识别方法、装置及存储介质 | |
| CN110047472B (zh) | 语音信息的批量转换方法、装置、计算机设备及存储介质 | |
| WO2020186695A1 (zh) | 语音信息的批量处理方法、装置、计算机设备及存储介质 | |
| WO2021143095A1 (zh) | 拨测方法、装置、计算机设备及存储介质 | |
| CN115083408A (zh) | 一种误唤醒数据的收集方法和装置 | |
| WO2023103253A1 (zh) | 一种音频检测方法、装置及终端设备 | |
| CN108428457B (zh) | 音频去重方法及装置 | |
| CN108463813B (zh) | 一种进行数据处理的方法和装置 | |
| CN111354365B (zh) | 一种纯语音数据采样率识别方法、装置、系统 | |
| CN114935698A (zh) | 背景噪声的识别方法、装置、电子设备和存储介质 | |
| CN111883183B (zh) | 语音信号筛选方法、装置、音频设备和系统 | |
| CN113270118A (zh) | 语音活动侦测方法及装置、存储介质和电子设备 | |
| WO2021082083A1 (zh) | 音频信号处理方法及装置 | |
| CN112687293A (zh) | 一种基于机器学习及数据挖掘的智能坐席训练方法和系统 | |
| CN112099655A (zh) | 语音鼠标移动办公的实现方法、装置、计算机设备及存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19919963 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19919963 Country of ref document: EP Kind code of ref document: A1 |