WO2022121176A1 - 语音合成方法、装置、电子设备及可读存储介质 - Google Patents

语音合成方法、装置、电子设备及可读存储介质 Download PDF

Info

Publication number
WO2022121176A1
WO2022121176A1 PCT/CN2021/083824 CN2021083824W WO2022121176A1 WO 2022121176 A1 WO2022121176 A1 WO 2022121176A1 CN 2021083824 W CN2021083824 W CN 2021083824W WO 2022121176 A1 WO2022121176 A1 WO 2022121176A1
Authority
WO
WIPO (PCT)
Prior art keywords
text
standard
vector
phoneme
conversion
Prior art date
Application number
PCT/CN2021/083824
Other languages
English (en)
French (fr)
Inventor
陈闽川
马骏
王少军
肖京
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2022121176A1 publication Critical patent/WO2022121176A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L13/00Speech synthesis; Text to speech systems
    • G10L13/02Methods for producing synthetic speech; Speech synthesisers
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L13/00Speech synthesis; Text to speech systems
    • G10L13/02Methods for producing synthetic speech; Speech synthesisers
    • G10L13/04Details of speech synthesis systems, e.g. synthesiser structure or memory management
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L13/00Speech synthesis; Text to speech systems
    • G10L13/08Text analysis or generation of parameters for speech synthesis out of text, e.g. grapheme to phoneme translation, prosody generation or stress or intonation determination

Definitions

  • the present application relates to the field of speech synthesis, and in particular, to a speech synthesis method, apparatus, electronic device, and readable storage medium.
  • speech synthesis as an important part of artificial intelligence, can convert any text information into standard and fluent speech in real time and read it out, which is equivalent to installing an artificial mouth on the machine. Therefore, speech synthesis technology is also becoming more and more popular. more people's attention.
  • the inventor realizes that the current speech synthesis method can only synthesize text into a certain style or language of speech, such as: only Chinese text can be synthesized into Mandarin with Beijing accent, but not Sichuan accent or Japanese accent; Style requirements, poor flexibility in speech synthesis.
  • a speech synthesis method comprising:
  • phoneme conversion is performed on the text to be synthesized to obtain a text phoneme sequence
  • the standard speech vector and the text matrix are carried out vector splicing to obtain the target matrix
  • a speech synthesis device comprising:
  • an audio processing module for obtaining sample audio, performing sound feature extraction, conversion and vectorization processing on the sample audio to obtain a standard speech vector
  • the text processing module is used for, when receiving the text to be synthesized, perform phoneme conversion on the text to be synthesized to obtain a text phoneme sequence; perform vector conversion on the text phoneme sequence to obtain a text matrix; combine the standard speech vector with the The text matrix is vector spliced to obtain the target matrix;
  • a speech synthesis module is used for extracting spectral features of the target matrix to obtain spectral feature information; using a preset vocoder to perform speech synthesis on the spectral feature information to obtain synthesized audio.
  • An electronic device comprising:
  • the processor executes the computer program stored in the memory to realize the following steps:
  • phoneme conversion is performed on the text to be synthesized to obtain a text phoneme sequence
  • the standard speech vector and the text matrix are carried out vector splicing to obtain the target matrix
  • a computer-readable storage medium having at least one computer program stored in the computer-readable storage medium, the at least one computer program being executed by a processor in an electronic device to implement the following steps:
  • phoneme conversion is performed on the text to be synthesized to obtain a text phoneme sequence
  • the standard speech vector and the text matrix are carried out vector splicing to obtain the target matrix
  • the present application improves the flexibility of speech synthesis.
  • FIG. 1 is a schematic flowchart of a speech synthesis method provided by an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of obtaining a target spectrogram in a speech synthesis method provided by an embodiment of the present application
  • FIG. 3 is a schematic flowchart of obtaining a standard speech vector in a speech synthesis method provided by an embodiment of the present application
  • FIG. 4 is a schematic block diagram of a speech synthesis apparatus provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of the internal structure of an electronic device for implementing a speech synthesis method provided by an embodiment of the present application
  • the embodiment of the present application provides a speech synthesis method.
  • the executive body of the speech synthesis method includes, but is not limited to, at least one of electronic devices that can be configured to execute the method provided by the embodiments of the present application, such as a server, a terminal, and the like.
  • the speech synthesis method can be executed by software or hardware installed in a terminal device or a server device, and the software can be a blockchain platform.
  • the server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
  • the speech synthesis method includes:
  • the sample audio is the voice data of the target speaker to be generated later. For example, if the subsequent text is synthesized into the voice of the speaker A, the sample audio is the number of the voice of the speaker A.
  • the present application performs feature extraction processing on the sample audio to obtain the standard speech vector.
  • the sample audio is subjected to sound feature extraction and conversion to obtain a spectrogram.
  • the sound feature extraction and conversion of the sample audio to obtain the target spectrogram includes:
  • the sample audio is resampled to obtain the digital voice signal. Audio is resampled.
  • x(t) is the digital voice signal
  • t is the time
  • y(t) is the standard digital voice signal
  • is the preset adjustment value of the pre-emphasis operation, preferably, the value of ⁇
  • the range is [0.9, 1.0].
  • the standard digital voice signal can only reflect the change of the audio in the time domain, but cannot reflect the audio feature of the standard voice signal.
  • the audio feature is more intuitive. and clear, feature conversion is performed on the standard digital voice signal.
  • performing feature conversion on the standard digital voice signal includes: using a preset sound processing algorithm to map the standard digital voice signal in the frequency domain to obtain the target spectrogram.
  • the sound processing algorithm described in the embodiment of the present application is a Mel filter algorithm.
  • the embodiment of the present application performs vectorization processing on the target spectrogram, including: using a pre-built image classification model to perform feature extraction on the target spectrogram. , to obtain the standard speech vector.
  • the pre-built image classification model is a residual network model trained by using a historical spectrogram, wherein the historical spectrogram is a plurality of the same type as the target spectrogram. Collection of spectrograms with different contents.
  • the feature extraction is performed on the target spectrogram by using a pre-built picture classification model to obtain the standard speech vector, including:
  • the image classification model includes a fully connected layer with a total of 1000 nodes, input the target spectrogram T into the image classification model, obtain the output values of 1000 nodes, and obtain the target spectrogram feature value of the target spectrogram T set, wherein the output of each node is an eigenvalue of the target spectrogram T, so the target spectrogram eigenvalue set of the target spectrogram T has a total of 1000 eigenvalues.
  • the fully connected layer has 3 nodes, which are the first node, the second node, and the third node in order.
  • the target spectrogram feature value set of the target spectrogram A has a total of 3 feature values of 3, 5, and 1. , wherein the eigenvalue 1 is the output of the first node, the eigenvalue 3 is the output of the second node, and the eigenvalue 5 is the output of the third node.
  • the eigenvalues are combined vertically in the order of nodes to obtain the standard speech vector of the target spectrogram A
  • the text to be synthesized is the text that needs to be synthesized into speech, and the phonemes of the pronunciation of the text with different speeches can be represented by the general phonetic symbol rules.
  • the text to be synthesized is subjected to phoneme conversion to obtain a text phoneme sequence.
  • performing phoneme conversion on the text to be synthesized to obtain the text phoneme sequence includes: deleting the punctuation marks in the text to be synthesized to obtain standard text; using a preset phonetic symbol The rule marks the phoneme corresponding to each character in the standard text, and obtains the text phoneme sequence, such as: the preset phonetic symbol rule is the international phonetic symbol rule, and the phoneme corresponding to the marked character "ah" is a, and the obtained The text phoneme sequence is [a].
  • each phoneme in the text phoneme sequence is converted into a column vector by using the onehot encoding algorithm to obtain the text matrix.
  • the embodiment of the present application uses a preset algorithm model to calculate the phoneme frame length of each phoneme in the text phoneme sequence to obtain a phoneme frame length sequence.
  • the preset algorithm described in the embodiment of the present application The model can be a DNN-HMM network model.
  • the phoneme frame length sequence is converted into a phoneme frame length vector, that is, the phoneme frame length sequence is converted into a corresponding row vector, the phoneme frame length vector is obtained, and the phoneme frame length vector and the phoneme frame length vector are converted.
  • the text matrix is spliced horizontally to obtain the standard text matrix, for example: the phoneme frame length vector is a 1*4 row vector, the text matrix is a 5*4 matrix, and the phoneme frame length vector is used as In the fifth row of the text matrix, the standard text matrix of 6*4 is obtained.
  • the standard speech vector and each column of the standard text matrix are vertically spliced to obtain the target matrix
  • the standard text matrix is
  • the standard speech vector is
  • the standard speech vector is spliced vertically with each column of the standard text matrix, and the target matrix is obtained as
  • the embodiment of the present application also needs to determine the spectral feature of the target matrix, where the spectral feature may be a Mel spectrum.
  • the trained acoustic model is used to perform spectral feature extraction on the target matrix to obtain the spectral feature extraction.
  • the acoustic model may be a transformer model.
  • the method before using the acoustic model completed by using the training to perform spectral feature extraction on the target matrix, the method further includes: acquiring a set of historical text matrices; performing spectral analysis on each historical text matrix of the historical text matrix set The characteristic information is marked to obtain a training set; the training set is used to train the acoustic model until the acoustic model converges, and the trained acoustic model is obtained.
  • the historical text matrix set is a set of multiple historical text matrices, and the historical text matrix is a target matrix corresponding to a text different from the text to be synthesized.
  • the spectrum feature information may be stored in a blockchain node.
  • the spectral feature information is input into a preset vocoder to obtain the synthesized audio.
  • the vocoder is a WORLD vocoder.
  • FIG. 4 it is a functional block diagram of the speech synthesis apparatus of the present application.
  • the speech synthesis apparatus 100 described in this application can be installed in an electronic device.
  • the speech synthesis device may include an audio processing module 101, a word processing module 102, and a speech synthesis module 103.
  • the modules described in the present invention may also be referred to as units, which refer to a device that can be processed by an electronic device processor.
  • each module/unit is as follows:
  • the audio processing module 101 is used for acquiring sample audio, and performing sound feature extraction, conversion and vectorization processing on the sample audio to obtain a standard speech vector.
  • the sample audio is the voice data of the target speaker to be generated later. For example, if the subsequent text is synthesized into the voice of the speaker A, the sample audio is the number of the voice of the speaker A.
  • the audio processing module 101 performs feature extraction processing on the sample audio to obtain the standard speech vector.
  • the audio processing module 101 performs sound feature extraction and conversion on the sample audio to obtain a target spectrogram.
  • the audio processing module 101 uses the following means to perform sound feature extraction and conversion on the sample audio to obtain a target spectrogram, including:
  • the sample audio is resampled to obtain the digital voice signal. Audio is resampled.
  • x(t) is the digital voice signal
  • t is the time
  • y(t) is the standard digital voice signal
  • is the preset adjustment value of the pre-emphasis operation, preferably, the value of ⁇
  • the range is [0.9, 1.0].
  • the standard digital voice signal can only reflect the change of the audio in the time domain, but cannot reflect the audio feature of the standard voice signal.
  • the audio feature is more intuitive. and clear, feature conversion is performed on the standard digital voice signal.
  • the audio processing module 101 performs feature conversion on the standard digital voice signal, including: using a preset voice processing algorithm to map the standard digital voice signal in the frequency domain to obtain the target spectrogram.
  • the sound processing algorithm described in the embodiment of the present application is a Mel filter algorithm.
  • the audio processing module 101 in this embodiment of the present application performs vectorization processing on the target spectrogram, including: using a pre-built image classification model to perform a vectorization process on the target Perform feature extraction on the spectrogram to obtain the standard speech vector.
  • the pre-built image classification model is a residual network model trained by using a historical spectrogram, wherein the historical spectrogram is a plurality of the same type as the target spectrogram. Collection of spectrograms with different contents.
  • the audio processing module 101 uses the following means to perform feature extraction on the target spectrogram to obtain the standard speech vector, including:
  • the image classification model includes a fully connected layer with a total of 1000 nodes, input the target spectrogram T into the image classification model, obtain the output values of 1000 nodes, and obtain the target spectrogram feature value of the target spectrogram T set, wherein the output of each node is an eigenvalue of the target spectrogram T, so the target spectrogram eigenvalue set of the target spectrogram T has a total of 1000 eigenvalues.
  • the eigenvalues in the target spectrogram eigenvalue set are vertically combined to obtain a standard speech vector
  • the fully connected layer has 3 nodes, which are the first node, the second node, and the third node in order.
  • the target spectrogram feature value set of the target spectrogram A has a total of 3 feature values of 3, 5, and 1. , wherein the eigenvalue 1 is the output of the first node, the eigenvalue 3 is the output of the second node, and the eigenvalue 5 is the output of the third node.
  • the eigenvalues are combined vertically in the order of nodes to obtain the standard speech vector of the target spectrogram A
  • the text processing module 102 is configured to perform phoneme conversion on the text to be synthesized to obtain a text phoneme sequence when receiving the text to be synthesized; perform vector transformation on the text phoneme sequence to obtain a text matrix; Vector splicing is performed on the text matrix to obtain a target matrix.
  • the text to be synthesized is the text that needs to be synthesized into speech, and the phonemes of the pronunciation of the text with different speeches can be represented by the general phonetic symbol rules.
  • the text to be synthesized is subjected to phoneme conversion to obtain a text phoneme sequence.
  • the text processing module 102 performs phoneme conversion on the text to be synthesized to obtain the text phoneme sequence, including: deleting the punctuation marks in the text to be synthesized to obtain standard text; using The preset phonetic symbol rules mark the phoneme corresponding to each character in the standard text to obtain the text phoneme sequence, such as: the preset phonetic symbol rules are the international phonetic symbols rules, and the phoneme corresponding to the marked character "ah" is a, The resulting text phoneme sequence is [a].
  • the text processing module 102 converts each phoneme in the text phoneme sequence into a column vector by using the onehot encoding algorithm to obtain the text matrix.
  • the text processing module 102 described in this embodiment of the present application uses a preset algorithm model to calculate the phoneme frame length of each phoneme in the text phoneme sequence to obtain a phoneme frame length sequence.
  • the preset algorithm model may be a DNN-HMM network model.
  • the text processing module 102 converts the phoneme frame length sequence into a phoneme frame length vector, that is, converts the phoneme frame length sequence into a corresponding row vector, obtains the phoneme frame length vector, and converts the phoneme frame length vector.
  • the phoneme frame length vector and the text matrix are horizontally spliced to obtain the standard text matrix, for example: the phoneme frame length vector is a 1*4 row vector, the text matrix is a 5*4 matrix, and the The phoneme frame length vector is used as the fifth row of the text matrix to obtain the 6*4 standard text matrix.
  • the text processing module 102 performs vertical splicing of the standard speech vector and each column of the standard text matrix to obtain the target matrix, for example: the standard text matrix is The standard speech vector is The standard speech vector is spliced vertically with each column of the standard text matrix, and the target matrix is obtained as
  • the speech synthesis module 103 is configured to perform spectral feature extraction on the target matrix to obtain spectral feature information; use a preset vocoder to perform speech synthesis on the spectral feature information to obtain synthesized audio.
  • the embodiment of the present application also needs to determine the spectral feature of the target matrix, where the spectral feature may be a Mel spectrum.
  • the trained acoustic model is used to perform spectral feature extraction on the target matrix to obtain the spectral feature extraction.
  • the acoustic model may be a transformer model.
  • the method further includes: acquiring a set of historical text matrices;
  • the historical text matrix is marked with spectral feature information to obtain a training set;
  • the acoustic model is trained by using the training set until the acoustic model converges, and the trained acoustic model is obtained.
  • the historical text matrix set is a set of multiple historical text matrices, and the historical text matrix is a target matrix corresponding to a text different from the text to be synthesized.
  • the spectrum feature information may be stored in a blockchain node.
  • the speech synthesis module 103 inputs the spectral feature information into a preset vocoder to obtain the synthesized audio.
  • the vocoder is a WORLD vocoder.
  • FIG. 5 it is a schematic structural diagram of an electronic device implementing the speech synthesis method of the present application.
  • the electronic device 1 may include a processor 10, a memory 11 and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a speech synthesis program 12.
  • the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, magnetic disk, CD etc.
  • the memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a mobile hard disk of the electronic device 1 .
  • the memory 11 may also be an external storage device of the electronic device 1, such as a pluggable mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital) equipped on the electronic device 1. , SD) card, flash memory card (Flash Card), etc.
  • the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device.
  • the memory 11 can not only be used to store application software installed in the electronic device 1 and various types of data, such as codes of speech synthesis programs, etc., but also can be used to temporarily store data that has been output or will be output.
  • the processor 10 may be composed of integrated circuits, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits packaged with the same function or different functions, including one or more integrated circuits.
  • Central Processing Unit CPU
  • microprocessor digital processing chip
  • graphics processor and combination of various control chips, etc.
  • the processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect the various components of the entire electronic device, by running or executing programs or modules (such as voice) stored in the memory 11. synthesizing programs, etc.), and calling data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
  • the bus may be a peripheral component interconnect standard (perIPheral component interconnect, referred to as PCI) bus or an extended industry standard architecture (extended industry standard architecture, referred to as EISA) bus or the like.
  • PCI peripheral component interconnect standard
  • EISA extended industry standard architecture
  • the bus can be divided into address bus, data bus, control bus and so on.
  • the bus is configured to implement connection communication between the memory 11 and at least one processor 10 and the like.
  • FIG. 5 only shows an electronic device with components. Those skilled in the art can understand that the structure shown in FIG. 5 does not constitute a limitation on the electronic device 1, and may include fewer or more components than those shown in the drawings. components, or a combination of certain components, or a different arrangement of components.
  • the electronic device 1 may also include a power supply (such as a battery) for powering the various components, preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that the power management
  • the device implements functions such as charge management, discharge management, and power consumption management.
  • the power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and any other components.
  • the electronic device 1 may further include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
  • the electronic device 1 may also include a network interface, optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
  • a network interface optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
  • the electronic device 1 may further include a user interface, and the user interface may be a display (Display), an input unit (eg, a keyboard (Keyboard)), optionally, the user interface may also be a standard wired interface or a wireless interface.
  • the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, and the like.
  • the display may also be appropriately called a display screen or a display unit, which is used for displaying information processed in the electronic device 1 and for displaying a visualized user interface.
  • the speech synthesis program 12 stored in the memory 11 in the electronic device 1 is a combination of multiple computer programs. When running in the processor 10, it can realize:
  • phoneme conversion is performed on the text to be synthesized to obtain a text phoneme sequence
  • the standard speech vector and the text matrix are carried out vector splicing to obtain the target matrix
  • the modules/units integrated in the electronic device 1 may be stored in a computer-readable storage medium.
  • the computer-readable medium may be non-volatile or volatile.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory) .
  • Embodiments of the present application may further provide a computer-readable storage medium, where the computer-readable storage medium may be volatile or non-volatile, and the readable storage medium stores a computer program, and the The computer program, when executed by the processor of the electronic device, can realize:
  • phoneme conversion is performed on the text to be synthesized to obtain a text phoneme sequence
  • the standard speech vector and the text matrix are carried out vector splicing to obtain the target matrix
  • the computer-usable storage medium may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required by at least one function, and the like; using the created data, etc.
  • 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, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional module in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of hardware plus software function modules.
  • the blockchain referred to in this application is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information to verify its Validity of information (anti-counterfeiting) and generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种语音合成方法、语音合成装置(100)、电子设备(1)以及可读存储介质,方法包括:获取样本音频,对样本音频进行声音特征提取转换及向量化处理,得到标准语音向量(S1);当接收待合成文本时,对待合成文本进行音素转换得到文本音素序列(S2);对文本音素序列进行向量转换,得到文本矩阵(S3);将标准语音向量与文本矩阵进行向量拼接,得到目标矩阵(S4);对目标矩阵进行频谱特征提取,得到频谱特征信息(S5);利用预设声码器对频谱特征信息进行语音合成,得到合成音频(S6)。还涉及一种区块链技术,频谱特征信息可以存储在区块链中。可以提高语音合成的灵活性。

Description

语音合成方法、装置、电子设备及可读存储介质
本申请要求于2020年12月11日提交中国专利局、申请号为CN202011442571.2,发明名称为“语音合成方法、装置、电子设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及语音合成领域,尤其涉及一种语音合成方法、装置、电子设备及可读存储介质。
背景技术
随着人工智能的发展,语音合成作为人工智能的重要组成部分,能将任意文字信息实时转化为标准流畅的语音朗读出来,相当于给机器装上了人工嘴巴,因此,语音合成技术也越来越受到人们的重视。
发明人意识到目前语音合成方法只能将文本合成某一种风格或语种的语音,如:只能将中文文本合成北京口音的普通话,不能合成四川口音或者日本口音;不能满足人们对语音合成多风格的需求,语音合成的灵活性差。
发明内容
一种语音合成方法,包括:
获取样本音频,对所述样本音频进行声音特征提取转换及向量化处理,得到标准语音向量;
当接收待合成文本时,对所述待合成文本进行音素转换得到文本音素序列;
对所述文本音素序列进行向量转换,得到文本矩阵;
将所述标准语音向量与所述文本矩阵进行向量拼接,得到目标矩阵;
对所述目标矩阵进行频谱特征提取,得到频谱特征信息;
利用预设声码器对所述频谱特征信息进行语音合成,得到合成音频。
一种语音合成装置,所述装置包括:
音频处理模块,用于获取样本音频,对所述样本音频进行声音特征提取转换及向量化处理,得到标准语音向量;
文本处理模块,用于当接收待合成文本时,对所述待合成文本进行音素转换得到文本音素序列;对所述文本音素序列进行向量转换,得到文本矩阵;将所述标准语音向量与所述文本矩阵进行向量拼接,得到目标矩阵;
语音合成模块,用于对所述目标矩阵进行频谱特征提取,得到频谱特征信息;利用预设声码器对所述频谱特征信息进行语音合成,得到合成音频。
一种电子设备,所述电子设备包括:
存储器,存储至少一个计算机程序;及
处理器,执行所述存储器中存储的计算机程序以实现如下步骤:
获取样本音频,对所述样本音频进行声音特征提取转换及向量化处理,得到标准语音向量;
当接收待合成文本时,对所述待合成文本进行音素转换得到文本音素序列;
对所述文本音素序列进行向量转换,得到文本矩阵;
将所述标准语音向量与所述文本矩阵进行向量拼接,得到目标矩阵;
对所述目标矩阵进行频谱特征提取,得到频谱特征信息;
利用预设声码器对所述频谱特征信息进行语音合成,得到合成音频。
一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一个计算机程序,所述至少一个计算机程序被电子设备中的处理器执行以实现如下步骤:
获取样本音频,对所述样本音频进行声音特征提取转换及向量化处理,得到标准语音向量;
当接收待合成文本时,对所述待合成文本进行音素转换得到文本音素序列;
对所述文本音素序列进行向量转换,得到文本矩阵;
将所述标准语音向量与所述文本矩阵进行向量拼接,得到目标矩阵;
对所述目标矩阵进行频谱特征提取,得到频谱特征信息;
利用预设声码器对所述频谱特征信息进行语音合成,得到合成音频。
本申请提高了语音合成的灵活性。
附图说明
图1为本申请一实施例提供的语音合成方法的流程示意图;
图2为本申请一实施例提供的语音合成方法中得到目标声谱图的流程示意图;
图3为本申请一实施例提供的语音合成方法中得到标准语音向量的流程示意图;
图4为本申请一实施例提供的语音合成装置的模块示意图;
图5为本申请一实施例提供的实现语音合成方法的电子设备的内部结构示意图;
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例提供一种语音合成方法。所述语音合成方法的执行主体包括但不限于服务端、终端等能够被配置为执行本申请实施例提供的该方法的电子设备中的至少一种。换言之,所述语音合成方法可以由安装在终端设备或服务端设备的软件或硬件来执行,所述软件可以是区块链平台。所述服务端包括但不限于:单台服务器、服务器集群、云端服务器或云端服务器集群等。
参照图1所示的本申请一实施例提供的语音合成方法的流程示意图,在本申请实施例中,所述语音合成方法包括:
S1、获取样本音频,对所述样本音频进行声音特征提取转换及向量化处理,得到标准语音向量;
本申请实施例中,所述样本音频为后续需要成的目标说话人的语音数据,如:将后续文本合成说话人A的语音,那么所述样本音频为说话人A的语音数。
进一步地,本申请为了更好后续文本的语音合成更加的准确,对所述样本音频进行特征提取处理,得到所述标准语音向量。
由于语音数据容量较大不易处理,因此,对所述样本音频进行声音特征提取转换,得到声谱图。
详细地,本申请实施例中,参阅图2所示,所述对所述样本音频进行声音特征提取转换,得到目标声谱图,包括:
S11、对所述样本音频进行重采样,得到数字语音信号;
本申请实施例中,为了便于对所述样本音频进行数据处理,对所述样本音频进行重采样,得到所述数字语音信号,较佳地,本申请实施例利用数模转换器对所述样本音频进行重采样。
S12、对所述数字语音信号进行预加重,得到标准数字语音信号;
详细地,本申请实施例利用如下公式进行所述预加重操作:
y(t)=x(t)-μx(t-1)
其中,x(t)为所述数字语音信号,t为时间,y(t)为所述标准数字语音信号,μ为所述预加重操作的预设调节值,较佳地,μ的取值范围为[0.9,1.0]。
S13、对所述标准数字语音信号进行特征转换,得到所述目标声谱图;
本申请实施例中,所述标准数字语音信号只能体现音频在时域上的变化,不能体现所述标准语音信号的音频特征,为了体现所述标准语音信号的音频特征,是音频特征更加直观和清晰,对所述标准数字语音信号进行特征转换。
详细地,本申请实施例中,对所述标准数字语音信号进行特征转换,包括:利用预设声音处理算法,将所述标准数字语音信号映射在频域,得到所述目标声谱图。较佳地,本申请实施例中所述声音处理算法为梅尔滤波算法。
进一步地,为了数据进一步简化利用,提高数据的处理效率,本申请实施例对所述目标声谱图进行向量化处理,包括:利用预构建的图片分类模型对所述目标声谱图进行特征提取,得到所述标准语音向量。较佳地,本申请实施例中,所述预构建的图片分类模型为利用历史声谱图集训练的残差网络模型,其中所述历史声谱图集为多个与目标声谱图类型相同内容不同的声谱图集合。
详细地,本申请实施例中,参阅图3所示,所述利用预构建的图片分类模型对所述目标声谱图进行特征提取,得到所述标准语音向量,包括:
S21、获取所述图片分类模型包含的全连接层的所有节点的输出,得到目标声谱图特征值集;
例如:所述图片分类模型包含的全连接层共有1000个节点,将目标声谱图T输入所述图片分类模型,获取1000个节点输出值,得到目标声谱图T的目标声谱图特征值集,其中,每个节点的输出为目标声谱图T的一个特征值,所以目标声谱图T的目标声谱图特征值集中共有1000个特征值。
S22、根据所述全连接层的所有节点的顺序,将所述目标声谱图特征值集中的特征值进行纵向组合,得到标准语音向量;
例如:全连接层共有3个节点,按顺序分别为第一节点、第二节点、第三节点,目标声谱图A的目标声谱图特征值集中共有3个特征值为3,5,1,其中,特征值1为第一节点的输出,特征值3为第二节点的输出、特征值5为第三节点的输出,将目标声谱图A的目标声谱图特征值集中的三个特征值按节点顺序纵向组合得到目标声谱图A的标准语音向量
Figure PCTCN2021083824-appb-000001
S2、当接收待合成文本时,对所述待合成文本进行音素转换得到文本音素序列;
本申请实施例中,所述待合成文本为需要合成语音的文本,不同语音的文本的发音的音素可以用通用的音标规则进行表示,进一步,本申请实施例为了消除不同语言文本的差异,对所述待合成文本进行音素转换得到文本音素序列。
详细地,本申请实施例中,所述对所述待合成文本进行音素转换,得到所述文本音素序列,包括:将所述待合成文本进行标点符号删除,得到标准文本;利用预设的音标规则标记所述标准文本中的每个字符对应的音素,得到所述文本音素序列,如:所述预设的音标规则为国际音标规则,标记字符“啊”进行对应的音素为a,得到的文本音素序列为[a]。
S3、对所述文本音素序列进行向量转换,得到文本矩阵;
本申请实施例中,利用onehot编码算法将所述文本音素序列中的每个音素转换为列向量,得到所述文本矩阵。
S4、将所述标准语音向量与所述文本矩阵进行向量拼接,得到目标矩阵;
详细地,本申请实施例中,为了后续更好地进行语音合成,还需要确定所述文本音素序列中的每个音素进行语音对齐,即确定所述文本音素序列中的每个音素的发音时长即音 素帧长,因此,本申请实施例利用预设的算法模型计算所述文本音素序列中的每个音素的音素帧长,得到音素帧长序列,本申请实施例中所述预设的算法模型可以为DNN-HMM网络模型。
进一步地,本申请实施例中将所述音素帧长序列转换为音素帧长向量,即将音素帧长序列转换为对应的行向量,得到所述音素帧长向量,将所述音素帧长向量和所述文本矩阵进行横向拼接,得到所述标准文本矩阵,例如:所述音素帧长向量为1*4的行向量,所述文本矩阵为5*4的矩阵,将所述音素帧长向量作为所述文本矩阵的第五行,得到6*4的所述标准文本矩阵。
详细地,本申请实施例中,将所述标准语音向量与所述标准文本矩阵的每一列进行纵向拼接,得到所述目标矩阵,例如:所述标准文本矩阵的为
Figure PCTCN2021083824-appb-000002
所述标准语音向量为
Figure PCTCN2021083824-appb-000003
将所述标准语音向量与所述标准文本矩阵的每一列进行纵向拼接,得到所述目标矩阵为
Figure PCTCN2021083824-appb-000004
S5、对所述目标矩阵进行频谱特征提取,得到频谱特征信息;
为了进一步进行语音合成,本申请实施例还需要确定所述目标矩阵的频谱特征,其中,所述频谱特征可以为Mel频谱。
详细地,本申请实施例中利用训练完成的声学模型对所述目标矩阵进行频谱特征提取,得到所述频谱特征提取。较佳地,所述声学模型可以为transformer模型。
进一步地,本申请实施例中利用利用训练完成的声学模型对所述目标矩阵进行频谱特征提取之前,还包括:获取历史文本矩阵集;对所述历史文本矩阵集的每个历史文本矩阵进行频谱特征信息标记,得到训练集;利用所述训练集对所述声学模型进行训练,直至所述声学模型收敛,得到所述训练完成的声学模型。其中,所述历史文本矩阵集为多个历史文本矩阵的集合,所述历史文本矩阵为与所述待合成文本不同的文本对应的目标矩阵。
本申请的另一实施例中,为了保证数据的隐私性,所述频谱特征信息可以存储在区块链节点中。
S6、利用预设声码器对所述频谱特征信息进行语音合成,得到合成音频。
详细地,本申请实施例中将所述频谱特征信息输入至预设的声码器,得到所述合成音频。
较佳地,所述声码器为WORLD声码器。
如图4所示,是本申请语音合成装置的功能模块图。
本申请所述语音合成装置100可以安装于电子设备中。根据实现的功能,所述语音合成装置可以包括音频处理模块101、文字处理模块102、语音合成模块103,本发所述模块也可以称之为单元,是指一种能够被电子设备处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在电子设备的存储器中。
在本实施例中,关于各模块/单元的功能如下:
所述音频处理模块101用于获取样本音频,对所述样本音频进行声音特征提取转换及向量化处理,得到标准语音向量。
本申请实施例中,所述样本音频为后续需要成的目标说话人的语音数据,如:将后续文本合成说话人A的语音,那么所述样本音频为说话人A的语音数。
进一步地,本申请为了更好后续文本的语音合成更加的准确,所述音频处理模块101对所述样本音频进行特征提取处理,得到所述标准语音向量。
由于语音数据容量较大不易处理,因此,所述音频处理模块101对所述样本音频进行 声音特征提取转换,得到目标声谱图。
详细地,本申请实施例中,所述音频处理模块101利用下述手段对所述样本音频进行声音特征提取转换,得到目标声谱图,包括:
对所述样本音频进行重采样,得到数字语音信号;
本申请实施例中,为了便于对所述样本音频进行数据处理,对所述样本音频进行重采样,得到所述数字语音信号,较佳地,本申请实施例利用数模转换器对所述样本音频进行重采样。
对所述数字语音信号进行预加重,得到标准数字语音信号;
详细地,本申请实施例利用如下公式进行所述预加重操作:
y(t)=x(t)-μx(t-1)
其中,x(t)为所述数字语音信号,t为时间,y(t)为所述标准数字语音信号,μ为所述预加重操作的预设调节值,较佳地,μ的取值范围为[0.9,1.0]。
对所述标准数字语音信号进行特征转换,得到所述目标声谱图;
本申请实施例中,所述标准数字语音信号只能体现音频在时域上的变化,不能体现所述标准语音信号的音频特征,为了体现所述标准语音信号的音频特征,是音频特征更加直观和清晰,对所述标准数字语音信号进行特征转换。
详细地,本申请实施例中,所述音频处理模块101对所述标准数字语音信号进行特征转换,包括:利用预设声音处理算法,将所述标准数字语音信号映射在频域,得到所述目标声谱图。较佳地,本申请实施例中所述声音处理算法为梅尔滤波算法。
进一步地,为了数据进一步简化利用,提高数据的处理效率,本申请实施例所述音频处理模块101对所述目标声谱图进行向量化处理,包括:利用预构建的图片分类模型对所述目标声谱图进行特征提取,得到所述标准语音向量。较佳地,本申请实施例中,所述预构建的图片分类模型为利用历史声谱图集训练的残差网络模型,其中所述历史声谱图集为多个与目标声谱图类型相同内容不同的声谱图集合。
详细地,本申请实施例中,所述音频处理模块101利用下述手段对所述目标声谱图进行特征提取,得到所述标准语音向量,包括:
获取所述图片分类模型包含的全连接层的所有节点的输出,得到目标声谱图特征值集;
例如:所述图片分类模型包含的全连接层共有1000个节点,将目标声谱图T输入所述图片分类模型,获取1000个节点输出值,得到目标声谱图T的目标声谱图特征值集,其中,每个节点的输出为目标声谱图T的一个特征值,所以目标声谱图T的目标声谱图特征值集中共有1000个特征值。
根据所述全连接层的所有节点的顺序,将所述目标声谱图特征值集中的特征值进行纵向组合,得到标准语音向量;
例如:全连接层共有3个节点,按顺序分别为第一节点、第二节点、第三节点,目标声谱图A的目标声谱图特征值集中共有3个特征值为3,5,1,其中,特征值1为第一节点的输出,特征值3为第二节点的输出、特征值5为第三节点的输出,将目标声谱图A的目标声谱图特征值集中的三个特征值按节点顺序纵向组合得到目标声谱图A的标准语音向量
Figure PCTCN2021083824-appb-000005
所述文本处理模块102用于当接收待合成文本时,对所述待合成文本进行音素转换得到文本音素序列;对所述文本音素序列进行向量转换,得到文本矩阵;将所述标准语音向量与所述文本矩阵进行向量拼接,得到目标矩阵。
本申请实施例中,所述待合成文本为需要合成语音的文本,不同语音的文本的发音的音素可以用通用的音标规则进行表示,进一步,本申请实施例为了消除不同语言文本的差异,对所述待合成文本进行音素转换得到文本音素序列。
详细地,本申请实施例中,所述文本处理模块102对所述待合成文本进行音素转换,得到所述文本音素序列,包括:将所述待合成文本进行标点符号删除,得到标准文本;利用预设的音标规则标记所述标准文本中的每个字符对应的音素,得到所述文本音素序列,如:所述预设的音标规则为国际音标规则,标记字符“啊”进行对应的音素为a,得到的文本音素序列为[a]。
本申请实施例中,所述文本处理模块102利用onehot编码算法将所述文本音素序列中的每个音素转换为列向量,得到所述文本矩阵。
详细地,本申请实施例中,为了后续更好地进行语音合成,还需要确定所述文本音素序列中的每个音素进行语音对齐,即确定所述文本音素序列中的每个音素的发音时长即音素帧长,因此,本申请实施例所述文本处理模块102利用预设的算法模型计算所述文本音素序列中的每个音素的音素帧长,得到音素帧长序列,本申请实施例中所述预设的算法模型可以为DNN-HMM网络模型。
进一步地,本申请实施例中所述文本处理模块102将所述音素帧长序列转换为音素帧长向量,即将音素帧长序列转换为对应的行向量,得到所述音素帧长向量,将所述音素帧长向量和所述文本矩阵进行横向拼接,得到所述标准文本矩阵,例如:所述音素帧长向量为1*4的行向量,所述文本矩阵为5*4的矩阵,将所述音素帧长向量作为所述文本矩阵的第五行,得到6*4的所述标准文本矩阵。
详细地,本申请实施例中,所述文本处理模块102将所述标准语音向量与所述标准文本矩阵的每一列进行纵向拼接,得到所述目标矩阵,例如:所述标准文本矩阵的为
Figure PCTCN2021083824-appb-000006
所述标准语音向量为
Figure PCTCN2021083824-appb-000007
将所述标准语音向量与所述标准文本矩阵的每一列进行纵向拼接,得到所述目标矩阵为
Figure PCTCN2021083824-appb-000008
所述语音合成模块103用于对所述目标矩阵进行频谱特征提取,得到频谱特征信息;利用预设声码器对所述频谱特征信息进行语音合成,得到合成音频。
为了进一步进行语音合成,本申请实施例还需要确定所述目标矩阵的频谱特征,其中,所述频谱特征可以为Mel频谱。
详细地,本申请实施例中利用训练完成的声学模型对所述目标矩阵进行频谱特征提取,得到所述频谱特征提取。较佳地,所述声学模型可以为transformer模型。
进一步地,本申请实施例中所述语音合成模块103利用训练完成的声学模型对所述目标矩阵进行频谱特征提取之前,还包括:获取历史文本矩阵集;对所述历史文本矩阵集的每个历史文本矩阵进行频谱特征信息标记,得到训练集;利用所述训练集对所述声学模型进行训练,直至所述声学模型收敛,得到所述训练完成的声学模型。其中,所述历史文本矩阵集为多个历史文本矩阵的集合,所述历史文本矩阵为与所述待合成文本不同的文本对应的目标矩阵。
本申请的另一实施例中,为了保证数据的隐私性,所述频谱特征信息可以存储在区块链节点中。
详细地,本申请实施例中所述语音合成模块103将所述频谱特征信息输入至预设的声码器,得到所述合成音频。
较佳地,所述声码器为WORLD声码器。
如图5所示,是本申请实现语音合成方法的电子设备的结构示意图。
所述电子设备1可以包括处理器10、存储器11和总线,还可以包括存储在所述存储器11中并可在所述处理器10上运行的计算机程序,如语音合成程序12。
其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。所述存储器11在一些实施例中可以是电子设备1的内部存储单元,例如该电子设备1的移动硬盘。所述存储器11在另一些实施例中也可以是电子设备1的外部存储设备,例如电子设备1上配备的插接式移动硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(Secure Digital,SD)卡、闪存卡(Flash Card)等。进一步地,所述存储器11还可以既包括电子设备1的内部存储单元也包括外部存储设备。所述存储器11不仅可以用于存储安装于电子设备1的应用软件及各类数据,例如语音合成程序的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。
所述处理器10在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述处理器10是所述电子设备的控制核心(Control Unit),利用各种接口和线路连接整个电子设备的各个部件,通过运行或执行存储在所述存储器11内的程序或者模块(例如语音合成程序等),以及调用存储在所述存储器11内的数据,以执行电子设备1的各种功能和处理数据。
所述总线可以是外设部件互连标准(perIPheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。所述总线被设置为实现所述存储器11以及至少一个处理器10等之间的连接通信。
图5仅示出了具有部件的电子设备,本领域技术人员可以理解的是,图5示出的结构并不构成对所述电子设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。
例如,尽管未示出,所述电子设备1还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器10逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述电子设备1还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。
进一步地,所述电子设备1还可以包括网络接口,可选地,所述网络接口可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该电子设备1与其他电子设备之间建立通信连接。
可选地,该电子设备1还可以包括用户接口,用户接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,用户接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子设备1中处理的信息以及用于显示可视化的用户界面。
应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。
所述电子设备1中的所述存储器11存储的语音合成程序12是多个计算机程序的组合,在所述处理器10中运行时,可以实现:
获取样本音频,对所述样本音频进行声音特征提取转换及向量化处理,得到标准语音向量;
当接收待合成文本时,对所述待合成文本进行音素转换得到文本音素序列;
对所述文本音素序列进行向量转换,得到文本矩阵;
将所述标准语音向量与所述文本矩阵进行向量拼接,得到目标矩阵;
对所述目标矩阵进行频谱特征提取,得到频谱特征信息;
利用预设声码器对所述频谱特征信息进行语音合成,得到合成音频。
具体地,所述处理器10对上述计算机程序的具体实现方法可参考图1对应实施例中相关步骤的描述,在此不赘述。
进一步地,所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。所述计算机可读介质可以是非易失性的,也可以是易失性的。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)。
本申请实施例还可以提供一种计算机可读存储介质,所述计算机可读存储介质可以是易失性的,也可以是非易失性的,所述可读存储介质存储有计算机程序,所述计算机程序在被电子设备的处理器所执行时,可以实现:
获取样本音频,对所述样本音频进行声音特征提取转换及向量化处理,得到标准语音向量;
当接收待合成文本时,对所述待合成文本进行音素转换得到文本音素序列;
对所述文本音素序列进行向量转换,得到文本矩阵;
将所述标准语音向量与所述文本矩阵进行向量拼接,得到目标矩阵;
对所述目标矩阵进行频谱特征提取,得到频谱特征信息;
利用预设声码器对所述频谱特征信息进行语音合成,得到合成音频。
进一步地,所述计算机可用存储介质可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据区块链节点的使用所创建的数据等。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术 方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。

Claims (20)

  1. 一种语音合成方法,其中,所述方法包括:
    获取样本音频,对所述样本音频进行声音特征提取转换及向量化处理,得到标准语音向量;
    当接收待合成文本时,对所述待合成文本进行音素转换得到文本音素序列;
    对所述文本音素序列进行向量转换,得到文本矩阵;
    将所述标准语音向量与所述文本矩阵进行向量拼接,得到目标矩阵;
    对所述目标矩阵进行频谱特征提取,得到频谱特征信息;
    利用预设声码器对所述频谱特征信息进行语音合成,得到合成音频。
  2. 如权利要求1所述的语音合成方法,其中,所述对所述样本音频进行声音特征提取转换及向量化处理,得到标准语音向量,包括:
    对所述样本音频进行声音特征提取转换,得到目标声谱图;
    利用预构建的图片分类模型对所述目标声谱图进行特征提取,得到所述标准语音向量。
  3. 如权利要求2所述的语音合成方法,其中,所述对所述样本音频进行声音特征提取转换,得到目标声谱图,包括:
    对所述样本音频进行重采样,得到数字语音信号;
    对所述数字语音信号进行预加重,得到标准数字语音信号;
    对所述标准数字语音信号进行特征转换,得到所述目标声谱图。
  4. 如权利要求2所述的语音合成方法,其中,所述利用预构建的图片分类模型对所述目标声谱图进行特征提取,得到所述标准语音向量,包括:
    获取所述图片分类模型包含的全连接层的所有节点的输出,得到目标声谱图特征值集;
    根据所述全连接层的所有节点的顺序,将所述目标声谱图特征值集中的特征值进行纵向组合,得到标准语音向量。
  5. 如权利要求3所述的语音合成方法,其中,所述对所述标准数字语音信号进行特征转换,得到所述目标声谱图,包括:
    利用预设声音处理算法,将所述标准数字语音信号映射在频域,得到所述目标声谱图。
  6. 如权利要求1所述的语音合成方法,其中,所述将所述标准语音向量与所述文本矩阵进行向量拼接,得到目标矩阵,包括:
    利用预设的算法模型计算所述文本音素序列中的每个音素的音素帧长,得到音素帧长序列;
    将所述音素帧长序列转换为音素帧长向量;
    将所述音素帧长向量和所述文本矩阵进行横向拼接,得到标准文本矩阵;
    将所述标准语音向量与所述标准文本矩阵的每一列进行纵向拼接,得到所述目标矩阵。
  7. 如权利要求1至6中任意一项所述的语音合成方法,其中,所述对所述待合成文本进行音素转换得到文本音素序列,包括:
    将所述待合成文本进行标点符号删除,得到标准文本;
    利用预设的音标规则标记所述标准文本中的每个字符对应的音素,得到所述文本音素序列。
  8. 一种语音合成装置,其中,包括:
    音频处理模块,用于获取样本音频,对所述样本音频进行声音特征提取转换及向量化处理,得到标准语音向量;
    文本处理模块,用于当接收待合成文本时,对所述待合成文本进行音素转换得到文本音素序列;对所述文本音素序列进行向量转换,得到文本矩阵;将所述标准语音向量与所述文本矩阵进行向量拼接,得到目标矩阵;
    语音合成模块,用于对所述目标矩阵进行频谱特征提取,得到频谱特征信息;利用预设声码器对所述频谱特征信息进行语音合成,得到合成音频。
  9. 一种电子设备,其中,所述电子设备包括:
    至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的计算机程序指令,所述计算机程序指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如下步骤:
    获取样本音频,对所述样本音频进行声音特征提取转换及向量化处理,得到标准语音向量;
    当接收待合成文本时,对所述待合成文本进行音素转换得到文本音素序列;
    对所述文本音素序列进行向量转换,得到文本矩阵;
    将所述标准语音向量与所述文本矩阵进行向量拼接,得到目标矩阵;
    对所述目标矩阵进行频谱特征提取,得到频谱特征信息;
    利用预设声码器对所述频谱特征信息进行语音合成,得到合成音频。
  10. 如权利要求9所述的电子设备,其中,所述对所述样本音频进行声音特征提取转换及向量化处理,得到标准语音向量,包括:
    对所述样本音频进行声音特征提取转换,得到目标声谱图;
    利用预构建的图片分类模型对所述目标声谱图进行特征提取,得到所述标准语音向量。
  11. 如权利要求10所述的电子设备,其中,所述对所述样本音频进行声音特征提取转换,得到目标声谱图,包括:
    对所述样本音频进行重采样,得到数字语音信号;
    对所述数字语音信号进行预加重,得到标准数字语音信号;
    对所述标准数字语音信号进行特征转换,得到所述目标声谱图。
  12. 如权利要求10所述的电子设备,其中,所述利用预构建的图片分类模型对所述目标声谱图进行特征提取,得到所述标准语音向量,包括:
    获取所述图片分类模型包含的全连接层的所有节点的输出,得到目标声谱图特征值集;
    根据所述全连接层的所有节点的顺序,将所述目标声谱图特征值集中的特征值进行纵向组合,得到标准语音向量。
  13. 如权利要求11所述的电子设备,其中,所述对所述标准数字语音信号进行特征转换,得到所述目标声谱图,包括:
    利用预设声音处理算法,将所述标准数字语音信号映射在频域,得到所述目标声谱图。
  14. 如权利要求12所述的电子设备,其中,所述将所述标准语音向量与所述文本矩阵进行向量拼接,得到目标矩阵,包括:
    利用预设的算法模型计算所述文本音素序列中的每个音素的音素帧长,得到音素帧长序列;
    将所述音素帧长序列转换为音素帧长向量;
    将所述音素帧长向量和所述文本矩阵进行横向拼接,得到标准文本矩阵;
    将所述标准语音向量与所述标准文本矩阵的每一列进行纵向拼接,得到所述目标矩阵。
  15. 如权利要求9至14中任意一项所述的电子设备,其中,所述对所述待合成文本进行音素转换得到文本音素序列,包括:
    将所述待合成文本进行标点符号删除,得到标准文本;
    利用预设的音标规则标记所述标准文本中的每个字符对应的音素,得到所述文本音素序列。
  16. 一种计算机可读存储介质,存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下步骤:
    获取样本音频,对所述样本音频进行声音特征提取转换及向量化处理,得到标准语音向量;
    当接收待合成文本时,对所述待合成文本进行音素转换得到文本音素序列;
    对所述文本音素序列进行向量转换,得到文本矩阵;
    将所述标准语音向量与所述文本矩阵进行向量拼接,得到目标矩阵;
    对所述目标矩阵进行频谱特征提取,得到频谱特征信息;
    利用预设声码器对所述频谱特征信息进行语音合成,得到合成音频。
  17. 如权利要求1所述的计算机可读存储介质,其中,所述对所述样本音频进行声音特征提取转换及向量化处理,得到标准语音向量,包括:
    对所述样本音频进行声音特征提取转换,得到目标声谱图;
    利用预构建的图片分类模型对所述目标声谱图进行特征提取,得到所述标准语音向量。
  18. 如权利要求17所述的计算机可读存储介质,其中,所述对所述样本音频进行声音特征提取转换,得到目标声谱图,包括:
    对所述样本音频进行重采样,得到数字语音信号;
    对所述数字语音信号进行预加重,得到标准数字语音信号;
    对所述标准数字语音信号进行特征转换,得到所述目标声谱图。
  19. 如权利要求17所述的计算机可读存储介质,其中,所述利用预构建的图片分类模型对所述目标声谱图进行特征提取,得到所述标准语音向量,包括:
    获取所述图片分类模型包含的全连接层的所有节点的输出,得到目标声谱图特征值集;
    根据所述全连接层的所有节点的顺序,将所述目标声谱图特征值集中的特征值进行纵向组合,得到标准语音向量。
  20. 如权利要求18所述的计算机可读存储介质,其中,所述对所述标准数字语音信号进行特征转换,得到所述目标声谱图,包括:
    利用预设声音处理算法,将所述标准数字语音信号映射在频域,得到所述目标声谱图。
PCT/CN2021/083824 2020-12-11 2021-03-30 语音合成方法、装置、电子设备及可读存储介质 WO2022121176A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011442571.2A CN112397047A (zh) 2020-12-11 2020-12-11 语音合成方法、装置、电子设备及可读存储介质
CN202011442571.2 2020-12-11

Publications (1)

Publication Number Publication Date
WO2022121176A1 true WO2022121176A1 (zh) 2022-06-16

Family

ID=74625646

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/083824 WO2022121176A1 (zh) 2020-12-11 2021-03-30 语音合成方法、装置、电子设备及可读存储介质

Country Status (2)

Country Link
CN (1) CN112397047A (zh)
WO (1) WO2022121176A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230110905A1 (en) * 2021-10-07 2023-04-13 Nvidia Corporation Unsupervised alignment for text to speech synthesis using neural networks
CN116705058A (zh) * 2023-08-04 2023-09-05 贝壳找房(北京)科技有限公司 多模语音任务的处理方法、电子设备及可读存储介质

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112397047A (zh) * 2020-12-11 2021-02-23 平安科技(深圳)有限公司 语音合成方法、装置、电子设备及可读存储介质
CN113096625A (zh) * 2021-03-24 2021-07-09 平安科技(深圳)有限公司 多人佛乐生成方法、装置、设备及存储介质
CN112927677B (zh) * 2021-03-29 2023-07-25 北京大米科技有限公司 语音合成方法和装置
CN113327578B (zh) * 2021-06-10 2024-02-02 平安科技(深圳)有限公司 一种声学模型训练方法、装置、终端设备及存储介质
CN113436608B (zh) * 2021-06-25 2023-11-28 平安科技(深圳)有限公司 双流语音转换方法、装置、设备及存储介质
CN114783406B (zh) * 2022-06-16 2022-10-21 深圳比特微电子科技有限公司 语音合成方法、装置和计算机可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080201150A1 (en) * 2007-02-20 2008-08-21 Kabushiki Kaisha Toshiba Voice conversion apparatus and speech synthesis apparatus
US10186252B1 (en) * 2015-08-13 2019-01-22 Oben, Inc. Text to speech synthesis using deep neural network with constant unit length spectrogram
CN111161702A (zh) * 2019-12-23 2020-05-15 爱驰汽车有限公司 个性化语音合成方法、装置、电子设备、存储介质
CN112002305A (zh) * 2020-07-29 2020-11-27 北京大米科技有限公司 语音合成方法、装置、存储介质及电子设备
CN112397047A (zh) * 2020-12-11 2021-02-23 平安科技(深圳)有限公司 语音合成方法、装置、电子设备及可读存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080201150A1 (en) * 2007-02-20 2008-08-21 Kabushiki Kaisha Toshiba Voice conversion apparatus and speech synthesis apparatus
US10186252B1 (en) * 2015-08-13 2019-01-22 Oben, Inc. Text to speech synthesis using deep neural network with constant unit length spectrogram
CN111161702A (zh) * 2019-12-23 2020-05-15 爱驰汽车有限公司 个性化语音合成方法、装置、电子设备、存储介质
CN112002305A (zh) * 2020-07-29 2020-11-27 北京大米科技有限公司 语音合成方法、装置、存储介质及电子设备
CN112397047A (zh) * 2020-12-11 2021-02-23 平安科技(深圳)有限公司 语音合成方法、装置、电子设备及可读存储介质

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230110905A1 (en) * 2021-10-07 2023-04-13 Nvidia Corporation Unsupervised alignment for text to speech synthesis using neural networks
US11769481B2 (en) 2021-10-07 2023-09-26 Nvidia Corporation Unsupervised alignment for text to speech synthesis using neural networks
US11869483B2 (en) * 2021-10-07 2024-01-09 Nvidia Corporation Unsupervised alignment for text to speech synthesis using neural networks
CN116705058A (zh) * 2023-08-04 2023-09-05 贝壳找房(北京)科技有限公司 多模语音任务的处理方法、电子设备及可读存储介质
CN116705058B (zh) * 2023-08-04 2023-10-27 贝壳找房(北京)科技有限公司 多模语音任务的处理方法、电子设备及可读存储介质

Also Published As

Publication number Publication date
CN112397047A (zh) 2021-02-23

Similar Documents

Publication Publication Date Title
WO2022121176A1 (zh) 语音合成方法、装置、电子设备及可读存储介质
CN111261144B (zh) 一种语音识别的方法、装置、终端以及存储介质
WO2022116420A1 (zh) 语音事件检测方法、装置、电子设备及计算机存储介质
US20230298562A1 (en) Speech synthesis method, apparatus, readable medium, and electronic device
US20230317055A1 (en) Method, apparatus, storage medium and electronic device for speech synthesis
CN109686361B (zh) 一种语音合成的方法、装置、计算设备及计算机存储介质
CN104598020B (zh) 保留用户输入的情感的方法和装置
WO2021189984A1 (zh) 语音合成方法、装置、设备及计算机可读存储介质
WO2020062680A1 (zh) 基于双音节混搭的波形拼接方法、装置、设备及存储介质
CN111445892B (zh) 歌曲生成方法、装置、可读介质及电子设备
WO2022121157A1 (zh) 语音合成方法、装置、电子设备及存储介质
CN110264991A (zh) 语音合成模型的训练方法、语音合成方法、装置、设备及存储介质
WO2022227190A1 (zh) 语音合成方法、装置、电子设备及存储介质
WO2022121158A1 (zh) 语音合成方法、装置、电子设备及存储介质
CN107707745A (zh) 用于提取信息的方法和装置
WO2022142105A1 (zh) 文本转语音方法、装置、电子设备及存储介质
WO2022156413A1 (zh) 语音风格的迁移方法、装置、可读介质和电子设备
WO2022105553A1 (zh) 语音合成方法、装置、可读介质及电子设备
CN111798821B (zh) 声音转换方法、装置、可读存储介质及电子设备
JP2017058483A (ja) 音声処理装置、音声処理方法及び音声処理プログラム
US20230326446A1 (en) Method, apparatus, storage medium, and electronic device for speech synthesis
CN111009233A (zh) 语音处理方法、装置、电子设备及存储介质
CN113205814B (zh) 语音数据标注方法、装置、电子设备及存储介质
CN113420556B (zh) 基于多模态信号的情感识别方法、装置、设备及存储介质
US20230059882A1 (en) Speech synthesis method and apparatus, device and computer storage medium

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: 21901892

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: 21901892

Country of ref document: EP

Kind code of ref document: A1