KR102532253B1 - A method and a TTS system for calculating a decoder score of an attention alignment corresponded to a spectrogram - Google Patents

A method and a TTS system for calculating a decoder score of an attention alignment corresponded to a spectrogram Download PDF

Info

Publication number
KR102532253B1
KR102532253B1 KR1020200158772A KR20200158772A KR102532253B1 KR 102532253 B1 KR102532253 B1 KR 102532253B1 KR 1020200158772 A KR1020200158772 A KR 1020200158772A KR 20200158772 A KR20200158772 A KR 20200158772A KR 102532253 B1 KR102532253 B1 KR 102532253B1
Authority
KR
South Korea
Prior art keywords
score
spectrogram
values
decoder
encoder
Prior art date
Application number
KR1020200158772A
Other languages
Korean (ko)
Other versions
KR20220071524A (en
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 주식회사 자이냅스
Priority to KR1020200158772A priority Critical patent/KR102532253B1/en
Priority to US17/380,387 priority patent/US20220165247A1/en
Publication of KR20220071524A publication Critical patent/KR20220071524A/en
Application granted granted Critical
Publication of KR102532253B1 publication Critical patent/KR102532253B1/en

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/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
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/02Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using spectral analysis, e.g. transform vocoders or subband vocoders
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/03Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the type of extracted parameters
    • G10L25/18Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the type of extracted parameters the extracted parameters being spectral information of each sub-band
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/48Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use
    • G10L25/51Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use for comparison or discrimination
    • G10L25/60Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use for comparison or discrimination for measuring the quality of voice signals

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)
  • Signal Processing (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Quality & Reliability (AREA)
  • Machine Translation (AREA)

Abstract

일 측면에 따른 스펙트로그램에 대응하는 어텐션 얼라인먼트(attention alignment)의 스코어(score)를 연산하는 방법은, 상기 어텐션 얼라인먼트가 표현되는 제2 축(axis)을 구성하는 제s 스텝에서의 값들 중에서 m 개의 값을 추출하는 단계; 및 상기 추출된 m 개의 값을 이용하여 상기 제s 스텝에서의 제s 스코어를 연산하는 단계;를 포함하고, 상기 m 및 상기 s는 각각 1 이상의 자연수를 포함하고, 상기 제2 축은 상기 스펙트로그램을 생성하는 합성기에 포함된 인코더(encoder)의 타임 스텝에 대응하고, 상기 스펙트로그램은 특정 자연 언어로 구성된 문자들의 시퀀스(sequence)의 구두 발화(verbal utterance)에 대응한다.A method of calculating a score of attention alignment corresponding to a spectrogram according to an aspect includes m values among values in an s step constituting a second axis on which the attention alignment is expressed. extracting a value; and calculating an s score in the s th step using the extracted m values, wherein m and s each include a natural number of 1 or more, and the second axis represents the spectrogram Corresponds to the time step of an encoder included in the synthesizer to generate, and the spectrogram corresponds to a verbal utterance of a sequence of characters in a specific natural language.

Description

스펙트로그램에 대응하는 어텐션 얼라인먼트의 디코더 스코어를 연산하는 방법 및 음성 합성 시스템 {A method and a TTS system for calculating a decoder score of an attention alignment corresponded to a spectrogram}A method and a speech synthesis system for calculating a decoder score of an attention alignment corresponding to a spectrogram {A method and a TTS system for calculating a decoder score of an attention alignment corresponded to a spectrogram}

스펙트로그램에 대응하는 어텐션 얼라인먼트의 디코더 스코어를 연산하는 방법 및 음성 합성 시스템에 관한다.A method for calculating a decoder score of attention alignment corresponding to a spectrogram and a speech synthesis system.

최근 인공 지능 기술의 발달로 음성 신호를 활용하는 인터페이스가 보편화되고 있다. 이에 따라, 주어진 상황에 따라 합성된 음성을 발화할 수 있도록 하는 음성 합성(speech synthesis) 기술에 대한 연구가 활발히 진행되고 있다.Recently, with the development of artificial intelligence technology, an interface using a voice signal is becoming common. Accordingly, research on a speech synthesis technology capable of uttering a synthesized voice according to a given situation is being actively conducted.

음성 합성 기술은 인공 지능에 기반한 음성 인식 기술과 접목하여 가상 비서, 오디오북, 자동 통번역 및 가상 성우 등의 많은 분야에 적용되고 있다. Speech synthesis technology is applied to many fields, such as virtual assistants, audio books, automatic interpretation and translation, and virtual voice actors, in conjunction with artificial intelligence-based voice recognition technology.

종래의 음성 합성 방법으로는 연결 합성(Unit Selection Synthesis, USS) 및 통계 기반 파라미터 합성(HMM-based Speech Synthesis, HTS) 등의 다양한 방법이 있다. USS 방법은 음성 데이터를 음소 단위로 잘라서 저장하고 음성 합성 시 발화에 적합한 음편을 찾아서 이어붙이는 방법이고, HTS 방법은 음성 특징에 해당하는 파라미터들을 추출해 통계 모델을 생성하고 통계 모델에 기반하여 텍스트를 음성으로 재구성하는 방법이다. 그러나, 상술한 종래의 음성 합성 방법은 화자의 발화 스타일 또는 감정 표현 등을 반영한 자연스러운 음성을 합성하는 데 많은 한계가 있었다. Conventional speech synthesis methods include various methods such as Unit Selection Synthesis (USS) and HMM-based Speech Synthesis (HTS). The USS method is a method of cutting and storing voice data in phoneme units and searching for and attaching sound pieces suitable for speech during speech synthesis. way to reconstruct it. However, the conventional voice synthesis method described above has many limitations in synthesizing a natural voice reflecting a speaker's speech style or emotional expression.

이에 따라, 최근에는 인공 신경망(Artificial Neural Network)에 기반하여 텍스트로부터 음성을 합성하는 음성 합성 방법이 주목받고 있다. Accordingly, recently, a speech synthesis method for synthesizing speech from text based on an artificial neural network is attracting attention.

스펙트로그램에 대응하는 어텐션 얼라인먼트의 디코더 스코어를 연산하는 방법 및 음성 합성 시스템을 제공하는데 있다. 또한, 실제 발화자가 말하는 듯한 자연스러운 음성을 구현할 수 있는 인공 지능 기반의 음성 합성 기술을 제공하는 데 있다. 또한, 적은 양의 학습 데이터를 이용하는 고효율의 인공 지능 기반의 음성 합성 기술을 제공하는 데 있다.An object of the present invention is to provide a method for calculating a decoder score of attention alignment corresponding to a spectrogram and a speech synthesis system. In addition, it is an object of the present invention to provide an artificial intelligence-based voice synthesis technology capable of realizing a natural voice as if a real speaker is speaking. In addition, it is to provide a high-efficiency artificial intelligence-based voice synthesis technology using a small amount of learning data.

해결하고자 하는 기술적 과제는 상기된 바와 같은 기술적 과제들로 한정되지 않으며, 또 다른 기술적 과제들이 유추될 수 있다.The technical problem to be solved is not limited to the technical problems as described above, and other technical problems can be inferred.

일 측면에 따른 스펙트로그램에 대응하는 어텐션 얼라인먼트(attention alignment)의 스코어(score)를 연산하는 방법은, 상기 어텐션 얼라인먼트가 표현되는 제2 축(axis)을 구성하는 제s 스텝에서의 값들 중에서 m 개의 값을 추출하는 단계; 및 상기 추출된 m 개의 값을 이용하여 상기 제s 스텝에서의 제s 스코어를 연산하는 단계;를 포함하고, 상기 m 및 상기 s는 각각 1 이상의 자연수를 포함하고, 상기 제2 축은 상기 스펙트로그램을 생성하는 합성기에 포함된 인코더(encoder)의 타임 스텝에 대응하고, 상기 스펙트로그램은 특정 자연 언어로 구성된 문자들의 시퀀스(sequence)의 구두 발화(verbal utterance)에 대응한다.A method of calculating a score of attention alignment corresponding to a spectrogram according to an aspect includes m values among values in an s step constituting a second axis on which the attention alignment is expressed. extracting a value; and calculating an s score in the s th step using the extracted m values, wherein m and s each include a natural number of 1 or more, and the second axis represents the spectrogram Corresponds to the time step of an encoder included in the synthesizer to generate, and the spectrogram corresponds to a verbal utterance of a sequence of characters in a specific natural language.

상술한 방법에 있어서, 상기 추출하는 단계는, 상기 제s 스텝에서의 값들 중에서 상위 m 개의 값을 추출하고, 상기 m은 2 이상의 자연수를 포함한다.In the method described above, in the extracting step, the top m values are extracted from among the values in the s th step, and m includes a natural number of 2 or more.

상술한 방법에 있어서, 상기 s의 마지막 값은 상기 스펙트로그램의 마지막에 대응하는 스텝을 의미한다.In the above method, the last value of s means a step corresponding to the end of the spectrogram.

상술한 방법에 있어서, 상기 연산된 제s 스코어와 소정의 값을 비교하여 상기 스펙트로그램의 품질을 평가하는 단계;를 더 포함한다.The method described above further includes evaluating the quality of the spectrogram by comparing the calculated s score with a predetermined value.

상술한 방법에 있어서, 상기 제2 축을 구성하는 스텝들은 각각 입력 텍스트를 구성하는 단일 음소에 대응한다.In the above method, the steps constituting the second axis each correspond to a single phoneme constituting the input text.

다른 측면에 따른 컴퓨터로 읽을 수 있는 기록매체는 상술한 방법을 컴퓨터에서 실행시키기 위한 프로그램을 포함한다.A computer-readable recording medium according to another aspect includes a program for executing the above-described method on a computer.

또 다른 측면에 따른 음성 합성 시스템은, 화자 인코더; 합성기; 및 보코더;를 포함하고, 상기 합성기는, 스펙트로그램에 대응하는 어텐션 얼라인먼트(attention alignment)가 표현되는 제2 축(axis)을 구성하는 제s 스텝에서의 값들 중에서 m 개의 값을 추출하고, 상기 추출된 m 개의 값을 이용하여 상기 제s 스텝에서의 제s 스코어를 연산하고, 상기 m 및 상기 s는 각각 1 이상의 자연수를 포함하고, 상기 제2 축은 상기 스펙트로그램을 생성하는 합성기에 포함된 인코더(encoder)의 타임 스텝에 대응하고, 상기 스펙트로그램은 특정 자연 언어로 구성된 문자들의 시퀀스(sequence)의 구두 발화(verbal utterance)에 대응한다.A speech synthesis system according to another aspect includes a speaker encoder; synthesizer; and a vocoder, wherein the synthesizer extracts m values from among values at an s step constituting a second axis on which an attention alignment corresponding to the spectrogram is expressed, and the extraction An encoder included in a synthesizer that calculates a s score in the s th step using the m values, wherein m and s each include a natural number of 1 or more, and the second axis generates the spectrogram ( encoder, and the spectrogram corresponds to a verbal utterance of a sequence of characters in a particular natural language.

상술한 시스템에 있어서, 상기 합성기는, 상기 제s 스텝에서의 값들 중에서 상위 m 개의 값을 추출하고, 상기 m은 2 이상의 자연수를 포함한다.In the system described above, the combiner extracts top m values from among the values in the s th step, where m includes a natural number of 2 or more.

상술한 시스템에 있어서, 상기 s의 마지막 값은 상기 스펙트로그램의 마지막에 대응하는 스텝을 의미한다.In the above system, the last value of s means a step corresponding to the end of the spectrogram.

상술한 시스템에 있어서, 상기 합성기는, 상기 연산된 제s 스코어와 소정의 값을 비교하여 상기 스펙트로그램의 품질을 평가한다.In the system described above, the synthesizer evaluates the quality of the spectrogram by comparing the calculated s-th score with a predetermined value.

상술한 시스템에 있어서, 상기 제2 축을 구성하는 스텝들은 각각 입력 텍스트를 구성하는 단일 음소에 대응한다.In the above system, the steps constituting the second axis each correspond to a single phoneme constituting the input text.

음성 합성 시스템이 어텐션 얼라인먼트의 스코어(인코더 스코어, 디코더 스코어, 최종 스코어)를 연산함에 따라, 어텐션 얼라인먼트에 대응하는 멜 스펙트로그램의 품질이 판단될 수 있다. 따라서, 음성 합성 시스템은 복수의 멜 스펙트로그램들 중 최고 품질의 멜 스펙트로그램을 선택할 수 있다. 이에 따라, 음성 합성 시스템은 최고 품질의 합성 음성을 출력할 수 있다.As the speech synthesis system calculates attention alignment scores (encoder score, decoder score, and final score), the quality of the Mel spectrogram corresponding to the attention alignment may be determined. Accordingly, the speech synthesis system may select a mel spectrogram of the highest quality from among a plurality of mel spectrograms. Accordingly, the speech synthesis system can output synthesized speech of the highest quality.

도 1은 음성 합성 시스템의 동작을 개략적으로 나타내는 도면이다.
도 2는 음성 합성 시스템의 일 실시예를 나타내는 도면이다.
도 3은 합성기를 통해 멜 스펙트로그램을 출력하는 일 실시예를 나타내는 도면이다.
도 4a 및 도 4b는 멜 스펙트로그램과 어텐션 얼라인먼트의 일 예를 도시한 도면들이다.
도 5a 및 도 5b는 어텐션 얼라인먼트의 품질을 설명하기 위한 도면들이다.
도 6은 어텐션 얼라인먼트를 나타내는 좌표 축들 및 어텐션 얼라인먼트의 품질을 설명하기 위한 도면이다.
도 7은 합성기가 인코더 스코어를 연산하는 예를 설명하기 위한 도면이다.
도 8은 합성기가 디코더 스코어를 연산하는 예를 설명하기 위한 도면이다.
도 9는 어텐션 얼라인먼트에서 유효한 의미를 갖는 부분을 추출하는 예를 설명하기 위한 도면이다.
도 10a 내지 도 10c는 어텐션 얼라인먼트의 품질과 인코더 스코어 및 디코더 스코어의 관계를 설명하기 위한 도면들이다.
도 11은 어텐션 얼라인먼트의 디코더 스코어를 연산하는 방법의 일 예를 나타낸 흐름도이다.
1 is a diagram schematically illustrating the operation of a speech synthesis system.
2 is a diagram illustrating an embodiment of a speech synthesis system.
3 is a diagram illustrating an embodiment of outputting a Mel spectrogram through a synthesizer.
4A and 4B are diagrams illustrating an example of a Mel spectrogram and attention alignment.
5A and 5B are diagrams for explaining the quality of attention alignment.
6 is a diagram for describing coordinate axes representing attention alignment and quality of attention alignment.
7 is a diagram for explaining an example in which a synthesizer calculates an encoder score.
8 is a diagram for explaining an example in which a synthesizer calculates a decoder score.
9 is a diagram for explaining an example of extracting a part having a valid meaning from attention alignment.
10A to 10C are diagrams for explaining the relationship between the quality of attention alignment and an encoder score and a decoder score.
11 is a flowchart illustrating an example of a method of calculating a decoder score of attention alignment.

본 실시예들에서 사용되는 용어는 본 실시예들에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어들을 선택하였으나, 이는 당 분야에 종사하는 기술자의 의도 또는 판례, 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한, 특정한 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 부분에서 상세히 그 의미를 기재할 것이다. 따라서, 본 실시예들에서 사용되는 용어는 단순한 용어의 명칭이 아닌, 그 용어가 가지는 의미와 본 실시예들 전반에 걸친 내용을 토대로 정의되어야 한다. The terms used in the present embodiments have been selected from general terms that are currently widely used as much as possible while considering the functions in the present embodiments, but these may vary depending on the intention of a person skilled in the art or a precedent, the emergence of new technologies, etc. there is. In addition, in a specific case, there are also terms arbitrarily selected by the applicant, and in this case, the meaning will be described in detail in the relevant part. Therefore, the term used in the present embodiments should be defined based on the meaning of the term and the general content of the present embodiment, not a simple name of the term.

본 실시예들은 다양한 변경을 가할 수 있고 여러 가지 형태를 가질 수 있는바, 일부 실시예들을 도면에 예시하고 상세하게 설명하고자 한다. 그러나, 이는 본 실시예들을 특정한 개시형태에 대해 한정하려는 것이 아니며, 본 실시예들의 사상 및 기술범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 본 명세서에서 사용한 용어들은 단지 실시예들의 설명을 위해 사용된 것으로, 본 실시예들을 한정하려는 의도가 아니다.Since the present embodiments can have various changes and various forms, some embodiments will be illustrated in the drawings and described in detail. However, this is not intended to limit the present embodiments to a specific disclosure, and should be understood to include all changes, equivalents, or substitutes included in the spirit and scope of the present embodiments. Terms used in this specification are only used for description of the embodiments, and are not intended to limit the embodiments.

본 실시예들에 사용되는 용어들은 다르게 정의되지 않는 한, 본 실시예들이 속하는 기술분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미가 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 실시예들에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않아야 한다.Terms used in the present embodiments have the same meaning as commonly understood by a person of ordinary skill in the art to which the present embodiments belong, unless otherwise defined. Terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with the meaning in the context of the related art, and unless explicitly defined in the present embodiments, in an ideal or excessively formal meaning. should not be interpreted.

후술하는 본 발명에 대한 상세한 설명은, 본 발명이 실시될 수 있는 특정 실시예를 예시로서 도시하는 첨부 도면을 참조한다. 이러한 실시예는 당업자가 본 발명을 실시할 수 있기에 충분하도록 상세히 설명된다. 본 발명의 다양한 실시예는 서로 다르지만 상호 배타적일 필요는 없음이 이해되어야 한다. 예를 들어, 본 명세서에 기재되어 있는 특정 형상, 구조 및 특성은 본 발명의 정신과 범위를 벗어나지 않으면서 일 실시예로부터 다른 실시예로 변경되어 구현될 수 있다. 또한, 각각의 실시예 내의 개별 구성요소의 위치 또는 배치도 본 발명의 정신과 범위를 벗어나지 않으면서 변경될 수 있음이 이해되어야 한다. 따라서, 후술하는 상세한 설명은 한정적인 의미로서 행하여지는 것이 아니며, 본 발명의 범위는 특허청구범위의 청구항들이 청구하는 범위 및 그와 균등한 모든 범위를 포괄하는 것으로 받아들여져야 한다. 도면에서 유사한 참조부호는 여러 측면에 걸쳐서 동일하거나 유사한 구성요소를 나타낸다.DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The detailed description of the present invention which follows refers to the accompanying drawings which illustrate, by way of illustration, specific embodiments in which the present invention may be practiced. These embodiments are described in sufficient detail to enable any person skilled in the art to practice the present invention. It should be understood that the various embodiments of the present invention are different from each other but are not necessarily mutually exclusive. For example, specific shapes, structures, and characteristics described herein may be implemented from one embodiment to another without departing from the spirit and scope of the present invention. It should also be understood that the location or arrangement of individual components within each embodiment may be changed without departing from the spirit and scope of the present invention. Therefore, the detailed description to be described later is not performed in a limiting sense, and the scope of the present invention should be taken as encompassing the scope claimed by the claims and all scopes equivalent thereto. Like reference numbers in the drawings indicate the same or similar elements throughout the various aspects.

한편, 본 명세서에서 하나의 도면 내에서 개별적으로 설명되는 기술적 특징은 개별적으로 구현될 수도 있고, 동시에 구현될 수도 있다.Meanwhile, technical features individually described in one drawing in this specification may be implemented individually or simultaneously.

본 명세서에서, “~부(unit)”는 프로세서 또는 회로와 같은 하드웨어 구성(hardware component), 및/또는 프로세서와 같은 하드웨어 구성에 의해 실행되는 소프트웨어 구성(software component)일 수 있다.In this specification, “~ unit” may be a hardware component such as a processor or a circuit, and/or a software component executed by the hardware component such as a processor.

이하에서는, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명을 용이하게 실시할 수 있도록 하기 위하여, 본 발명의 여러 실시예에 관하여 첨부된 도면을 참조하여 상세히 설명하기로 한다.Hereinafter, various embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily practice the present invention.

도 1은 음성 합성 시스템의 동작을 개략적으로 나타내는 도면이다. 1 is a diagram schematically illustrating the operation of a speech synthesis system.

음성 합성(Speech Synthesis) 장치는 텍스트를 인위적으로 사람의 음성으로 변환하는 장치이다. A speech synthesis device is a device that artificially converts text into human voice.

예를 들어, 도 1의 음성 합성 시스템(100)은 인공 신경망(Artificial Neural Network) 기반의 음성 합성 시스템일 수 있다. 인공 신경망은 시냅스의 결합으로 네트워크를 형성한 인공 뉴런이 학습을 통해 시냅스의 결합 세기를 변화시켜, 문제 해결 능력을 가지는 모델 전반을 의미한다. For example, the voice synthesizing system 100 of FIG. 1 may be an artificial neural network based voice synthesizing system. An artificial neural network refers to a model in general that has problem-solving ability by changing synaptic coupling strength through learning of artificial neurons that form a network through synaptic coupling.

음성 합성 시스템(100)은 PC(personal computer), 서버 디바이스, 모바일 디바이스, 임베디드 디바이스 등의 다양한 종류의 디바이스들로 구현될 수 있고, 구체적인 예로서 인공 신경망를 이용하여 음성 합성을 수행하는 스마트폰, 태블릿 디바이스, AR(Augmented Reality) 디바이스, IoT(Internet of Things) 디바이스, 자율주행 자동차, 로보틱스, 의료기기, 전자책 단말기 및 네비게이션 등에 해당될 수 있으나, 이에 제한되지 않는다. The voice synthesis system 100 may be implemented in various types of devices such as a personal computer (PC), a server device, a mobile device, and an embedded device, and as a specific example, a smartphone or a tablet that performs voice synthesis using an artificial neural network. Devices, Augmented Reality (AR) devices, Internet of Things (IoT) devices, self-driving cars, robotics, medical devices, e-book readers, and navigation devices may be used, but are not limited thereto.

나아가서, 음성 합성 시스템(100)은 위와 같은 디바이스에 탑재되는 전용 하드웨어 가속기(HW accelerator)에 해당될 수 있다. 또는, 음성 합성 시스템(100)은 인공 신경망의 구동을 위한 전용 모듈인 NPU(neural processing unit), TPU(Tensor Processing Unit), Neural Engine 등과 같은 하드웨어 가속기일 수 있으나, 이에 제한되지 않는다.Furthermore, the voice synthesis system 100 may correspond to a dedicated hardware accelerator (HW accelerator) mounted in the above device. Alternatively, the speech synthesis system 100 may be a hardware accelerator such as a neural processing unit (NPU), a tensor processing unit (TPU), or a neural engine, which are dedicated modules for driving an artificial neural network, but is not limited thereto.

도 1을 참고하면, 음성 합성 시스템(100)은 텍스트 입력과 특정 화자 정보를 수신할 수 있다. 예를 들어, 음성 합성 시스템(100)은 텍스트 입력으로써 도 1에 도시된 바와 같이 “Have a good day!”를 수신할 수 있고, 화자 정보 입력으로써 “화자 1”을 수신할 수 있다. Referring to FIG. 1 , the speech synthesis system 100 may receive text input and specific speaker information. For example, the speech synthesis system 100 may receive “Have a good day!” as a text input as shown in FIG. 1 and may receive “speaker 1” as a speaker information input.

“화자 1”은 기 설정된 화자 1의 발화 특징을 나타내는 음성 신호 또는 음성 샘플에 해당할 수 있다. 예를 들어, 화자 정보는 음성 합성 시스템(100)에 포함된 통신부를 통해 외부 장치로부터 수신될 수 있다. 또는, 화자 정보는 음성 합성 시스템(100)의 사용자 인터페이스를 통해 사용자로부터 입력될 수 있고, 음성 합성 시스템(100)의 데이터 베이스에 미리 저장된 다양한 화자 정보들 중 하나로 선택될 수도 있으나, 이에 제한되는 것은 아니다. “Speaker 1” may correspond to a voice signal or a voice sample representing a preset speech characteristic of speaker 1. For example, speaker information may be received from an external device through a communication unit included in the voice synthesis system 100 . Alternatively, speaker information may be input from a user through the user interface of the speech synthesis system 100 and may be selected from among various types of speaker information pre-stored in the database of the speech synthesis system 100, but is not limited thereto. no.

음성 합성 시스템(100)은 입력으로 수신한 텍스트 입력과 특정 화자 정보에 기초하여 음성(speech)를 출력할 수 있다. 예를 들어, 음성 합성 시스템(100)은 “Have a good day!” 및 “화자 1”을 입력으로 수신하여, 화자 1의 발화 특징이 반영된 “Have a good day!”에 대한 음성을 출력할 수 있다. 화자 1의 발화 특징은 화자 1의 음성, 운율, 음높이 및 감정 등 다양한 요소들 중 적어도 하나를 포함할 수 있다. 즉, 출력되는 음성은 화자 1이 “Have a good day!”를 자연스럽게 발음하는 듯한 음성일 수 있다. 음성 합성 시스템(100)의 구체적인 동작은 도 2 내지 도 4에서 후술한다. The speech synthesis system 100 may output speech based on the received text input and specific speaker information. For example, the speech synthesis system 100 may “Have a good day!” and “Speaker 1” are received as an input, and a voice for “Have a good day!” reflecting the speech characteristics of Speaker 1 may be output. The speech characteristics of speaker 1 may include at least one of various factors such as voice, prosody, pitch, and emotion of speaker 1. That is, the output voice may be a voice as if speaker 1 naturally pronounces “Have a good day!” A detailed operation of the voice synthesis system 100 will be described later with reference to FIGS. 2 to 4 .

도 2는 음성 합성 시스템의 일 실시예를 나타내는 도면이다. 도 2의 음성 합성 시스템(200)은 도 1의 음성 합성 시스템(100)과 동일할 수 있다.2 is a diagram illustrating an embodiment of a speech synthesis system. The voice synthesis system 200 of FIG. 2 may be the same as the voice synthesis system 100 of FIG. 1 .

도 2를 참조하면, 음성 합성 시스템(200)은 화자 인코더(speaker encoder)(210), 합성기(synthesizer)(220) 및 보코더(vocoder)(230)를 포함할 수 있다. 한편, 도 2에 도시된 음성 합성 시스템(200)에는 일 실시예와 관련된 구성요소들만이 도시되어 있다. 따라서, 음성 합성 시스템(200)에는 도 2에 도시된 구성요소들 외에 다른 범용적인 구성요소들이 더 포함될 수 있음은 당해 기술분야의 통상의 기술자에게 자명하다.Referring to FIG. 2 , a speech synthesis system 200 may include a speaker encoder 210 , a synthesizer 220 and a vocoder 230 . Meanwhile, in the voice synthesizing system 200 shown in FIG. 2, only components related to one embodiment are shown. Accordingly, it is obvious to those skilled in the art that the voice synthesis system 200 may further include other general-purpose components in addition to the components shown in FIG. 2 .

도 2의 음성 합성 시스템(200)은 화자 정보 및 텍스트(text)를 입력으로 수신하여 음성(speech)를 출력할 수 있다. The voice synthesis system 200 of FIG. 2 may output speech by receiving speaker information and text as inputs.

예를 들어, 음성 합성 시스템(200)의 화자 인코더(210)는 화자 정보를 입력으로 수신하여 화자 임베딩 벡터(embedding vector)를 생성할 수 있다. 화자 정보는 화자의 음성 신호 또는 음성 샘플에 해당할 수 있다. 화자 인코더(210)는 화자의 음성 신호 또는 음성 샘플을 수신하여, 화자의 발화 특징을 추출할 수 있으며 이를 임베딩 벡터로 나타낼 수 있다. For example, the speaker encoder 210 of the speech synthesis system 200 may receive speaker information as an input and generate a speaker embedding vector. Speaker information may correspond to a speaker's voice signal or voice sample. The speaker encoder 210 may receive the speaker's voice signal or voice sample, extract the speaker's speech characteristics, and represent the speech characteristics as an embedding vector.

화자의 발화 특징은 발화 속도, 휴지 구간, 음높이, 음색, 운율, 억양 또는 감정 등 다양한 요소들 중 적어도 하나를 포함할 수 있다. 즉, 화자 인코더(210)는 화자 정보에 포함된 불연속적인 데이터 값을 연속적인 숫자로 구성된 벡터로 나타낼 수 있다. 예를 들어, 화자 인코더(210)는 pre-net, CBHG 모듈, DNN(Deep Neural Network), CNN(convolutional neural network), RNN(Recurrent Neural Network), LSTM(Long Short-Term Memory Network), BRDNN(Bidirectional Recurrent Deep Neural Network) 등 다양한 인공 신경망 모델 중 적어도 하나 또는 둘 이상의 조합에 기반하여 화자 임베딩 벡터를 생성할 수 있다. The speaker's speech characteristics may include at least one of various factors such as speech speed, pause period, pitch, timbre, prosody, intonation, or emotion. That is, the speaker encoder 210 may represent discontinuous data values included in speaker information as vectors composed of consecutive numbers. For example, the speaker encoder 210 includes a pre-net, a CBHG module, a deep neural network (DNN), a convolutional neural network (CNN), a recurrent neural network (RNN), a long short-term memory network (LSTM), and a BRDNN ( A speaker embedding vector may be generated based on at least one or a combination of two or more of various artificial neural network models such as Bidirectional Recurrent Deep Neural Network).

예를 들어, 음성 합성 시스템(200)의 합성기(220)는 텍스트(text) 및 화자의 발화 특징을 나타내는 임베딩 벡터를 입력으로 수신하여 음성 데이터를 출력할 수 있다. For example, the synthesizer 220 of the speech synthesis system 200 may output speech data by receiving text and an embedding vector representing speech characteristics of a speaker as inputs.

예를 들어, 합성기(220)는 텍스트 인코더(미도시) 및 디코더(미도시)를 포함할 수 있다. 한편, 합성기(220)에는 상술한 구성요소들 외에 다른 범용적인 구성요소들이 더 포함될 수 있음은 당해 기술분야의 통상의 기술자에게 자명하다.For example, synthesizer 220 may include a text encoder (not shown) and a decoder (not shown). Meanwhile, it is apparent to those skilled in the art that the synthesizer 220 may further include other general-purpose components in addition to the above-described components.

화자의 발화 특징을 나타내는 임베딩 벡터는 상술한 바와 같이 화자 인코더(210)로부터 생성될 수 있으며, 합성기(220)의 텍스트 인코더(미도시) 또는 디코더(미도시)는 화자 인코더(210)로부터 화자의 발화 특징을 나타내는 임베딩 벡터를 수신할 수 있다. An embedding vector representing speech characteristics of a speaker may be generated from the speaker encoder 210 as described above, and a text encoder (not shown) or a decoder (not shown) of the synthesizer 220 may generate the speaker's character from the speaker encoder 210. Embedding vectors representing speech characteristics may be received.

합성기(220)의 텍스트 인코더(미도시)는 텍스트를 입력으로 수신하여 텍스트 임베딩 벡터를 생성할 수 있다. 텍스트는 특정 자연 언어로 된 문자들의 시퀀스를 포함할 수 있다. 예를 들어, 문자들의 시퀀스는 알파벳 문자들, 숫자들, 문장 부호들 또는 기타 특수 문자들을 포함할 수 있다. A text encoder (not shown) of synthesizer 220 may receive text as an input and generate a text embedding vector. Text may contain sequences of characters in a particular natural language. For example, a sequence of characters may include alphabetic characters, numbers, punctuation marks, or other special characters.

텍스트 인코더(미도시)는 입력된 텍스트를 자모 단위, 글자 단위 또는 음소 단위로 분리할 수 있고, 분리된 텍스트를 인공 신경망 모델에 입력할 수 있다. 예를 들어, 텍스트 인코더(미도시)는 pre-net, CBHG 모듈, DNN, CNN, RNN, LSTM, BRDNN 등 다양한 인공 신경망 모델 중 적어도 하나 또는 둘 이상의 조합에 기반하여 텍스트 임베딩 벡터를 생성할 수 있다. A text encoder (not shown) may divide input text into consonant units, character units, or phoneme units, and input the separated text into an artificial neural network model. For example, a text encoder (not shown) may generate a text embedding vector based on at least one or a combination of two or more of various artificial neural network models such as pre-net, CBHG module, DNN, CNN, RNN, LSTM, and BRDNN. .

또는, 텍스트 인코더(미도시)는 입력된 텍스트를 복수의 짧은 텍스트들로 분리하고, 짧은 텍스트들 각각에 대하여 복수의 텍스트 임베딩 벡터들을 생성할 수도 있다. Alternatively, the text encoder (not shown) may divide the input text into a plurality of short texts and generate a plurality of text embedding vectors for each of the short texts.

합성기(220)의 디코더(미도시)는 화자 인코더(210)로부터 화자 임베딩 벡터 및 텍스트 임베딩 벡터를 입력으로 수신할 수 있다. 또는, 합성기(220)의 디코더(미도시)는 화자 인코더(210)로부터 화자 임베딩 벡터를 입력으로 수신하고, 텍스트 인코더(미도시)로부터 텍스트 임베딩 벡터를 입력으로 수신할 수 있다. A decoder (not shown) of the synthesizer 220 may receive the speaker embedding vector and the text embedding vector from the speaker encoder 210 as inputs. Alternatively, the decoder (not shown) of the synthesizer 220 may receive a speaker embedding vector from the speaker encoder 210 as an input and a text embedding vector from a text encoder (not shown) as an input.

디코더(미도시)는 화자 임베딩 벡터와 텍스트 임베딩 벡터를 인공 신경망 모델에 입력하여, 입력된 텍스트에 대응되는 음성 데이터를 생성할 수 있다. 즉, 디코더(미도시)는 화자의 발화 특징이 반영된 입력 텍스트에 대한 음성 데이터를 생성할 수 있다. 예를 들면, 음성 데이터는 입력된 텍스트에 대응되는 스펙트로그램(spectrogram) 또는 멜 스펙트로그램(mel-spectrogram)에 해당할 수 있으나, 이에 제한되는 것은 아니다. 다시 말해, 스펙트로그램 또는 멜 스펙트로그램은 특정 자연 언어로 구성된 문자들의 시퀀스(sequence)의 구두 발화(verbal utterance)에 대응한다.A decoder (not shown) may generate voice data corresponding to the input text by inputting the speaker embedding vector and the text embedding vector to the artificial neural network model. That is, a decoder (not shown) may generate voice data for input text in which speech characteristics of a speaker are reflected. For example, the voice data may correspond to a spectrogram or a mel-spectrogram corresponding to input text, but is not limited thereto. In other words, a spectrogram or mel spectrogram corresponds to a verbal utterance of a sequence of characters composed of a particular natural language.

스펙트로그램은 음성 신호의 스펙트럼을 시각화하여 그래프로 표현한 것이다. 스펙트로그램의 x축은 시간, y축은 주파수를 나타내며 각 시간당 주파수가 가지는 값을 값의 크기에 따라 색으로 표현할 수 있다. 스펙토그램은 연속적으로 주어지는 음성 신호에 STFT(Short-time Fourier transform)를 수행한 결과물일 수 있다. A spectrogram is a graph that visualizes the spectrum of a voice signal. The x-axis of the spectrogram represents time, and the y-axis represents frequency, and the value of each frequency per time can be expressed in color according to the size of the value. The spectogram may be a result of performing short-time Fourier transform (STFT) on a continuously given audio signal.

STFT는 음성 신호를 일정한 길이의 구간들로 나누고 각 구간에 대하여 푸리에 변환을 적용하는 방법이다. 이 때, 음성 신호에 STFT를 수행한 결과물은 복소수 값이기 때문에, 복소수 값에 절대값을 취해 위상(phase) 정보를 소실시키고 크기(magnitude) 정보만을 포함하는 스펙트로그램을 생성할 수 있다. STFT is a method of dividing a speech signal into sections of a certain length and applying a Fourier transform to each section. At this time, since the result of performing the STFT on the voice signal is a complex value, it is possible to generate a spectrogram including only magnitude information by taking an absolute value of the complex value to lose phase information.

한편, 멜 스펙트로그램은 스펙트로그램의 주파수 간격을 멜 스케일(Mel Scale)로 재조정한 것이다. 사람의 청각기관은 고주파수(high frequency) 보다 저주파수(low frequency) 대역에서 더 민감하며, 이러한 특성을 반영해 물리적인 주파수와 실제 사람이 인식하는 주파수의 관계를 표현한 것이 멜 스케일이다. 멜 스펙트로그램은 멜 스케일에 기반한 필터 뱅크(filter bank)를 스펙트로그램에 적용하여 생성될 수 있다.Meanwhile, the mel spectrogram is obtained by re-adjusting the frequency interval of the spectrogram to a mel scale. The human auditory organ is more sensitive in the low frequency band than the high frequency band, and the Mel scale reflects this characteristic and expresses the relationship between the physical frequency and the frequency perceived by the actual person. The Mel spectrogram may be generated by applying a filter bank based on the Mel scale to the spectrogram.

한편, 도 2에는 도시되어 있지 않으나, 합성기(220)는 어텐션 얼라이먼트(attention alignment)를 생성하기 위한 어텐션 모듈을 더 포함할 수 있다. 어텐션 모듈은 디코더(미도시)의 특정 타임 스텝(time-step)의 출력이 텍스트 인코더(미도시)의 모든 타임 스텝의 출력 중 어떤 출력과 가장 연관이 있는가를 학습하는 모듈이다. 어텐션 모듈을 이용하여 더 고품질의 스펙트로그램 또는 멜 스펙트로그램을 출력할 수 있다. Meanwhile, although not shown in FIG. 2 , the synthesizer 220 may further include an attention module for generating an attention alignment. The attention module is a module that learns which output of a specific time-step of a decoder (not shown) is most related to an output of all time-steps of a text encoder (not shown). A higher quality spectrogram or MEL spectrogram can be output by using the attention module.

도 3은 합성기를 통해 멜 스펙트로그램을 출력하는 일 실시예를 나타내는 도면이다. 도 3의 합성기(300)는 도 2의 합성기(220)와 동일할 수 있다.3 is a diagram illustrating an embodiment of outputting a Mel spectrogram through a synthesizer. The synthesizer 300 of FIG. 3 may be the same as the synthesizer 220 of FIG. 2 .

도 3을 참조하면, 합성기(300)는 입력 텍스트들과 이에 대응되는 화자 임베딩 벡터들을 포함하는 리스트를 수신할 수 있다. 예를 들어, 합성기(300)는 'first sentence'라는 입력 텍스트와 이에 대응되는 화자 임베딩 벡터인 embed_voice1, 'second sentence'라는 입력 텍스트와 이에 대응되는 화자 임베딩 벡터인 embed_voice2, 'third sentence'라는 입력 텍스트와 이에 대응되는 화자 임베딩 벡터인 embed_voice3을 포함하는 리스트(310)를 입력으로 수신할 수 있다.Referring to FIG. 3 , the synthesizer 300 may receive a list including input texts and speaker embedding vectors corresponding thereto. For example, the synthesizer 300 inputs the input text 'first sentence', the corresponding speaker embedding vector embed_voice1, the input text 'second sentence' and the corresponding speaker embedding vector embed_voice2, and the corresponding input text 'third sentence' and a list 310 including embed_voice3, which is a speaker embedding vector corresponding thereto, may be received as an input.

합성기(300)는 수신한 리스트(310)에 포함된 입력 텍스트의 개수만큼의 멜 스펙트로그램(310)을 생성할 수 있다. 도 3을 참고하면, 'first sentence', 'second sentence' 및 'third sentence' 각각의 입력 텍스트에 대응하는 멜 스펙트로그램들이 생성된 것을 알 수 있다.The combiner 300 may generate as many mel spectrograms 310 as the number of input texts included in the received list 310 . Referring to FIG. 3 , it can be seen that Mel spectrograms corresponding to each input text of 'first sentence', 'second sentence', and 'third sentence' are generated.

또는, 합성기(300)는 입력 텍스트의 개수만큼의 멜 스펙트로그램(320) 및 어텐션 얼라인먼트를 함께 생성할 수 있다. 도 3에는 도시되어 있지 않으나, 예를 들어 'first sentence', 'second sentence' 및 'third sentence' 각각의 입력 텍스트에 대응하는 어텐션 얼라인먼트가 추가적으로 생성될 수 있다. 또는, 합성기(300)는 입력 텍스트들 각각에 대하여 복수의 멜 스펙트로그램 및 복수의 어텐션 얼라인먼트를 생성할 수도 있다. Alternatively, the synthesizer 300 may generate as many mel spectrograms 320 and attention alignment as the number of input texts. Although not shown in FIG. 3 , for example, attention alignment corresponding to input texts of 'first sentence', 'second sentence', and 'third sentence' may be additionally generated. Alternatively, the synthesizer 300 may generate a plurality of MEL spectrograms and a plurality of attention alignments for each of the input texts.

다시 도 2를 참조하면, 음성 합성 시스템(200)의 보코더(230)는 합성기(220)에서 출력된 음성 데이터를 실제 음성(speech)으로 생성할 수 있다. 상술한 바와 같이 출력된 음성 데이터는 스펙트로그램 또는 멜 스펙트로그램일 수 있다. Referring back to FIG. 2 , the vocoder 230 of the voice synthesis system 200 may generate voice data output from the synthesizer 220 into actual voice. Voice data output as described above may be a spectrogram or a mel spectrogram.

예를 들어, 보코더(230)는 ISTFT(Inverse Short-Time Fourier Transform)를 이용하여 합성기(220)에서 출력된 음성 데이터를 실제 음성 신호로 생성할 수 있다. 그러나, 스펙트로그램 또는 멜 스펙트로그램은 위상 정보를 포함하고 있지 않으므로, ISTFT만으로는 실제 음성 신호를 완벽하게 복원할 수 없다. For example, the vocoder 230 may generate an actual voice signal from voice data output from the synthesizer 220 using Inverse Short-Time Fourier Transform (ISTFT). However, since the spectrogram or MEL spectrogram does not contain phase information, the ISTFT alone cannot perfectly restore the actual speech signal.

이에 따라, 보코더(230)는 예를 들어 그리핀-림 알고리즘(Griffin-Lim algorithm)을 사용하여 합성기(220)에서 출력된 음성 데이터를 실제 음성 신호로 생성할 수 있다. 그리핀-림 알고리즘은 스펙트로그램 또는 멜 스펙트로그램의 크기 정보에서 위상 정보 추정하는 알고리즘이다. Accordingly, the vocoder 230 may generate voice data output from the synthesizer 220 as an actual voice signal using, for example, a Griffin-Lim algorithm. The Griffin-Rim algorithm is an algorithm for estimating phase information from magnitude information of a spectrogram or a Mel spectrogram.

또는, 보코더(230)는 예를 들어 뉴럴 보코더(neural vocoder)에 기 초하여 합성기(220)에서 출력된 음성 데이터를 실제 음성 신호로 생성할 수 있다. Alternatively, the vocoder 230 may generate an actual voice signal from voice data output from the synthesizer 220 based on, for example, a neural vocoder.

뉴럴 보코더는 스펙트로그램 또는 멜 스펙트로그램을 입력으로 받아 음성 신호를 생성하는 인공 신경망 모델이다. 뉴럴 보코더는 스펙트로그램 또는 멜 스펙트로그램과 음성 신호 사이의 관계를 다량의 데이터를 통해 학습할 수 있고, 이를 통해 고품질의 실제 음성 신호를 생성할 수 있다. A neural vocoder is an artificial neural network model that generates a voice signal by receiving a spectrogram or a mel spectrogram as an input. The neural vocoder can learn a relationship between a spectrogram or a MEL spectrogram and a voice signal through a large amount of data, and through this, it can generate a real voice signal of high quality.

뉴럴 보코더는 WaveNet, Parallel WaveNet, WaveRNN, WaveGlow 또는 MelGAN 등과 같은 인공 신경망 모델에 기반한 보코더에 해당할 수 있으나, 이에 제한되는 것은 아니다. The neural vocoder may correspond to a vocoder based on an artificial neural network model such as WaveNet, Parallel WaveNet, WaveRNN, WaveGlow, or MelGAN, but is not limited thereto.

예를 들어, WaveNet 보코더는 여러 층의 dilated causal convolution layer들로 구성되며, 음성 샘플들 간의 순차적 특징을 이용하는 자기회귀(Autoregressive) 모델이다. 예를 들어, WaveRNN 보코더는 WaveNet의 여러 층의 dilated causal convolution layer를 GRU(Gated Recurrent Unit)로 대체한 자기회귀 모델이다.For example, a WaveNet vocoder is composed of several dilated causal convolution layers and is an autoregressive model using sequential features between voice samples. For example, the WaveRNN vocoder is an autoregressive model in which several dilated causal convolution layers of WaveNet are replaced with GRU (Gated Recurrent Unit).

예를 들어, WaveGlow 보코더는 가역성(invertible)을 지닌 변환 함수를 이용하여 음성 데이터셋(x)으로부터 가우시안 분포와 같이 단순한 분포가 나오도록 학습할 수 있다. WaveGlow 보코더는 학습이 끝난 후 변환 함수의 역함수를 이용하여 가우시안 분포의 샘플로부터 음성 신호를 출력할 수 있다. For example, the WaveGlow vocoder can learn to produce a simple distribution such as a Gaussian distribution from a voice dataset (x) using an invertible transform function. After learning, the WaveGlow vocoder can output a voice signal from Gaussian distribution samples using the inverse function of the conversion function.

도 2 및 도 3을 참조하여 상술한 바와 같이, 합성기(220, 300)는 어텐션 얼라인먼트를 생성할 수 있다. 구체적으로, 어텐션 얼라인먼트는 스펙트로그램(또는 멜 스펙트로그램)에 대응하여 생성될 수 있다. 예를 들어, 합성기(220, 300)가 총 x 개의 스펙트로그램(또는 멜 스펙트로그램)을 생성하는 경우, 어텐션 얼라인먼트는 x 개의 스펙트로그램들 각각에 대응하여 생성될 수 있다. 따라서, 어텐션 얼라인먼트를 통하여 이에 대응하는 스펙트로그램(또는 멜 스펙트로그램)의 품질이 판단될 수 있다.As described above with reference to FIGS. 2 and 3 , the synthesizers 220 and 300 may generate attention alignment. Specifically, the attention alignment may be generated corresponding to the spectrogram (or MEL spectrogram). For example, when the synthesizers 220 and 300 generate a total of x spectrograms (or MEL spectrograms), attention alignment may be generated corresponding to each of the x spectrograms. Accordingly, the quality of the corresponding spectrogram (or MEL spectrogram) may be determined through the attention alignment.

일 실시예에 따른 합성기(220, 300)는 입력 텍스트 및 화자 임베딩 벡터로 구성된 단일 입력 쌍(pair)에 대하여 복수의 스펙트로그램들(또는 멜 스펙트로그램들)을 생성할 수 있다. 또한, 합성기(220, 300)는 복수의 스펙트로그램들(또는 멜 스펙트로그램들) 각각에 대응하는 어텐션 얼라인먼트의 스코어를 연산할 수 있다. 이에 따라, 합성기(220, 300)는 연산된 스코어에 기초하여 복수의 스펙트로그램들(또는 멜 스펙트로그램들) 중 어느 하나를 선택할 수 있다. 여기에서, 선택된 스펙트로그램(또는 멜 스펙트로그램)은 단일 입력 쌍에 대하여 가장 높은 품질의 합성 음성을 나타내는 것일 수 있다.The synthesizers 220 and 300 according to an embodiment may generate a plurality of spectrograms (or mel spectrograms) with respect to a single input pair composed of an input text and a speaker embedding vector. Also, the synthesizers 220 and 300 may calculate an attention alignment score corresponding to each of a plurality of spectrograms (or MEL spectrograms). Accordingly, the synthesizers 220 and 300 may select one of a plurality of spectrograms (or MEL spectrograms) based on the calculated score. Here, the selected spectrogram (or mel spectrogram) may represent the highest quality synthesized speech for a single input pair.

이하, 도 4 내지 도 11을 참조하여, 합성기(220, 300)가 어텐션 얼라인먼트의 스코어를 연산하는 예들을 설명한다. 이하에서, 합성기(220, 300)가 어텐션 얼라인먼트의 스코어를 연산하는 것으로 서술하나, 어텐션 얼라인먼트의 스코어를 연산하는 모듈은 합성기(220, 300)가 아닐 수도 있다. 예를 들어, 음성 합성 시스템(200)에 포함된 별도의 모듈 또는 음성 합성 시스템(200)과 분리된 다른 모듈에 의하여 어텐션 얼라인먼트의 스코어가 연산될 수도 있다.Hereinafter, examples in which the synthesizers 220 and 300 calculate an attention alignment score will be described with reference to FIGS. 4 to 11 . Hereinafter, although the synthesizers 220 and 300 are described as calculating the attention alignment score, the module that calculates the attention alignment score may not be the synthesizer 220 and 300. For example, the attention alignment score may be calculated by a separate module included in the speech synthesis system 200 or another module separate from the speech synthesis system 200 .

또한, 이하에서, 스펙트로그램과 멜 스펙트로그램은 서로 혼용될 수 있는 용어로 기재한다. 다시 말해, 이하에서 스펙트로그램으로 기재되었다고 하더라도, 이는 멜 스펙트로그램으로 대체될 수도 있다. 또한, 이하에서, 멜 스펙트로그램으로 기재되었다고 하더라도, 이는 스펙트로그램으로 대체될 수도 있다.In addition, in the following, a spectrogram and a mel spectrogram are described as interchangeable terms. In other words, although described as a spectrogram below, it may be replaced with a Mel spectrogram. In addition, although it is described as a Mel spectrogram in the following, it may be replaced with a spectrogram.

도 4a 및 도 4b는 멜 스펙트로그램과 어텐션 얼라인먼트의 일 예를 도시한 도면들이다.4A and 4B are diagrams illustrating an example of a Mel spectrogram and attention alignment.

도 4a에는 어떤 입력 쌍(입력 텍스트 및 화자 임베딩 벡터)에 따라 합성기(220, 300)가 생성한 멜 스펙트로그램의 예가 도시되어 있다. 또한, 도 4b에는 도 4a의 멜 스펙트로그램에 대응하는 어텐션 얼라인먼트가 도시되어 있다.4A shows an example of a Mel spectrogram generated by the synthesizers 220 and 300 according to a certain input pair (input text and speaker embedding vector). In addition, FIG. 4B shows attention alignment corresponding to the MEL spectrogram of FIG. 4A.

예를 들어, 데이터의 양이 많지 않거나 충분한 학습이 되지 않을 경우 합성기(220, 300)는 고품질의 멜 스펙트로그램을 생성하지 못할 수도 있다. 어텐션 얼라인먼트는, 합성기(220, 300)가 멜 스펙트로그램을 생성할 때에 집중하는 매 순간마다의 히스토리로 해석될 수 있다. For example, if the amount of data is not large or sufficient learning is not performed, the synthesizers 220 and 300 may not be able to generate high-quality Mel spectrograms. Attention alignment can be interpreted as a history of every moment that the synthesizers 220 and 300 focus on when generating the MEL spectrogram.

예를 들어, 어텐션 얼라인먼트를 나타내는 선이 진하고 노이즈가 적다면, 합성기(220, 300)가 멜 스펙트로그램을 생성하는 매 순간에서 자신감 있게 추론을 수행한 것으로 해석될 수 있다. 즉, 상술한 예의 경우, 합성기(220, 300)가 고품질의 멜 스펙트로그램을 생성했다고 판단될 수 있다. 따라서, 어텐션 얼라인먼트의 품질(예를 들어, 어텐션 얼라인먼트의 색이 진한 정도, 어텐션 얼라인먼트의 윤곽이 명확한 정도 등)은 합성기(220, 300)의 추론 품질을 추측하는데 있어서, 매우 중요한 지표로 활용될 수 있다.For example, if the line representing the attention alignment is thick and the noise is small, it can be interpreted that the synthesizers 220 and 300 confidently performed inference at every moment of generating the Mel spectrogram. That is, in the case of the above example, it can be determined that the synthesizers 220 and 300 have generated a high-quality Mel spectrogram. Therefore, the quality of attention alignment (for example, the degree of darkness of the attention alignment, the degree of clarity of the attention alignment, etc.) can be used as a very important indicator in estimating the inference quality of the synthesizers 220 and 300. there is.

도 5a 및 도 5b는 어텐션 얼라인먼트의 품질을 설명하기 위한 도면들이다.5A and 5B are diagrams for explaining the quality of attention alignment.

도 5a 내지 도 5d에는 동일한 입력 쌍(입력 텍스트 및 화자 임베딩 벡터)에 대응하는 어텐션 얼라인먼트들이 도시되어 있다. 5A to 5D show attention alignments corresponding to the same input pair (input text and speaker embedding vector).

도 5a를 참조하면, 어텐션 얼라인먼트의 중간 부분(510)이 생성되지 않은 예가 도시되어 있다. 즉, 도 5a의 어텐션 얼라인먼트에 따르면, 이에 대응하는 멜 스펙트로그램의 품질이 낮은 것으로 해석될 수 있다. Referring to FIG. 5A , an example in which the middle portion 510 of the attention alignment is not generated is illustrated. That is, according to the attention alignment of FIG. 5A , the quality of the corresponding MEL spectrogram may be interpreted as being low.

도 5b를 참조하면, 도 5a의 어텐션 얼라인먼트와 비교하여, 비교적 나은 품질의 어텐션 얼라인먼트가 도시되어 있다. 즉, 도 5b의 어텐션 얼라인먼트에 대응하는 멜 스펙트로그램은 도 5a의 어텐션 얼라인먼트에 대응하는 멜 스펙트로그램보다는 품질이 높은 것으로 해석될 수 있다. 다만, 도 5b의 어텐션 얼라인먼트의 경우에도, 중간 부분(520)에 명확하지 않은 부분이 포함되어 있는바, 멜 스펙트로그램의 품질이 매우 높지 않은 것으로 해석될 수 있다.Referring to FIG. 5B , compared to the attention alignment of FIG. 5A , attention alignment of relatively better quality is shown. That is, the Mel spectrogram corresponding to the attention alignment of FIG. 5B may be interpreted as having higher quality than the Mel spectrogram corresponding to the attention alignment of FIG. 5A. However, even in the case of the attention alignment of FIG. 5B, since an unclear portion is included in the middle portion 520, it can be interpreted that the quality of the Mel spectrogram is not very high.

도 5a 및 도 5b에 도시된 어텐션 얼라인먼트들이 생성된 경우, 이에 대응하는 멜 스펙트로그램의 품질이 높지 않은 것으로 판단되어야 한다. 일 실시예에 따른 합성기(220, 300)는 어텐션 얼라인먼트의 스코어에 기초하여 어텐션 얼라인먼트의 품질을 판단한다. 즉, 합성기(220, 300)는 어텐션 얼라인먼트의 스코어에 따라 멜 스펙트로그램의 품질을 판단할 수 있다.When the attention alignments shown in FIGS. 5A and 5B are generated, it should be determined that the quality of the corresponding MEL spectrogram is not high. The synthesizers 220 and 300 according to an embodiment determine the quality of the attention alignment based on the score of the attention alignment. That is, the synthesizers 220 and 300 may determine the quality of the MEL spectrogram according to the attention alignment score.

예를 들어, 합성기(220, 300)는 어텐션 얼라인먼트의 인코더 스코어(encoder score) 및 디코더 스코어(decoder score)를 연산할 수 있다. 그리고, 합성기(220, 300)는 인코더 스코어 및 디코더 스코어를 조합하여 어텐션 얼라인먼트의 전체 스코어(total score)를 연산할 수 있다.For example, the synthesizers 220 and 300 may calculate an encoder score and a decoder score of attention alignment. Then, the synthesizers 220 and 300 may calculate a total score of attention alignment by combining the encoder score and the decoder score.

인코더 스코어, 디코더 스코어 및 전체 스코어 중 어느 하나에 의하여 어텐션 얼라인먼트의 품질이 판단될 수 있다. 따라서, 합성기(220, 300)는 필요에 따라 인코더 스코어, 디코더 스코어 및 전체 스코어 중 어느 하나를 연산할 수 있다.The quality of attention alignment may be determined by any one of an encoder score, a decoder score, and a total score. Accordingly, the synthesizers 220 and 300 may calculate any one of an encoder score, a decoder score, and a total score as needed.

도 6은 어텐션 얼라인먼트를 나타내는 좌표 축들 및 어텐션 얼라인먼트의 품질을 설명하기 위한 도면이다.6 is a diagram for describing coordinate axes representing attention alignment and quality of attention alignment.

도 6을 참조하면, 어텐션 얼라인먼트가 2차원 좌표에 도시되어 있다. 이 때, 2차원 좌표의 가로 축은 디코더 타임 스텝(decoder timestep), 세로 축은 인코더 타임 스텝(encoder timestep)을 의미한다. 즉, 어텐션 얼라인먼트가 표현되는 2차원 좌표는, 합성기(220, 300)가 멜 스펙트로그램을 생성할 때, 어떤 부분에 집중해야 하는지를 의미한다.Referring to FIG. 6 , attention alignment is shown in two-dimensional coordinates. At this time, the horizontal axis of the two-dimensional coordinates means a decoder time step, and the vertical axis means an encoder time step. That is, the two-dimensional coordinates representing the attention alignment mean which part should be focused when the synthesizers 220 and 300 generate the MEL spectrogram.

디코더 타임 스텝은 합성기(220, 300)가 입력 텍스트에 포함된 음소들 각각을 발화하기 위하여 투자한 시간을 의미한다. 디코더 타임 스텝은 단일 홉 사이즈에 대응하는 시간 간격으로 배열되어 있고, 단일 홉 사이즈는 1/80초를 의미한다.The decoder time step means the time invested by the synthesizers 220 and 300 to utter each phoneme included in the input text. The decoder time steps are arranged in time intervals corresponding to a single hop size, and a single hop size means 1/80 second.

인코더 타임 스텝은 입력 텍스트에 포함된 음소에 대응한다. 예를 들어, 입력 텍스트가 'first sentence'인 경우, 인코더 타임 스텝은 'f', 'i', 'r', 's', 't', '', 's', 'e', 'n', 't', 'e', 'n', 'c', 'e'로 구성될 수 있다.Encoder time steps correspond to phonemes included in the input text. For example, if the input text is 'first sentence', the encoder time steps are 'f', 'i', 'r', 's', 't', '', 's', 'e', ' It may consist of n', 't', 'e', 'n', 'c', and 'e'.

도 6을 참조하면, 어텐션 얼라인먼트를 구성하는 포인트들 각각은 특정 컬러로 표현되어 있다. 여기에서, 컬러는 그에 대응하는 특정 값으로 매칭될 수 있다. 예를 들어, 어텐션 얼라인먼트를 구성하는 컬러들 각각은 확률 분포를 나타내는 값으로서, 0 ~ 1 사이의 값일 수 있다.Referring to FIG. 6 , each of the points constituting the attention alignment is represented by a specific color. Here, the color may be matched with a specific value corresponding thereto. For example, each of the colors constituting the attention alignment is a value representing a probability distribution, and may be a value between 0 and 1.

도 7은 합성기가 인코더 스코어를 연산하는 예를 설명하기 위한 도면이다.7 is a diagram for explaining an example in which a synthesizer calculates an encoder score.

도 7을 참조하면, 어텐션 얼라인먼트에서 디코더 타임 스텝의 '50'에 대응하는 값들(710)이 표시되어 있다. 어텐션 얼라인먼트는 각각의 softmax 결과 값을 기록하여 transpose 하였기 때문에, 디코더 타임 스텝을 구성하는 단일 스텝에 해당하는 값들을 모두 더하면 1이다. 즉, 도 7의 값들(710)을 모두 더하면 1이 된다. Referring to FIG. 7 , values 710 corresponding to '50' of the decoder time step in the attention alignment are displayed. Since Attention Alignment records and transposes each softmax result value, the sum of all values corresponding to a single step constituting the decoder time step is 1. That is, the sum of all the values 710 of FIG. 7 becomes 1.

한편, 값들(710) 중 상위 a 개의 값들(720)을 참조하면, 합성기(220, 300)가 디코더 타임 스텝의 '50'에 대응하는 시점에 어느 음소에 집중하여 멜 스펙트로그램을 생성하고 있는지를 판단할 수 있다. 따라서, 합성기(220, 300)는 디코더 타임 스텝을 구성하는 각각의 스텝들에 대하여 인코더 스코어를 연산함으로써, 멜 스펙트로그램이 입력 텍스트를 적절하게 표현하였는지 여부(즉, 멜 스펙트로그램의 품질)를 확인할 수 있다.On the other hand, referring to the upper a number of values 720 among the values 710, it is determined which phoneme the synthesizers 220 and 300 focus on to generate the mel spectrogram at the time point corresponding to '50' of the decoder time step. can judge Accordingly, the synthesizers 220 and 300 calculate encoder scores for each of the steps constituting the decoder time step to determine whether the mel spectrogram appropriately represents the input text (ie, the quality of the mel spectrogram). can

예를 들어, 합성기(220, 300)는 아래의 수학식 1에 기초하여 인코더 스코어를 연산할 수 있다.For example, the synthesizers 220 and 300 may calculate an encoder score based on Equation 1 below.

Figure 112020126334634-pat00001
Figure 112020126334634-pat00001

수학식 1에서,

Figure 112020126334634-pat00002
는 어텐션 얼라인먼트(aligndecoder)에서 디코더 타임 스텝을 기준으로 s 번째 스텝의 i번째 상위 값을 나타낸다(s 및 i는 1 이상의 자연수).In Equation 1,
Figure 112020126334634-pat00002
represents the i-th upper value of the s-th step based on the decoder time step in the attention alignment (align decoder ) (s and i are natural numbers greater than or equal to 1).

즉, 합성기(220, 300)는 디코더 타입 스텝의 제s 스텝에서의 값들 중에서 n 개의 값들을 추출한다(n은 2 이상의 자연수). 여기에서, n개의 값들은 제s 스텝에서의 상위 n개의 값들을 의미할 수 있다.That is, the synthesizers 220 and 300 extract n values from among the values in the s-th step of the decoder type step (n is a natural number greater than or equal to 2). Here, the n values may mean top n values in the s th step.

그리고, 합성기(220, 300)는 추출된 n 개의 값들을 이용하여 제s 스텝에서의 제s 스코어(

Figure 112020126334634-pat00003
)를 연산한다. 예를 들어, 합성기(220, 300)는 추출된 n 개의 값들을 더하여 제s 스코어(
Figure 112020126334634-pat00004
)를 연산할 수 있다.Then, the synthesizers 220 and 300 use the extracted n values to obtain the s score in the s th step (
Figure 112020126334634-pat00003
) is computed. For example, the synthesizers 220 and 300 add the extracted n values to the s score (
Figure 112020126334634-pat00004
) can be computed.

이러한 방식으로, 합성기(220, 300)는 디코더 타임 스텝에서 스펙트로그램의 처음에 대응하는 스텝부터 마지막에 대응하는 스텝까지의 인코더 스코어를 각각 연산한다. 그리고, 합성기(220, 300)는 연산된 인코더 스코어와 소정의 값을 비교하여 멜 스펙트로그램의 품질을 평가할 수 있다. 합성기(220, 300)가 인코더 스코어에 기초하여 멜 스펙트로그램의 품질을 평가하는 예는 도 10을 참조하여 후술한다.In this way, the synthesizers 220 and 300 respectively compute encoder scores from the step corresponding to the beginning of the spectrogram to the step corresponding to the end in the decoder time step. Then, the synthesizers 220 and 300 may evaluate the quality of the mel spectrogram by comparing the calculated encoder score with a predetermined value. An example in which the synthesizers 220 and 300 evaluate the quality of the MEL spectrogram based on the encoder score will be described later with reference to FIG. 10 .

도 8은 합성기가 디코더 스코어를 연산하는 예를 설명하기 위한 도면이다.8 is a diagram for explaining an example in which a synthesizer calculates a decoder score.

도 8을 참조하면, 어텐션 얼라인먼트에서 인코더 타임 스텝의 '10'에 대응하는 값들(810)이 표시되어 있다. 또한, 값들(810) 중에서 상위 b개의 값들(820)이 표시되어 있다.Referring to FIG. 8 , values 810 corresponding to '10' of the encoder time step in the attention alignment are displayed. Also, among the values 810, top b values 820 are displayed.

도 7을 참조하여 상술한 바와 같이, 인코더 스코어가 디코더 타임 스텝을 구성하는 각각의 스텝에서의 값들로 연산된다. 반면에, 디코더 스코어는 디코더 타임 스텝을 구성하는 각각의 스텝에서의 값들로 연산된다. 인코더 스코어와 디코더 스코어의 목적은 서로 다르다. 구체적으로, 인코더 스코어는 어텐션 모듈이 매 시간마다 집중해야 할 음소를 잘 결정하였는가를 판단하는 지표이다. 반면에, 디코더 스코어는 어텐션 모듈이 입력 텍스트를 구성하는 특정 음소에 대해서 시간 할당을 누락하지 않고 잘 집중하였는가를 판단하는 지표이다.As described above with reference to FIG. 7, the encoder score is calculated with values at each step constituting the decoder time step. On the other hand, the decoder score is calculated with the values at each step constituting the decoder time step. Encoder scores and decoder scores have different purposes. Specifically, the encoder score is an index for determining whether the attention module has well determined the phoneme to be focused on every hour. On the other hand, the decoder score is an indicator for determining whether the attention module has focused well on specific phonemes constituting the input text without missing time allocation.

Figure 112020126334634-pat00005
Figure 112020126334634-pat00005

수학식 2에서,

Figure 112020126334634-pat00006
는 어텐션 얼라인먼트(alignencoder)에서 인코더 타임 스텝을 기준으로 s번째 스텝의 i번째 상위 값을 나타낸다(s 및 i는 1 이상의 자연수).In Equation 2,
Figure 112020126334634-pat00006
represents the i-th upper value of the s-th step based on the encoder time step in the attention alignment (align encoder ) (s and i are natural numbers greater than or equal to 1).

즉, 합성기(220, 300)는 인코더 타입 스텝의 제s 스텝에서의 값들 중에서 m 개의 값들을 추출한다(m은 2 이상의 자연수). 여기에서, m 개의 값들은 제s 스텝에서의 상위 m개의 값들을 의미할 수 있다.That is, the synthesizers 220 and 300 extract m values from values in the s th step of the encoder type step (m is a natural number greater than or equal to 2). Here, m values may mean top m values in the s th step.

그리고, 합성기(220, 300)는 추출된 m 개의 값들을 이용하여 제s 스텝에서의 제s 스코어(

Figure 112020126334634-pat00007
)를 연산한다. 예를 들어, 합성기(220, 300)는 추출된 m 개의 값들을 더하여 제s 스코어(
Figure 112020126334634-pat00008
)를 연산할 수 있다.Then, the synthesizers 220 and 300 use the extracted m values to score the s in the s step (
Figure 112020126334634-pat00007
) is computed. For example, the synthesizers 220 and 300 add the extracted m values to the s score (
Figure 112020126334634-pat00008
) can be computed.

이러한 방식으로, 합성기(220, 300)는 인코더 타임 스텝에서 스펙트로그램의 처음에 대응하는 스텝부터 마지막에 대응하는 스텝까지의 디코더 스코어를 각각 연산한다. 그리고, 합성기(220, 300)는 연산된 디코더 스코어와 소정의 값을 비교하여 멜 스펙트로그램의 품질을 평가할 수 있다. 합성기(220, 300)가 디코더 스코어에 기초하여 멜 스펙트로그램의 품질을 평가하는 예는 도 10을 참조하여 후술한다.In this way, the synthesizers 220 and 300 respectively compute decoder scores from the step corresponding to the beginning of the spectrogram to the step corresponding to the end in the encoder time step. Then, the synthesizers 220 and 300 may evaluate the quality of the mel spectrogram by comparing the calculated decoder score with a predetermined value. An example in which the synthesizers 220 and 300 evaluate the quality of the mel spectrogram based on the decoder score will be described later with reference to FIG. 10 .

즉, 디코더 스코어는, 어텐션 얼라인먼트에서 인코더 타임 스텝에서 상위 m개를 더한 값으로 연산된다. 이는, 음성 합성 시스템이 입력 텍스트를 구성하는 음소들 각각을 말하는데 얼마만큼의 에너지를 썼는지에 대한 지표가 될 수 있다.That is, the decoder score is calculated as a value obtained by adding the upper m number of encoder time steps in the attention alignment. This may be an indicator of how much energy the speech synthesis system uses to speak each phoneme constituting the input text.

도 9는 어텐션 얼라인먼트에서 유효한 의미를 갖는 부분을 추출하는 예를 설명하기 위한 도면이다.9 is a diagram for explaining an example of extracting a part having a valid meaning from attention alignment.

디코더 타임 스텝의 길이는 멜 스펙트럼의 길이와 동일하다. 따라서, 어텐션 얼라인먼트에서 유효한 의미를 갖는 부분은 멜 스펙트럼의 길이에 대응된다.The length of the decoder time step is equal to the length of the mel spectrum. Accordingly, a part having a valid meaning in the attention alignment corresponds to the length of the Mel spectrum.

한편, 인코더 타임 스텝은 입력 텍스트를 구성하는 음소들의 길이이다. 따라서, 어텐션 얼라인먼트에서 유효한 의미를 갖는 부분은 텍스트를 음소로 분해한 결과에 대응하는 길이에 대응된다.Meanwhile, the encoder time step is the length of phonemes constituting the input text. Therefore, the part having a valid meaning in the attention alignment corresponds to the length corresponding to the result of decomposing the text into phonemes.

도 10a 내지 도 10c는 어텐션 얼라인먼트의 품질과 인코더 스코어 및 디코더 스코어의 관계를 설명하기 위한 도면들이다.10A to 10C are diagrams for explaining the relationship between the quality of attention alignment and an encoder score and a decoder score.

도 10a는 어텐션 얼라인먼트를 의미하고, 도 10b는 도 10a의 어텐션 얼라인먼트의 인코더 스코어를 의미하고, 도 10c는 도 10a의 어텐션 얼라인먼트의 디코더 스코어를 의미한다.FIG. 10A means attention alignment, FIG. 10B means attention alignment encoder score of FIG. 10A, and FIG. 10C means attention alignment decoder score of FIG. 10A.

도 10a를 참조하면, 제1 부분(1010) 및 제2 부분(1020)에서 어텐션 얼라인먼트의 품질이 낮음을 알 수 있다. 구체적으로, 제1 부분(1010)은 입력 텍스트에 포함된 특정 음소에 대하여 집중되지 못한 것으로 나타나고, 제2 부분(1020)은 멜 스펙트로그램이 생성되는 특정 시점에서 어느 음소에도 명확하게 집중되지 못한 것으로 나타난다.Referring to FIG. 10A , it can be seen that the quality of the attention alignment is low in the first portion 1010 and the second portion 1020 . Specifically, the first part (1010) appears to be unfocused on a specific phoneme included in the input text, and the second part (1020) appears to be unfocused on any phoneme at a specific point in time when the MEL spectrogram is generated. appear.

한편, 도 10b를 참조하면, 제2 부분(1020)에 대응하는 인코더 스코어(1030)가 낮게 연산됨을 알 수 있다. 또한, 도 10c를 참조하면, 제1 부분(1010)에 대응하는 디코더 스코어(1040)가 낮게 연산됨을 알 수 있다. 즉, 합성기(220, 300)는 인코더 스코어 또는 디코더 스코어를 소정의 값(임계값)과 비교하여 멜 스펙트로그램의 품질을 평가할 수 있다.Meanwhile, referring to FIG. 10B , it can be seen that the encoder score 1030 corresponding to the second part 1020 is calculated low. Also, referring to FIG. 10C , it can be seen that the decoder score 1040 corresponding to the first part 1010 is calculated low. That is, the synthesizers 220 and 300 may evaluate the quality of the mel spectrogram by comparing the encoder score or the decoder score with a predetermined value (threshold value).

한편, 합성기(220, 300)는 인코더 스코어와 디코더 스코어를 조합하여 멜 스펙트로그램의 품질을 평가할 수 있다.Meanwhile, the synthesizers 220 and 300 may evaluate the quality of the mel spectrogram by combining the encoder score and the decoder score.

예를 들어, 합성기(220, 300)는 아래의 수학식 3에 따라 수학식 1의 인코더 스코어를 변형함으로써 최종 인코더 스코어(

Figure 112020126334634-pat00009
)를 연산할 수 있다.For example, the synthesizers 220 and 300 modify the encoder score of Equation 1 according to Equation 3 below, so that the final encoder score (
Figure 112020126334634-pat00009
) can be computed.

Figure 112020126334634-pat00010
Figure 112020126334634-pat00010

수학식 3에서,

Figure 112020126334634-pat00011
은 멜 스펙트로그램의 길이(frame length)이고, s는 디코더 타임 스텝을 의미한다. 수학식 3을 구성하는 다른 변수들은 수학식 1에서 설명한 바와 동일하다.In Equation 3,
Figure 112020126334634-pat00011
is the length of the mel spectrogram (frame length), and s means the decoder time step. Other variables constituting Equation 3 are the same as those described in Equation 1.

또한, 합성기(220, 300)는 아래의 수학식 4에 따라 수학식 2의 인코더 스코어를 변형함으로써 최종 디코더 스코어(

Figure 112020126334634-pat00012
)를 연산할 수 있다.In addition, the synthesizers 220 and 300 modify the encoder score of Equation 2 according to Equation 4 below, so that the final decoder score (
Figure 112020126334634-pat00012
) can be computed.

Figure 112020126334634-pat00013
Figure 112020126334634-pat00013

수학식 4에서,

Figure 112020126334634-pat00014
은 집합 x를 구성하는 값들 중에서 y번째로 작은 값(즉, 하위 y 번째 값)을 의미하고,
Figure 112020126334634-pat00015
은 인코더 타임 스텝을 의미한다.
Figure 112020126334634-pat00016
은 디코더 스코어의 길이를 의미하여, 하위
Figure 112020126334634-pat00017
번째의 값까지 모두 더한 값이 된다. In Equation 4,
Figure 112020126334634-pat00014
Means the y-th smallest value (ie, the lower y-th value) among the values constituting the set x,
Figure 112020126334634-pat00015
denotes the encoder time step.
Figure 112020126334634-pat00016
means the length of the decoder score,
Figure 112020126334634-pat00017
It is the sum of all values up to the second value.

그리고, 합성기(220, 300)는 아래의 수학식 5에 따라 최종 스코어(

Figure 112020126334634-pat00018
)를 연산할 수 있다.Then, the synthesizers 220 and 300 score the final score according to Equation 5 below (
Figure 112020126334634-pat00018
) can be computed.

Figure 112020126334634-pat00019
Figure 112020126334634-pat00019

수학식 5에서, 0.1은 가중치(weight)를 의미하고, 가중치는 필요에 따라 그 값이 변경될 수 있다.In Equation 5, 0.1 means a weight, and the value of the weight can be changed as needed.

도 4 내지 도 10을 참조하여 상술한 바와 같이, 합성기(220, 300)가 어텐션 얼라인먼트의 스코어(인코더 스코어, 디코더 스코어, 최종 스코어)를 연산함에 따라, 어텐션 얼라인먼트에 대응하는 멜 스펙트로그램의 품질이 판단될 수 있다. 따라서, 음성 합성 시스템(100, 200)은 복수의 멜 스펙트로그램들 중 최고 품질의 멜 스펙트로그램을 선택할 수 있다. 이에 따라, 음성 합성 시스템(100, 200)는 최고 품질의 합성 음성을 출력할 수 있다.As described above with reference to FIGS. 4 to 10 , as the synthesizers 220 and 300 calculate the attention alignment scores (encoder score, decoder score, and final score), the quality of the Mel spectrogram corresponding to the attention alignment increases. can be judged Accordingly, the speech synthesis system 100 or 200 may select a mel spectrogram of the highest quality from among a plurality of mel spectrograms. Accordingly, the voice synthesizing systems 100 and 200 can output synthesized voices of the highest quality.

도 11은 어텐션 얼라인먼트의 디코더 스코어를 연산하는 방법의 일 예를 나타낸 흐름도이다.11 is a flowchart illustrating an example of a method of calculating a decoder score of attention alignment.

도 11을 참조하면, 디코더 스코어를 연산하는 방법은 도 1 내지 도 3에 도시된 음성 합성 시스템(100, 200) 또는 합성기(220, 300)에서 시계열적으로 처리되는 단계들로 구성된다. 따라서, 이하에서 생략된 내용이라 하더라도 도 1 내지 도 3에 도시된 음성 합성 시스템(100, 200) 또는 합성기(220, 300)에 관하여 이상에서 기술된 내용은 도 11의 디코더 스코어를 연산하는 방법에도 적용됨을 알 수 있다.Referring to FIG. 11 , a method for calculating a decoder score is composed of steps processed time-sequentially in the voice synthesis systems 100 and 200 or synthesizers 220 and 300 shown in FIGS. 1 to 3 . Therefore, even if the content is omitted below, the information described above regarding the speech synthesis system 100, 200 or synthesizer 220, 300 shown in FIGS. can be applied.

1110 단계에서, 합성기(220, 300)는 얼라인먼트가 표현되는 제1 축을 구성하는 제s 스텝에서의 값들 중에서 m 개의 값을 추출한다. 여기에서, m 및 s는 각각 1 이상의 자연수를 의미한다. 또한, s의 마지막 값은 스펙트로그램의 마지막에 대응하는 스텝을 의미한다. 제1 축은 인코더 타임 스텝이고, 인코더 타임 스텝은 스펙트로그램을 생성하는 합성기(220, 300)에 포함된 디코더의 타임 스텝을 의미한다. 또한, 스펙트로그램은 특정 자연 언어로 구성된 문자들의 시퀀스의 구두 발화에 대응한다. In step 1110, the synthesizers 220 and 300 extract m values from among the values in the s-th step constituting the first axis on which the alignment is expressed. Here, m and s each represent a natural number of 1 or greater. Also, the last value of s means a step corresponding to the end of the spectrogram. The first axis is an encoder time step, and the encoder time step means a time step of a decoder included in the synthesizers 220 and 300 that generate the spectrogram. Also, a spectrogram corresponds to a verbal utterance of a sequence of characters composed of a particular natural language.

1120 단계에서, 합성기(220, 300)는 추출된 m 개의 값을 이용하여 제s 스텝에서의 제s 스코어를 연산한다. 예를 들어, 합성기(220, 300)는 제s 스텝에서의 값들 중에서 상위 m 개의 값들을 추출할 수 있고, m은 2 이상의 자연수를 의미한다.In step 1120, the synthesizers 220 and 300 calculate the s score in the s th step using the extracted m values. For example, the synthesizers 220 and 300 may extract top m values from among the values in the s th step, where m is a natural number of 2 or greater.

또한, 도 11에는 도시되지 않았으나, 합성기(220, 300)는 제s 스코어와 소정의 값을 비교하여 스펙트로그램의 품질을 평가할 수 있다.Also, although not shown in FIG. 11 , the synthesizers 220 and 300 may evaluate the quality of the spectrogram by comparing the s score with a predetermined value.

전술한 본 명세서의 설명은 예시를 위한 것이며, 본 명세서의 내용이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명의 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 예를 들어, 단일형으로 설명되어 있는 각 구성 요소는 분산되어 실시될 수도 있으며, 마찬가지로 분산된 것으로 설명되어 있는 구성 요소들도 결합된 형태로 실시될 수 있다.The above description of this specification is for illustrative purposes, and those skilled in the art will understand that it can be easily modified into other specific forms without changing the technical spirit or essential features of the present invention. You will be able to. Therefore, the embodiments described above should be understood as illustrative in all respects and not limiting. For example, each component described as a single type may be implemented in a distributed manner, and similarly, components described as distributed may be implemented in a combined form.

본 실시예의 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 포함되는 것으로 해석되어야 한다.The scope of the present embodiment is indicated by the appended claims rather than the detailed description above, and should be construed as including all changes or modifications derived from the meaning and scope of the claims and equivalent concepts thereof.

200: 음성 합성 시스템
210: 화자 인코더
220: 합성기
230: 보코더
200: speech synthesis system
210: speaker encoder
220: synthesizer
230: Vocoder

Claims (5)

최고 품질의 합성 음성을 출력하기 위한, 스펙트로그램에 대응하는 어텐션 얼라인먼트(attention alignment)의 스코어(score)를 연산하는, 음성 합성 시스템에 포함된 합성기에 의해 수행되는 방법에 있어서,
인코더 스코어를 연산하는 단계;
디코더 스코어를 연산하는 단계;
상기 인코더 스코어 및 상기 디코더 스코어에 기초하여 상기 어텐션 얼라인먼트에 대응하는 최종 스코어를 연산하는 단계; 및
상기 최종 스코어와 소정의 값을 비교하여 상기 스펙트로그램의 품질을 평가하는 단계;를 포함하되,
상기 인코더 스코어를 연산하는 단계는,
상기 어텐션 얼라인먼트가 표현되는 제1 축(axis)을 구성하는 제s 스텝에서의 값들 중에서 n 개의 값을 추출하는 단계; 및
상기 추출된 n 개의 값들을 이용하여 상기 제s 스텝에서의 제s 인코더 스코어를 결정하는 단계;를 포함하고,
상기 디코더 스코어를 연산하는 단계는,
상기 어텐션 얼라인먼트가 표현되는 제2 축을 구성하는 제s 스텝에서의 값들 중에서 m 개의 값을 추출하는 단계; 및
상기 추출된 m 개의 값을 이용하여 상기 제s 스텝에서의 제s 디코더 스코어를 연산하는 단계;를 포함하며,
상기 n, 상기 m 및 상기 s는 각각 1 이상의 자연수를 포함하고,
상기 제1 축은 상기 스펙트로그램을 생성하는 합성기에 포함된 디코더의 타임 스텝에 대응하며,
상기 제2 축은 상기 스펙트로그램을 생성하는 합성기에 포함된 인코더의 타임 스텝에 대응하고,
상기 스펙트로그램은 화자 임베딩 벡터와 텍스트 임베딩 벡터에 의해 생성되는 것으로서, 특정 자연 언어로 구성된 문자들의 시퀀스(sequence)의 구두 발화(verbal utterance)에 대응하는 방법.
A method performed by a synthesizer included in a speech synthesis system that calculates a score of attention alignment corresponding to a spectrogram to output a synthesized speech of the highest quality, comprising:
calculating an encoder score;
calculating a decoder score;
calculating a final score corresponding to the attention alignment based on the encoder score and the decoder score; and
Evaluating the quality of the spectrogram by comparing the final score with a predetermined value; including,
Calculating the encoder score,
extracting n values from values in an s step constituting a first axis on which the attention alignment is expressed; and
Determining an s-th encoder score in the s-th step using the extracted n values;
Calculating the decoder score,
extracting m values from values in an s step constituting a second axis in which the attention alignment is expressed; and
Computing the s-th decoder score in the s-th step using the extracted m values;
Each of n, m, and s includes a natural number of 1 or more,
The first axis corresponds to a time step of a decoder included in a synthesizer generating the spectrogram,
The second axis corresponds to a time step of an encoder included in a synthesizer generating the spectrogram,
The spectrogram is generated by a speaker embedding vector and a text embedding vector, and corresponds to a verbal utterance of a sequence of characters composed of a specific natural language.
제 1 항에 있어서,
상기 n 개의 값을 추출하는 단계는,
상기 제s 스텝에서의 값들 중에서 상위 n 개의 값을 추출하고,
상기 m 개의 값을 추출하는 단계는,
상기 제s 스텝에서의 값들 중에서 상위 m 개의 값을 추출하고,
상기 n 및 상기 m은 2 이상의 자연수를 포함하는 방법.
According to claim 1,
In the step of extracting the n values,
Extracting the top n values among the values in the s th step;
The step of extracting the m values,
Extracting the top m values among the values in the s th step;
Wherein n and m comprise a natural number greater than or equal to 2.
제 1 항에 있어서,
상기 s의 마지막 값은 상기 스펙트로그램의 마지막에 대응하는 스텝을 의미하는 방법.
According to claim 1,
The last value of s means a step corresponding to the end of the spectrogram.
삭제delete 제 1 항에 있어서,
상기 제2 축을 구성하는 스텝들은 각각 입력 텍스트를 구성하는 단일 음소에 대응하는 방법.
According to claim 1,
The steps constituting the second axis each correspond to a single phoneme constituting the input text.
KR1020200158772A 2020-11-24 2020-11-24 A method and a TTS system for calculating a decoder score of an attention alignment corresponded to a spectrogram KR102532253B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020200158772A KR102532253B1 (en) 2020-11-24 2020-11-24 A method and a TTS system for calculating a decoder score of an attention alignment corresponded to a spectrogram
US17/380,387 US20220165247A1 (en) 2020-11-24 2021-07-20 Method for generating synthetic speech and speech synthesis system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200158772A KR102532253B1 (en) 2020-11-24 2020-11-24 A method and a TTS system for calculating a decoder score of an attention alignment corresponded to a spectrogram

Publications (2)

Publication Number Publication Date
KR20220071524A KR20220071524A (en) 2022-05-31
KR102532253B1 true KR102532253B1 (en) 2023-05-19

Family

ID=81786745

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200158772A KR102532253B1 (en) 2020-11-24 2020-11-24 A method and a TTS system for calculating a decoder score of an attention alignment corresponded to a spectrogram

Country Status (1)

Country Link
KR (1) KR102532253B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118153551A (en) * 2024-03-11 2024-06-07 北京智谱华章科技有限公司 Method, device, equipment and medium for dynamically adjusting depth of large language model

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Dzmitry Bahdanau et al., ‘NEURAL MACHINE TRANSLATION BY JOINTLY LEARNING TO ALIGN AND TRANSLATE’, arXiv:1409.0473v7 [cs.CL], 19 May 2016.*
Jung-Xuan Zhang et al., ‘Forward attention in sequence-to-sequence acoustic modeling for speech synthesis’, ICASSP 2018, April 2018.*
Minh-Thang Luong et al., ‘Effective Approaches to Attention-based Neural Machine Translation’, Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, September 2015.*

Also Published As

Publication number Publication date
KR20220071524A (en) 2022-05-31

Similar Documents

Publication Publication Date Title
KR102668866B1 (en) Method and computer readable storage medium for performing text-to-speech synthesis using machine learning
JP7178028B2 (en) Speech translation method and system using multilingual text-to-speech synthesis model
US20200394998A1 (en) Method, device, and computer readable storage medium for text-to-speech synthesis using machine learning on basis of sequential prosody feature
KR102528019B1 (en) A TTS system based on artificial intelligence technology
KR102449209B1 (en) A tts system for naturally processing silent parts
US20220165247A1 (en) Method for generating synthetic speech and speech synthesis system
KR20210059586A (en) Method and Apparatus for Emotional Voice Conversion using Multitask Learning with Text-to-Speech
KR102449223B1 (en) Method and tts system for changing the speed and the pitch of the speech
JP5807921B2 (en) Quantitative F0 pattern generation device and method, model learning device for F0 pattern generation, and computer program
KR102532253B1 (en) A method and a TTS system for calculating a decoder score of an attention alignment corresponded to a spectrogram
KR102568145B1 (en) Method and tts system for generating speech data using unvoice mel-spectrogram
US11776528B2 (en) Method for changing speed and pitch of speech and speech synthesis system
KR20220071523A (en) A method and a TTS system for segmenting a sequence of characters
KR102503066B1 (en) A method and a TTS system for evaluating the quality of a spectrogram using scores of an attention alignment
KR20220071522A (en) A method and a TTS system for generating synthetic speech
KR102408638B1 (en) Method and system for evaluating the quality of recordingas
KR102463589B1 (en) Method and tts system for determining the reference section of speech data based on the length of the mel-spectrogram
KR102463570B1 (en) Method and tts system for configuring mel-spectrogram batch using unvoice section
KR20240014250A (en) A method and a TTS system for calculating an encoder score of an attention alignment corresponded to a spectrogram
US20230037541A1 (en) Method and system for synthesizing speeches by scoring speeches
CN118366430B (en) Personification voice synthesis method, personification voice synthesis device and readable storage medium
KR20230018312A (en) Method and system for synthesizing speech by scoring speech
Nti Studying dialects to understand human language
KR20240014256A (en) Method and system for evaluating the quality of recordingas
KR20240014255A (en) Method and system for evaluating the quality of recordingas

Legal Events

Date Code Title Description
AMND Amendment
E601 Decision to refuse application
AMND Amendment
X701 Decision to grant (after re-examination)