WO2023238975A1 - Apparatus and method for converting grapheme to phoneme - Google Patents

Apparatus and method for converting grapheme to phoneme Download PDF

Info

Publication number
WO2023238975A1
WO2023238975A1 PCT/KR2022/008366 KR2022008366W WO2023238975A1 WO 2023238975 A1 WO2023238975 A1 WO 2023238975A1 KR 2022008366 W KR2022008366 W KR 2022008366W WO 2023238975 A1 WO2023238975 A1 WO 2023238975A1
Authority
WO
WIPO (PCT)
Prior art keywords
token
embedding
phoneme
input string
grapheme
Prior art date
Application number
PCT/KR2022/008366
Other languages
French (fr)
Korean (ko)
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 WO2023238975A1 publication Critical patent/WO2023238975A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • 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
    • G10L15/00Speech recognition
    • G10L15/02Feature extraction for speech recognition; Selection of recognition unit
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/06Creation of reference templates; Training of speech recognition systems, e.g. adaptation to the characteristics of the speaker's voice
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/06Creation of reference templates; Training of speech recognition systems, e.g. adaptation to the characteristics of the speaker's voice
    • G10L15/063Training
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/08Speech classification or search
    • G10L15/18Speech classification or search using natural language modelling

Definitions

  • Grapheme-to-phoneme (G2P) conversion is a process for inputting text into a speech synthesis model, and serves to improve speech synthesis quality by removing ambiguity about pronunciation. For example, when there is an English word called grapheme, if you express it with the phoneme [??r ⁇ fi ⁇ m], you can pronounce it without confusion.
  • the purpose is to provide a device and method for converting graphemes into phonemes.
  • a grapheme-phoneme conversion device includes a tokenization unit that divides an input string into tokens; and a phoneme determination unit that determines the phoneme of each token based on each token and its left and right adjacent tokens. may include.
  • the input string is Chinese, and the token may be a grapheme.
  • the phoneme determination unit determines whether each token is a single phoneme or a next letter, the single phonetic token determines the phoneme using a matching table or a grapheme-phoneme dictionary, and the next letter token determines the token and the left and right sides of the token. Phonemes can be judged based on adjacent tokens.
  • the phoneme determination unit may determine the phoneme of each token using a pre-learned multi-perceptron-based phoneme judgment model.
  • the phoneme determination unit includes an embedding unit that generates a token embedding of each token and generates an input string embedding corresponding to the input string based on the generated token embedding; a moving unit for generating a left-shifted embedding by moving the input string embedding to the left by a predetermined interval and generating a right-shifting embedding by moving the input string embedding to the right by a predetermined interval;
  • the input string embedding, the left shift embedding, and the right shift embedding are stacked, and based on the stacking result, the token embedding of each token and the token embeddings of the left and right adjacent tokens of each token are combined to form a combination token of each token.
  • a combination unit that generates embeddings; and a determination unit that determines the phoneme of each token based on the generated combination token embedding. may include.
  • the constant interval may be one token.
  • the shifter generates the left shift embedding by adding a zero padding token to the right of the input string embedding, removing the leftmost token embedding, adding a zero padding token to the left of the input string embedding, and removing the rightmost token embedding. can be removed to create the right-shifted embedding.
  • the phoneme determination unit includes an embedding unit that generates a token embedding of each token and generates an input string embedding corresponding to the input string based on the generated token embedding; a zero padding addition unit that adds zero padding tokens to the left and right sides of the generated input string embedding; A combination unit that generates a combination token embedding of each token by combining the token embedding of each token and the token embeddings of left and right adjacent tokens of each token based on the input string embedding to which the zero padding token is added; and a determination unit that determines the phoneme of each token based on the generated combination token embedding. may include.
  • a grapheme-phoneme conversion method includes splitting an input string into tokens; and determining the phoneme of each token based on each token and its left and right adjacent tokens. may include.
  • the input string is Chinese, and the token may be a grapheme.
  • the step of determining the phoneme of each token is to determine whether each token is a single phoneme or a polyphone, the monophone token is determined as a phoneme using a matching table or a grapheme-phoneme dictionary, and the polyphonic token is the phoneme.
  • the phoneme can be judged based on the token and its left and right adjacent tokens.
  • the phoneme of each token may be determined using a pre-learned multi-perceptron-based phoneme judgment model.
  • Determining the phoneme of each token may include generating a token embedding of each token; generating an input string embedding corresponding to the input string based on the generated token embedding; generating a left-shifted embedding by shifting the input string embedding to the left by a predetermined interval; generating a right-shifted embedding by shifting the input string embedding to the right by the predetermined interval;
  • the input string embedding, the left shift embedding, and the right shift embedding are stacked, and based on the stacking result, the token embedding of each token and the token embeddings of the left and right adjacent tokens of each token are combined to form a combination token of each token.
  • generating an embedding; and determining the phoneme of each token based on the generated combination token embedding. may include.
  • the constant interval may be one token.
  • the step of generating the left shift embedding includes adding a zero padding token to the right of the input string embedding, removing the leftmost token embedding to generate the left shift embedding, and generating the right shift embedding.
  • the above right-shifted embedding can be created by adding zero padding tokens to the left of the input string embedding and removing the rightmost token embedding.
  • Determining the phoneme of each token may include generating a token embedding of each token; generating an input string embedding corresponding to the input string based on the generated token embedding; adding zero padding tokens to the left and right sides of the generated input string embedding; generating a combined token embedding of each token by combining the token embedding of each token and the token embeddings of left and right adjacent tokens of each token based on the input string embedding to which the zero padding token is added; and determining the phoneme of each token based on the generated combination token embedding.
  • Figure 1 is a block diagram showing a grapheme-phoneme conversion device according to an exemplary embodiment.
  • Figure 2 is an example diagram for explaining the principle of grapheme-phoneme conversion according to an exemplary embodiment.
  • FIG. 3 is a diagram illustrating an embodiment of the phoneme determination unit 120 of FIG. 1.
  • Figures 4 and 5 are exemplary diagrams for explaining a phoneme determination process according to an embodiment.
  • FIG. 6 is a diagram illustrating another embodiment of the phoneme determination unit 120 of FIG. 1.
  • Figure 7 is an example diagram for explaining a phoneme determination process according to another embodiment.
  • Figure 8 is a flowchart showing a grapheme-phoneme conversion method according to an exemplary embodiment.
  • FIG. 9 is a flowchart illustrating an embodiment of a process 820 for determining the phoneme of each token in FIG. 8.
  • FIG. 10 is a flowchart illustrating another embodiment of the process 820 of determining the phoneme of each token in FIG. 8.
  • FIG. 11 is a block diagram illustrating and illustrating a computing environment including a computing device suitable for use in example embodiments.
  • each step may occur in a different order from the specified order. That is, each step may be performed in the same order as specified, may be performed substantially simultaneously, or may be performed in the opposite order.
  • each component is responsible for. That is, two or more components may be combined into one component, or one component may be divided into two or more components for more detailed functions.
  • each component may additionally perform some or all of the functions that other components are responsible for, and some of the main functions that each component is responsible for may be performed by other components. It may also be carried out.
  • Each component may be implemented as hardware or software, or as a combination of hardware and software.
  • FIG. 1 is a block diagram illustrating a grapheme-to-phoneme conversion device according to an exemplary embodiment
  • FIG. 2 is an exemplary diagram illustrating the principle of grapheme-to-phoneme conversion according to an exemplary embodiment.
  • the grapheme-phoneme conversion device 100 may include a tokenization unit 110 and a phoneme determination unit 120.
  • the tokenization unit 110 may divide the input string 10 into tokens 11 to 15.
  • the input string 10 may be Chinese, Korean, English, Japanese, etc., but this is only an example and is not limited thereto.
  • Tokens are logically distinguishable classification elements and may be phrases, words, morphemes, syllables, graphemes, etc. If the input string is Chinese, the token may be a grapheme.
  • the input string is Chinese, that is, when the grapheme-phoneme conversion device is a Chinese grapheme-phoneme conversion device.
  • the phoneme determination unit 120 may determine the phoneme of each token (11 to 15) based on each token (11 to 15) and the left and right adjacent tokens of each token (11 to 15). For example, the phoneme determination unit 120 may determine the phoneme of each token 11 to 15 using a pre-learned phoneme determination model. At this time, the phoneme judgment model may be a multi-perceptron, but is not limited to this.
  • the phoneme determination unit 120 determines not only the token (e.g., 13) but also the left and right sides of the token (e.g., 13). By considering adjacent tokens (e.g., 12, 14) together and making a decision, effective Chinese grapheme-to-phoneme conversion is possible with a relatively lightweight model.
  • Chinese that is, Chinese characters
  • Single phonemes have only one pronunciation, so they can be easily converted to known phonemes, but polyphonic letters have multiple pronunciations, so their pronunciation is determined by context.
  • the phoneme determination unit 120 determines whether each token is a monophone or a polyphone, and the monophone token is selected from a matching table or grapheme-
  • the phoneme can be determined using a phoneme dictionary, and only for the next token, the phoneme can be judged based on that token and its left and right adjacent tokens.
  • the matching table or grapheme-phoneme dictionary may be stored in internal or external memory.
  • FIG. 3 is a diagram illustrating an embodiment of the phoneme determination unit 120 of FIG. 1, and FIGS. 4 and 5 are exemplary diagrams for explaining a phoneme determination process according to an embodiment.
  • the phoneme determination unit 120a may include an embedding unit 310, a moving unit 320, a combining unit 330, and a determining unit 340.
  • the embedding unit 310 may generate embeddings 41 to 45 (hereinafter referred to as token embeddings) of each token 11 to 15 included in the input string 10.
  • the embedding may be called a feature vector or an embedding vector, and may have a predetermined dimension.
  • Figures 4 and 5 show examples of 3D token embedding, but this is only for convenience of explanation and is not particularly limited to the number of dimensions.
  • the embedding unit 310 may generate token embeddings 41 to 45 of each token 11 to 15 from each token 11 to 15 using an embedding model.
  • the embedding model is a machine learning model and can be learned in advance to generate embeddings from tokens.
  • the embedding unit 310 may generate an embedding 46 (hereinafter referred to as an input string embedding) corresponding to the input string 10 based on the generated token embeddings 41 to 45.
  • the embedding unit 310 may generate the input string embedding 46 by arranging the token embeddings 41 to 45 according to the positions of each token 11 to 15 in the input string 10.
  • the moving unit 320 generates a right-shifted embedding 51 by shifting the input string embedding 46 to the right by a certain interval, and creates a left-shifted embedding by shifting the input string embedding 46 to the left by a certain interval. (52) can be generated. At this time, a certain interval may be one token, but is not limited thereto.
  • the moving unit 320 adds a zero padding token ([0, 0, 0]) to the left of the input string embedding 46 and adds the rightmost token embedding ([0.15, 0.09, 0.8]) can be removed to create a right-shifted embedding (51). Additionally, the moving unit 320 adds a zero padding token ([0, 0, 0]) to the right of the input string embedding 46 and removes the leftmost token embedding ([0.1, 0.05, 0.03]), thereby A moving embedding 52 can be created. At this time, the zero padding token may have the same dimension as the token embeddings 41 to 45.
  • the combination unit 330 stacks the input string embedding 46, the right shift embedding 51, and the left shift embedding 52, and based on the result, the token of each token (11 to 15) is stacked.
  • Combination token embeddings 53 to 57 can be generated by combining the embedding with the token embeddings of the left and right adjacent tokens of each token.
  • the combination unit 330 may sequentially stack the left shift embedding 52, the input string embedding 46, and the right shift embedding 51 from the bottom.
  • the combination unit 330 extracts and combines token embeddings at the same position from each of the left shift embedding 52, the input string embedding 46, and the right shift embedding 51, thereby creating a combination of each token 11 to 15.
  • Token embeddings 53 to 57 can be created.
  • the combination unit 330 concatenates the extracted token embeddings, that is, the token embeddings of each token (11 to 15) and the token embeddings of the left and right adjacent tokens of each token (11 to 15) to create a combination token.
  • Embeddings 53 to 57 can be created, but are not limited to this.
  • Figure 5 shows an embodiment in which the left shift embedding 52, the input string embedding 46, and the right shift embedding 51 can be sequentially stacked from the bottom, but this is only an embodiment and is not limited thereto. no. That is, there is no particular limitation on the order of stacking the left shift embedding (52), the input string embedding (46), and the right shift embedding (51).
  • 0 may represent a zero padding token as a zero padding vector
  • k may represent the movement size
  • w may represent the window size. also, and may represent left shift embedding and right shift embedding, respectively.
  • the window size w is 3, of Token embedding is a combination of tokens at a location. It may contain three token embeddings at positions t-1, t, and t+1.
  • the leftmost token of can be stacked with the token to its right and its zero padding token, and the rightmost token can be stacked with its left token and its zero padding token.
  • the determination unit 340 may determine the phonemes 111 to 115 of each token 11 to 15 based on the combined token embeddings 53 to 57 of each token 11 to 15.
  • the determination unit 340 may determine the phoneme of each token (11 to 15) from the combined token embeddings (53 to 57) of each token (11 to 15) using a phoneme determination model.
  • the phoneme judgment model may be a machine learning model trained in advance to determine the phoneme of each token from the combination token embedding of each token.
  • the phoneme judgment model may be a multi-perceptron, but is not limited to this.
  • the phoneme judgment model may include three fully-connected layers.
  • two layers except the last layer include a network unit (e.g., feed-forward network (FFN), convolutional neural network (CNN), etc.) and a normalization unit (e.g., , batch normalization, layer normalization, etc.), activation functions (sigmoid, gelu, relu, tanh, elu, etc.), regularization units (e.g. dropout, etc.), and can include three complete
  • the last layer among the connection layers may include a network unit and a softmax function. For example, if the phoneme judgment model is expressed mathematically, it can be expressed as Equation 2.
  • L represents the network unit such as FFN or CNN
  • N represents the normalization unit such as batch normalization or layer normalization
  • A represents the activation function such as , sigmoid, gelu, relu, tanh, or elu, etc.
  • R represents a regularization part such as dropout
  • dict represents the size of the grapheme-phoneme dictionary
  • Softmax represents the softmax function, can represent the probability for each class (phoneme candidate).
  • the determination unit 340 may determine whether each token is a monophone or a polyphone. Additionally, the determination unit 340 may determine the phoneme for a single phonetic token using a matching table or a grapheme-phoneme dictionary, and may determine the phoneme using combination token embedding only for the polyphone token.
  • the single-character tokens are ' ⁇ ' (11) and ' ⁇ ' (12), and the polyphonic tokens are '??' (13), ' ⁇ ' (14), and ' ⁇ ' (15). ) can be.
  • the judgment unit 340 determines the single phoneme tokens 'open' (11) and ' ⁇ ' (12) for each phoneme (111, 112) using a matching table or grapheme-phoneme dictionary, and determines the next letter token ' ??'(13), ' ⁇ '(14), and ' ⁇ '(15) use the phoneme judgment model to identify each phoneme (113, 114, 115) can be judged.
  • the embedding unit 310 generates token embeddings 41 to 45 for each token 11 to 15 included in the input string 10, and then generates token embeddings 41 to 45 ) can be reduced or increased.
  • generation and movement of input string embeddings, generation of combination token embeddings, and phoneme determination of each token can be performed for each dimension, and the results performed for each dimension can be integrated to finally determine the phoneme of each token. there is.
  • FIG. 6 is a diagram illustrating another embodiment of the phoneme determination unit 120 of FIG. 1, and FIG. 7 is an exemplary diagram for explaining a phoneme determination process according to another embodiment.
  • the phoneme determination unit 120b may include an embedding unit 610, a zero padding addition unit 620, a combination unit 630, and a determination unit 640.
  • the embedding unit 610 and the determination unit 640 are substantially the same as or similar to the embedding unit 310 and the determination unit 340 of FIG. 3, their detailed descriptions will be omitted.
  • the zero padding addition unit 620 may add zero padding tokens to the left and right sides of the input string embedding 46 generated by the embedding unit 610 to generate an input string embedding 71 to which the zero padding token is added. .
  • the zero padding addition unit 620 adds a zero padding token ([0, 0, 0]) to the left of the input string embedding 46 and a zero padding token ([0, 0, 0]) to the right.
  • a zero padding token [0, 0, 0]
  • the combination unit 630 may generate combination token embeddings 53 to 57 of each token 11 to 15 based on the input string embedding 71 to which a zero padding token is added.
  • the combination unit 630 combines the token embedding of each token 11 to 15 and the token embedding of each token 11 to 15 in the input string embedding 71 to which a zero padding token is added. Token embeddings of left and right adjacent tokens can be extracted and concatenated to generate combined token embeddings (53 to 57) of each token (11 to 15).
  • the grapheme-phoneme conversion device 100 uses local context, that is, the left and right adjacent tokens of each token, rather than the context of the entire string. Since it only considers the phoneme of the token, it is possible to accurately convert the phoneme of the token through a relatively light model and with a small amount of calculation.
  • the grapheme-phoneme conversion device 100 may be applied to a text-to-speech conversion system.
  • the text-to-speech conversion system may be a device that receives arbitrary text data and converts the contents of the input text data into speech data.
  • Figure 8 is a flowchart showing a grapheme-phoneme conversion method according to an exemplary embodiment.
  • the grapheme-phoneme conversion method according to the exemplary embodiment of FIG. 8 may be performed by the grapheme-phoneme conversion apparatus 100 of FIG. 1 .
  • the grapheme-phoneme conversion device can split the input string into tokens (810).
  • the token may be a word, word, morpheme, syllable, grapheme, etc., and if the input string is Chinese, the token may be a grapheme.
  • the grapheme-phoneme conversion device can determine the phoneme of each token based on each token and its left and right adjacent tokens (820).
  • the grapheme-phoneme conversion device can determine the phoneme of each token using a pre-learned phoneme judgment model.
  • the phoneme judgment model may be a multi-perceptron, but is not limited to this.
  • the grapheme-phoneme conversion device determines whether each token is a single phoneme or a polyphone, and the single phoneme token is converted into a phoneme using a matching table or grapheme-phoneme dictionary in which single phoneme tokens are matched with phonemes. , and only for the next token, the phoneme can be judged based on that token and its left and right adjacent tokens.
  • FIG. 9 is a flowchart illustrating an embodiment of a process 820 for determining the phoneme of each token in FIG. 8.
  • the grapheme-phoneme conversion device may generate a token embedding of each token (910).
  • a grapheme-to-phoneme conversion device can generate a token embedding of each token using an embedding model.
  • the embedding model is a machine learning model and can be learned in advance to generate embeddings from tokens.
  • the grapheme-to-phoneme conversion device may generate an input string embedding based on the token embedding of each generated token (920). For example, a grapheme-to-phoneme conversion device may generate an input string embedding by listing the token embedding of each token according to the position of each token in the input string.
  • the grapheme-phoneme conversion device can create a right-shifted embedding by shifting the input string embedding to the right by a certain interval, and can generate a left-shift embedding by shifting the input string embedding to the left by a certain interval (930). .
  • a certain interval may be one token, but is not limited thereto.
  • a grapheme-to-phoneme converter can create a right-shifted embedding by adding zero padding tokens to the left of the input string embedding and removing the rightmost token embedding. Additionally, the grapheme-to-phoneme conversion device can create a left-shifted embedding by adding a zero padding token to the right of the input string embedding and removing the leftmost token embedding.
  • the grapheme-to-phoneme conversion device stacks the input string embedding, right shift embedding, and left shift embedding, and based on the results, for each token, the token embedding of each token and the token embeddings of the left and right adjacent tokens of each token are combined.
  • a combined token embedding can be generated (940).
  • the grapheme-to-phoneme converter stacks the left shift embedding, input string embedding, and right shift embedding sequentially from the bottom, and extracts the token embedding at the same position from each of the left shift embedding, input string embedding, and right shift embedding, By combining, we can create a combined token embedding of each token.
  • the grapheme-phoneme conversion device may generate a combination token embedding by concatenating the extracted token embeddings, that is, the token embedding of each token and the token embeddings of the left and right adjacent tokens of each token.
  • the grapheme-phoneme conversion device may determine the phoneme of each token based on the combination token embedding of each token (950).
  • the grapheme-to-phoneme conversion device may determine the phoneme of each token from the combined token embedding of each token using a phoneme determination model.
  • the phoneme judgment model may be a machine learning model trained in advance to determine the phoneme of each token from the combination token embedding of each token.
  • the phoneme judgment model may be a multi-perceptron, but is not limited to this.
  • the grapheme-phoneme conversion device determines whether each token is a single phoneme or a polyphone, the monophone token determines the phoneme using a matching table or a grapheme-phoneme dictionary, and the polyphone token is determined by using a matching table or a grapheme-phoneme dictionary.
  • the phoneme can be determined using combination token embedding only.
  • FIG. 10 is a flowchart illustrating another embodiment of the process 820 of determining the phoneme of each token in FIG. 8.
  • the grapheme-phoneme conversion device may generate a token embedding of each token (1010) and generate an input string embedding based on the token embedding of each generated token (1020).
  • the grapheme-phoneme conversion device may generate an input string embedding with zero padding tokens added by adding zero padding tokens to the left and right sides of the generated input string embedding (1030).
  • the grapheme-to-phoneme conversion device may generate a combined token embedding of each token based on the input string embedding with zero padding tokens added to the left and right sides (1040).
  • the grapheme-to-phoneme conversion device extracts and concatenates the token embedding of each token and the token embeddings of the left and right adjacent tokens of each token from the input string embedding with zero padding tokens added to the left and right, and concatenates each token.
  • a combination token embedding can be created.
  • the grapheme-phoneme conversion device may determine the phoneme of each token based on the combination token embedding of each token (950).
  • the grapheme-phoneme conversion device determines whether each token is a single phoneme or a polyphone, the monophone token determines the phoneme using a matching table or a grapheme-phoneme dictionary, and the polyphone token is determined by using a matching table or a grapheme-phoneme dictionary.
  • the phoneme can be determined using combination token embedding only.
  • FIG. 11 is a block diagram illustrating and illustrating a computing environment including a computing device suitable for use in example embodiments.
  • each component may have different functions and capabilities in addition to those described below, and may include additional components in addition to those described below.
  • the illustrated computing environment 1100 includes a computing device 1110 .
  • computing device 1110 may be a grapheme-to-phoneme conversion device 100.
  • Computing device 1110 may include at least one processor 1111, a computer-readable storage medium 1112, and a communication bus 1113.
  • Processor 1111 may cause computing device 1110 to operate according to the above-mentioned example embodiments.
  • the processor 1110 may execute one or more programs stored in the computer-readable storage medium 1112.
  • One or more programs may include one or more computer-executable instructions, which, when executed by the processor 1111, may be configured to cause computing device 1110 to perform operations according to example embodiments. there is.
  • Computer-readable storage medium 1112 may be configured to store computer-executable instructions or program code, program data, and/or other suitable forms of information.
  • the program 1114 stored in the computer-readable storage medium 1112 may include a set of instructions executable by the processor 1111.
  • computer-readable storage medium 1112 includes memory (volatile memory, such as random access memory, non-volatile memory, or an appropriate combination thereof), one or more magnetic disk storage devices, optical disk storage devices, flash It may be memory devices, another form of storage medium that can be accessed by computing device 1110 and store desired information, or a suitable combination thereof.
  • Communication bus 1113 may interconnect various other components of computing device 1110.
  • Computing device 1110 may also include one or more input/output interfaces 1115 and one or more network communication interfaces 1116 that provide an interface for one or more input/output devices 1120.
  • the input/output interface 1115 and the network communication interface 1116 may be connected to the communication bus 1113.
  • Input/output device 1120 may be connected to other components of computing device 1110 through input/output interface 1115.
  • Exemplary input/output devices 1120 include, but are not limited to, a pointing device (such as a mouse or trackpad), a keyboard, a touch input device (such as a touchpad or touch screen), a voice or sound input device, various types of sensor devices, and/or an imaging device.
  • the exemplary input/output device 1120 may be included within the computing device 1110 as a component that constitutes the computing device 1110, or may be connected to the computing device 1110 as a separate device distinct from the computing device 1110. It may be possible.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Acoustics & Sound (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Document Processing Apparatus (AREA)

Abstract

Disclosed are an apparatus and method for converting a grapheme to a phoneme. An apparatus for converting a grapheme to a phoneme according to one embodiment comprises: a tokenization unit for dividing an input string into tokens; and a phoneme determination unit for determining the phoneme of each token on the basis of the token and tokens directly adjacent to the left and right thereof.

Description

문자소-음소 변환 장치 및 방법Grapheme-phoneme conversion device and method
문자소를 음소로 변환하는 기술과 관련된다.It is related to the technology of converting graphemes into phonemes.
문자소-음소 변환(grapheme-to-phoneme, G2P)은 음성 합성 모델의 텍스트 입력을 넣어주기 위한 작업으로, 발음에 대한 모호성을 제거하여 음성 합성 품질을 향상시키는 역할을 한다. 예를 들어, grapheme이라는 영어 단어가 있을 때 [??ræfiːm] 이라는 음소로 표현해주면 헷갈리지 않고 발음할 수 있다.Grapheme-to-phoneme (G2P) conversion is a process for inputting text into a speech synthesis model, and serves to improve speech synthesis quality by removing ambiguity about pronunciation. For example, when there is an English word called grapheme, if you express it with the phoneme [??ræfiːm], you can pronounce it without confusion.
중국어의 경우 문자소는 한자, 음소는 병음에 해당하고, 한자를 올바른 병음으로 바꾸어주는 것이 중국어 음성 합성에서 중요한 과제이다.In the case of Chinese, graphemes correspond to Chinese characters and phonemes correspond to pinyin, and converting Chinese characters into correct pinyin is an important task in Chinese speech synthesis.
한편 전통적인 중국어 문자소-음소 변환은 사전과 규칙 기반으로 이루어졌지만 다양한 예외 케이스에 대처할 수 있는 사전과 규칙을 만들기 위해서는 전문가들이 많은 시간을 들여서 만들어야 하며, 사전과 규칙의 양이 많아질수록 유지보수가 어렵다는 문제가 있다.Meanwhile, traditional Chinese grapheme-phoneme conversion was done based on dictionaries and rules, but experts must spend a lot of time creating dictionaries and rules that can cope with various exception cases, and as the number of dictionaries and rules increases, maintenance becomes more difficult. There is a problem that is difficult.
문자소를 음소로 변환하는 장치 및 방법을 제공하는 것을 목적으로 한다.The purpose is to provide a device and method for converting graphemes into phonemes.
일 양상에 따른 문자소-음소 변환 장치는, 입력 문자열을 토큰으로 분할하는 토큰화부; 및 각 토큰과 상기 각 토큰의 좌우 인접 토큰들을 기반으로 상기 각 토큰의 음소를 판단하는 음소 판단부; 를 포함할 수 있다.A grapheme-phoneme conversion device according to one aspect includes a tokenization unit that divides an input string into tokens; and a phoneme determination unit that determines the phoneme of each token based on each token and its left and right adjacent tokens. may include.
상기 입력 문자열은 중국어이고, 상기 토큰은 문자소일 수 있다.The input string is Chinese, and the token may be a grapheme.
상기 음소 판단부는, 상기 각 토큰이 단음자인지 다음자인지를 판단하고, 단음자 토큰은 매칭 테이블 또는 문자소-음소 사전을 이용하여 음소를 판단하고, 다음자 토큰은 그 토큰과 그 토큰의 좌우 인접 토큰들을 기반으로 음소를 판단할 수 있다.The phoneme determination unit determines whether each token is a single phoneme or a next letter, the single phonetic token determines the phoneme using a matching table or a grapheme-phoneme dictionary, and the next letter token determines the token and the left and right sides of the token. Phonemes can be judged based on adjacent tokens.
상기 음소 판단부는, 미리 학습된 다중 퍼셉트론 기반 음소 판단 모델을 이용하여 상기 각 토큰의 음소를 판단할 수 있다.The phoneme determination unit may determine the phoneme of each token using a pre-learned multi-perceptron-based phoneme judgment model.
상기 음소 판단부는, 상기 각 토큰의 토큰 임베딩을 생성하고, 상기 생성된 토큰 임베딩을 기반으로 상기 입력 문자열에 대응하는 입력 문자열 임베딩을 생성하는 임베딩부; 상기 입력 문자열 임베딩을 왼쪽으로 일정 간격만큼 이동시켜 왼쪽 이동 임베딩을 생성하고, 상기 입력 문자열 임베딩을 오른쪽으로 상기 일정 간격만큼 이동시켜 오른쪽 이동 임베딩을 생성하는 이동부; 상기 입력 문자열 임베딩, 상기 왼쪽 이동 임베딩 및 상기 오른쪽 이동 임베딩을 쌓고(stack), 쌓은 결과를 기반으로 상기 각 토큰의 토큰 임베딩과 상기 각 토큰의 좌우 인접 토큰들의 토큰 임베딩들이 조합된 각 토큰의 조합 토큰 임베딩을 생성하는 조합부; 및 상기 생성된 조합 토큰 임베딩을 기반으로 상기 각 토큰의 음소를 판단하는 판단부; 를 포함할 수 있다.The phoneme determination unit includes an embedding unit that generates a token embedding of each token and generates an input string embedding corresponding to the input string based on the generated token embedding; a moving unit for generating a left-shifted embedding by moving the input string embedding to the left by a predetermined interval and generating a right-shifting embedding by moving the input string embedding to the right by a predetermined interval; The input string embedding, the left shift embedding, and the right shift embedding are stacked, and based on the stacking result, the token embedding of each token and the token embeddings of the left and right adjacent tokens of each token are combined to form a combination token of each token. A combination unit that generates embeddings; and a determination unit that determines the phoneme of each token based on the generated combination token embedding. may include.
상기 일정 간격은 하나의 토큰일 수 있다.The constant interval may be one token.
상기 이동부는, 상기 입력 문자열 임베딩의 오른쪽에 제로 패딩 토큰을 추가하고, 맨 왼쪽 토큰 임베딩은 제거하여 상기 왼쪽 이동 임베딩을 생성하고, 상기 입력 문자열 임베딩의 왼쪽에 제로 패딩 토큰을 추가하고 맨 오른쪽 토큰 임베딩은 제거하여 상기 오른쪽 이동 임베딩을 생성할 수 있다.The shifter generates the left shift embedding by adding a zero padding token to the right of the input string embedding, removing the leftmost token embedding, adding a zero padding token to the left of the input string embedding, and removing the rightmost token embedding. can be removed to create the right-shifted embedding.
상기 음소 판단부는, 상기 각 토큰의 토큰 임베딩을 생성하고, 상기 생성된 토큰 임베딩을 기반으로 상기 입력 문자열에 대응하는 입력 문자열 임베딩을 생성하는 임베딩부; 상기 생성된 입력 문자열 임베딩의 왼쪽과 오른쪽에 제로 패딩 토큰을 추가하는 제로 패딩 추가부; 상기 제로 패딩 토큰이 추가된 입력 문자열 임베딩을 기반으로 상기 각 토큰의 토큰 임베딩과 상기 각 토큰의 좌우 인접 토큰들의 토큰 임베딩들이 조합된 상기 각 토큰의 조합 토큰 임베딩을 생성하는 조합부; 및 상기 생성된 조합 토큰 임베딩을 기반으로 상기 각 토큰의 음소를 판단하는 판단부; 를 포함할 수 있다.The phoneme determination unit includes an embedding unit that generates a token embedding of each token and generates an input string embedding corresponding to the input string based on the generated token embedding; a zero padding addition unit that adds zero padding tokens to the left and right sides of the generated input string embedding; A combination unit that generates a combination token embedding of each token by combining the token embedding of each token and the token embeddings of left and right adjacent tokens of each token based on the input string embedding to which the zero padding token is added; and a determination unit that determines the phoneme of each token based on the generated combination token embedding. may include.
다른 양상에 따른 문자소-음소 변환 방법은 입력 문자열을 토큰으로 분할하는 단계; 및 각 토큰과 상기 각 토큰의 좌우 인접 토큰들을 기반으로 상기 각 토큰의 음소를 판단하는 단계; 를 포함할 수 있다.A grapheme-phoneme conversion method according to another aspect includes splitting an input string into tokens; and determining the phoneme of each token based on each token and its left and right adjacent tokens. may include.
상기 입력 문자열은 중국어이고, 상기 토큰은 문자소일 수 있다.The input string is Chinese, and the token may be a grapheme.
상기 각 토큰의 음소를 판단하는 단계는, 상기 각 토큰이 단음자인지 다음자인지를 판단하고, 단음자 토큰은 매칭 테이블 또는 문자소-음소 사전을 이용하여 음소를 판단하고, 다음자 토큰은 그 토큰과 그 토큰의 좌우 인접 토큰들을 기반으로 음소를 판단할 수 있다.The step of determining the phoneme of each token is to determine whether each token is a single phoneme or a polyphone, the monophone token is determined as a phoneme using a matching table or a grapheme-phoneme dictionary, and the polyphonic token is the phoneme. The phoneme can be judged based on the token and its left and right adjacent tokens.
상기 각 토큰의 음소를 판단하는 단계는, 미리 학습된 다중 퍼셉트론 기반 음소 판단 모델을 이용하여 상기 각 토큰의 음소를 판단할 수 있다.In the step of determining the phoneme of each token, the phoneme of each token may be determined using a pre-learned multi-perceptron-based phoneme judgment model.
상기 각 토큰의 음소를 판단하는 단계는, 상기 각 토큰의 토큰 임베딩을 생성하는 단계; 상기 생성된 토큰 임베딩을 기반으로 상기 입력 문자열에 대응하는 입력 문자열 임베딩을 생성하는 단계; 상기 입력 문자열 임베딩을 왼쪽으로 일정 간격만큼 이동시켜 왼쪽 이동 임베딩을 생성하는 단계; 상기 입력 문자열 임베딩을 오른쪽으로 상기 일정 간격만큼 이동시켜 오른쪽 이동 임베딩을 생성하는 단계; 상기 입력 문자열 임베딩, 상기 왼쪽 이동 임베딩 및 상기 오른쪽 이동 임베딩을 쌓고(stack), 쌓은 결과를 기반으로 상기 각 토큰의 토큰 임베딩과 상기 각 토큰의 좌우 인접 토큰들의 토큰 임베딩들이 조합된 각 토큰의 조합 토큰 임베딩을 생성하는 단계; 및 상기 생성된 조합 토큰 임베딩을 기반으로 상기 각 토큰의 음소를 판단하는 단계; 를 포함할 수 있다.Determining the phoneme of each token may include generating a token embedding of each token; generating an input string embedding corresponding to the input string based on the generated token embedding; generating a left-shifted embedding by shifting the input string embedding to the left by a predetermined interval; generating a right-shifted embedding by shifting the input string embedding to the right by the predetermined interval; The input string embedding, the left shift embedding, and the right shift embedding are stacked, and based on the stacking result, the token embedding of each token and the token embeddings of the left and right adjacent tokens of each token are combined to form a combination token of each token. generating an embedding; and determining the phoneme of each token based on the generated combination token embedding. may include.
상기 일정 간격은 하나의 토큰일 수 있다.The constant interval may be one token.
상기 왼쪽 이동 임베딩을 생성하는 단계는, 상기 입력 문자열 임베딩의 오른쪽에 제로 패딩 토큰을 추가하고, 맨 왼쪽 토큰 임베딩은 제거하여 상기 왼쪽 이동 임베딩을 생성하고, 상기 오른쪽 이동 임베딩을 생성하는 단계는, 상기 입력 문자열 임베딩의 왼쪽에 제로 패딩 토큰을 추가하고 맨 오른쪽 토큰 임베딩은 제거하여 상기 오른쪽 이동 임베딩을 생성할 수 있다.The step of generating the left shift embedding includes adding a zero padding token to the right of the input string embedding, removing the leftmost token embedding to generate the left shift embedding, and generating the right shift embedding. The above right-shifted embedding can be created by adding zero padding tokens to the left of the input string embedding and removing the rightmost token embedding.
상기 각 토큰의 음소를 판단하는 단계는, 상기 각 토큰의 토큰 임베딩을 생성하는 단계; 상기 생성된 토큰 임베딩을 기반으로 상기 입력 문자열에 대응하는 입력 문자열 임베딩을 생성하는 단계; 상기 생성된 입력 문자열 임베딩의 왼쪽과 오른쪽에 제로 패딩 토큰을 추가하는 단계; 상기 제로 패딩 토큰이 추가된 입력 문자열 임베딩을 기반으로 상기 각 토큰의 토큰 임베딩과 상기 각 토큰의 좌우 인접 토큰들의 토큰 임베딩들이 조합된 상기 각 토큰의 조합 토큰 임베딩을 생성하는 단계; 및 상기 생성된 조합 토큰 임베딩을 기반으로 상기 각 토큰의 음소를 판단하는 단계; 를 포함할 수 있다.Determining the phoneme of each token may include generating a token embedding of each token; generating an input string embedding corresponding to the input string based on the generated token embedding; adding zero padding tokens to the left and right sides of the generated input string embedding; generating a combined token embedding of each token by combining the token embedding of each token and the token embeddings of left and right adjacent tokens of each token based on the input string embedding to which the zero padding token is added; and determining the phoneme of each token based on the generated combination token embedding. may include.
입력 문자열을 구성하는 문자소의 음소를 판단할 때, 문자열 전체의 문맥이 아니라 지역적 문맥(local context) 즉, 각 문자소의 좌우 인접 문자소들만을 고려하므로, 비교적 가벼운 모델로 적은 연산량을 통하여 정확하게 문자소-음소 변환이 가능하다.When determining the phoneme of a grapheme constituting an input string, only the local context (i.e., the left and right adjacent graphemes of each grapheme) is considered rather than the context of the entire string, so it is a relatively lightweight model and accurately uses a small amount of computation to accurately represent the grapheme. -Phoneme conversion is possible.
도 1은 예시적 실시예에 따른 문자소-음소 변환 장치를 도시한 블록도이다.Figure 1 is a block diagram showing a grapheme-phoneme conversion device according to an exemplary embodiment.
도 2는 예시적 실시예에 따른 문자소-음소 변환 원리를 설명하기 위한 예시도이다.Figure 2 is an example diagram for explaining the principle of grapheme-phoneme conversion according to an exemplary embodiment.
도 3은 도 1의 음소 판단부(120)의 일 실시예를 도시한 도면이다.FIG. 3 is a diagram illustrating an embodiment of the phoneme determination unit 120 of FIG. 1.
도 4 및 도 5는 일 실시예에 따른 음소 판단 과정을 설명하기 위한 예시도이다.Figures 4 and 5 are exemplary diagrams for explaining a phoneme determination process according to an embodiment.
도 6은 도 1의 음소 판단부(120)의 다른 실시예를 도시한 도면이다.FIG. 6 is a diagram illustrating another embodiment of the phoneme determination unit 120 of FIG. 1.
도 7은 다른 실시예에 따른 음소 판단 과정을 설명하기 위한 예시도이다.Figure 7 is an example diagram for explaining a phoneme determination process according to another embodiment.
도 8은 예시적 실시예에 따른 문자소-음소 변환 방법을 도시한 흐름도이다.Figure 8 is a flowchart showing a grapheme-phoneme conversion method according to an exemplary embodiment.
도 9는 도 8의 각 토큰의 음소를 판단하는 과정(820)의 일 실시예를 도시한 흐름도이다.FIG. 9 is a flowchart illustrating an embodiment of a process 820 for determining the phoneme of each token in FIG. 8.
도 10는 도 8의 각 토큰의 음소를 판단하는 과정(820)의 다른 실시예를 도시한 흐름도이다.FIG. 10 is a flowchart illustrating another embodiment of the process 820 of determining the phoneme of each token in FIG. 8.
도 11은 예시적인 실시예들에서 사용되기에 적합한 컴퓨팅 장치를 포함하는 컴퓨팅 환경을 예시하여 설명하기 위한 블록도이다.11 is a block diagram illustrating and illustrating a computing environment including a computing device suitable for use in example embodiments.
이하, 첨부된 도면을 참조하여 본 발명의 일 실시예를 상세하게 설명한다. 각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어 관련된 공지 기능 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략할 것이다.Hereinafter, an embodiment of the present invention will be described in detail with reference to the attached drawings. When adding reference numerals to components in each drawing, it should be noted that identical components are given the same reference numerals as much as possible even if they are shown in different drawings. Additionally, in describing the present invention, if it is determined that a detailed description of a related known function or configuration may unnecessarily obscure the gist of the present invention, the detailed description will be omitted.
한편, 각 단계들에 있어, 각 단계들은 문맥상 명백하게 특정 순서를 기재하지 않은 이상 명기된 순서와 다르게 일어날 수 있다. 즉, 각 단계들은 명기된 순서와 동일하게 수행될 수 있고 실질적으로 동시에 수행될 수도 있으며 반대의 순서대로 수행될 수도 있다.Meanwhile, in each step, unless a specific order is clearly stated in the context, each step may occur in a different order from the specified order. That is, each step may be performed in the same order as specified, may be performed substantially simultaneously, or may be performed in the opposite order.
후술되는 용어들은 본 발명에서의 기능을 고려하여 정의된 용어들로서 이는 사용자, 운용자의 의도 또는 관례 등에 따라 달라질 수 있다. 그러므로 그 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다.The terms described below are terms defined in consideration of functions in the present invention, and may vary depending on the intention or custom of the user or operator. Therefore, the definition should be made based on the contents throughout this specification.
제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 구성요소들은 용어들에 의해 한정되어서는 안 된다. 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한 복수의 표현을 포함하고, '포함하다' 또는 '가지다' 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.Terms such as first, second, etc. may be used to describe various components, but the components should not be limited by the terms. Terms are used only to distinguish one component from another. Singular expressions include plural expressions unless the context clearly indicates otherwise, and terms such as 'include' or 'have' refer to the features, numbers, steps, operations, components, parts, or combinations thereof described in the specification. It is intended to specify that something exists, but it should be understood as not precluding the possibility of the existence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.
또한, 본 명세서에서의 구성부들에 대한 구분은 각 구성부가 담당하는 주 기능별로 구분한 것에 불과하다. 즉, 2개 이상의 구성부가 하나의 구성부로 합쳐지거나 또는 하나의 구성부가 보다 세분화된 기능별로 2개 이상으로 분화되어 구비될 수도 있다. 그리고 구성부 각각은 자신이 담당하는 주기능 이외에도 다른 구성부가 담당하는 기능 중 일부 또는 전부의 기능을 추가적으로 수행할 수도 있으며, 구성부 각각이 담당하는 주기능 중 일부 기능이 다른 구성부에 의해 전담되어 수행될 수도 있다. 각 구성부는 하드웨어 또는 소프트웨어로 구현되거나 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다.In addition, the division of components in this specification is merely a division according to the main function each component is responsible for. That is, two or more components may be combined into one component, or one component may be divided into two or more components for more detailed functions. In addition to the main functions that each component is responsible for, each component may additionally perform some or all of the functions that other components are responsible for, and some of the main functions that each component is responsible for may be performed by other components. It may also be carried out. Each component may be implemented as hardware or software, or as a combination of hardware and software.
도 1은 예시적 실시예에 따른 문자소-음소 변환 장치를 도시한 블록도이고, 도 2는 예시적 실시예에 따른 문자소-음소 변환 원리를 설명하기 위한 예시도이다.FIG. 1 is a block diagram illustrating a grapheme-to-phoneme conversion device according to an exemplary embodiment, and FIG. 2 is an exemplary diagram illustrating the principle of grapheme-to-phoneme conversion according to an exemplary embodiment.
도 1 및 도 2를 참조하면, 예시적 실시예에 따른 문자소-음소 변환 장치(100)는 토큰화부(110) 및 음소 판단부(120)를 포함할 수 있다.Referring to FIGS. 1 and 2 , the grapheme-phoneme conversion device 100 according to an exemplary embodiment may include a tokenization unit 110 and a phoneme determination unit 120.
토큰화부(110)는 입력 문자열(10)을 토큰(11 내지 15)으로 분할할 수 있다. 이때, 입력 문자열(10)은 중국어, 한국어, 영어, 일본어 등일 수 있으나, 이는 일 실시예에 불과할 뿐 이에 한정되는 것은 아니다. 토큰은 논리적으로 구분 가능한 분류 요소로서, 어절, 단어, 형태소, 음절, 문자소 등일 수 있다. 입력 문자열이 중국어인 경우, 토큰은 문자소일 수 있다.The tokenization unit 110 may divide the input string 10 into tokens 11 to 15. At this time, the input string 10 may be Chinese, Korean, English, Japanese, etc., but this is only an example and is not limited thereto. Tokens are logically distinguishable classification elements and may be phrases, words, morphemes, syllables, graphemes, etc. If the input string is Chinese, the token may be a grapheme.
이하, 설명의 편의를 위해 입력 문자열이 중국어인 경우, 즉 문자소-음소 변환 장치가 중국어 문자소-음소 변환 장치인 경우를 예를 들어 설명하기로 한다.Hereinafter, for convenience of explanation, an example will be given where the input string is Chinese, that is, when the grapheme-phoneme conversion device is a Chinese grapheme-phoneme conversion device.
음소 판단부(120)는 각 토큰(11 내지 15)과 각 토큰(11 내지 15)의 좌우 인접 토큰들을 기반으로 각 토큰(11 내지 15)의 음소를 판단할 수 있다. 예를 들어, 음소 판단부(120)는 미리 학습된 음소 판단 모델을 이용하여 각 토큰(11 내지 15)의 음소를 판단할 수 있다. 이때, 음소 판단 모델은 다중 퍼셉트론일 수 있으나 이에 한정되는 것은 아니다.The phoneme determination unit 120 may determine the phoneme of each token (11 to 15) based on each token (11 to 15) and the left and right adjacent tokens of each token (11 to 15). For example, the phoneme determination unit 120 may determine the phoneme of each token 11 to 15 using a pre-learned phoneme determination model. At this time, the phoneme judgment model may be a multi-perceptron, but is not limited to this.
예시적 실시예에 따른 음소 판단부(120)는 입력 문자열(10)을 구성하는 토큰(예컨대 13)의 음소를 판단할 때, 그 토큰(예컨대 13) 뿐만 아니라 그 토큰(예컨대, 13)의 좌우 인접 토큰(예컨대, 12, 14)을 함께 고려하여 판단함으로써, 비교적 가벼운 모델로 효과적으로 중국어 문자소-음소 변환이 가능하다.When determining the phoneme of a token (e.g., 13) constituting the input string 10, the phoneme determination unit 120 according to an exemplary embodiment determines not only the token (e.g., 13) but also the left and right sides of the token (e.g., 13). By considering adjacent tokens (e.g., 12, 14) together and making a decision, effective Chinese grapheme-to-phoneme conversion is possible with a relatively lightweight model.
중국어 즉, 한자는 한가지 발음만을 가지는 단음자(monophone)와 여러 발음을 가지는 다음자(polyphone)로 구분될 수 있다. 단음자의 경우 한가지 발음만을 가지므로 알려진 음소로 쉽게 변환이 가능하지만, 다음자는 여러 발음을 가지므로 그 발음이 문맥을 통해 결정되는 특징이 있다.Chinese, that is, Chinese characters, can be divided into monophones, which have only one pronunciation, and polyphones, which have multiple pronunciations. Single phonemes have only one pronunciation, so they can be easily converted to known phonemes, but polyphonic letters have multiple pronunciations, so their pronunciation is determined by context.
일 실시예에 따르면, 음소 판단부(120)는 각 토큰이 단음자(monophone)인지 다음자(polyphone)인지를 판단하고, 단음자 토큰은 단음자 토큰과 음소가 매칭된 매칭 테이블 또는 문자소-음소 사전을 이용하여 음소를 판단하고, 다음자 토큰에 대해서만 그 토큰과 그 토큰의 좌우 인접 토큰들을 기반으로 음소를 판단할 수 있다. 이때 매칭 테이블 또는 문자소-음소 사전은 내부 또는 외부 메모리에 저장될 수 있다.According to one embodiment, the phoneme determination unit 120 determines whether each token is a monophone or a polyphone, and the monophone token is selected from a matching table or grapheme- The phoneme can be determined using a phoneme dictionary, and only for the next token, the phoneme can be judged based on that token and its left and right adjacent tokens. At this time, the matching table or grapheme-phoneme dictionary may be stored in internal or external memory.
이하 도 3 내지 도 7을 참조하여 음소 판단부(120)의 실시예들을 구체적으로 설명하기로 한다.Hereinafter, embodiments of the phoneme determination unit 120 will be described in detail with reference to FIGS. 3 to 7.
도 3은 도 1의 음소 판단부(120)의 일 실시예를 도시한 도면이고, 도 4 및 도 5는 일 실시예에 따른 음소 판단 과정을 설명하기 위한 예시도이다.FIG. 3 is a diagram illustrating an embodiment of the phoneme determination unit 120 of FIG. 1, and FIGS. 4 and 5 are exemplary diagrams for explaining a phoneme determination process according to an embodiment.
도 3 내지 도 5를 참조하면 음소 판단부(120a)는 임베딩부(310), 이동부(320), 조합부(330) 및 판단부(340)를 포함할 수 있다.Referring to Figures 3 to 5, the phoneme determination unit 120a may include an embedding unit 310, a moving unit 320, a combining unit 330, and a determining unit 340.
임베딩부(310)는 입력 문자열(10)에 포함된 각 토큰(11 내지 15)의 임베딩(41 내지 45)(이하, 토큰 임베딩)을 생성할 수 있다. 여기서 임베딩은 특징 벡터 또는 임베팅 벡터로 호칭될 수 있으며, 소정의 차원(dimension)을 가질 수 있다. 도 4 및 도 5는 3차원 토큰 임베딩의 예를 도시하나 이는 설명의 편의를 위함일 뿐 차원의 수에 특별히 한정되는 것은 아니다.The embedding unit 310 may generate embeddings 41 to 45 (hereinafter referred to as token embeddings) of each token 11 to 15 included in the input string 10. Here, the embedding may be called a feature vector or an embedding vector, and may have a predetermined dimension. Figures 4 and 5 show examples of 3D token embedding, but this is only for convenience of explanation and is not particularly limited to the number of dimensions.
예시적 실시예에 따르면, 임베딩부(310)는 임베딩 모델을 이용하여 각 토큰(11 내지 15)으로부터 각 토큰(11 내지 15)의 토큰 임베딩(41 내지 45)을 생성할 수 있다. 이때 임베딩 모델은 머신러닝 모델로서 토큰으로부터 임베딩을 생성하도록 미리 학습될 수 있다.According to an exemplary embodiment, the embedding unit 310 may generate token embeddings 41 to 45 of each token 11 to 15 from each token 11 to 15 using an embedding model. At this time, the embedding model is a machine learning model and can be learned in advance to generate embeddings from tokens.
임베딩부(310)는 생성된 토큰 임베딩(41 내지 45)을 기반으로 입력 문자열(10)에 대응하는 임베딩(46)(이하, 입력 문자열 임베딩)을 생성할 수 있다. 예를 들어, 임베딩부(310)는 토큰 임베딩(41 내지 45)을 입력 문자열(10) 내 각 토큰(11 내지 15)의 위치에 맞게 나열하여 입력 문자열 임베딩(46)을 생성할 수 있다.The embedding unit 310 may generate an embedding 46 (hereinafter referred to as an input string embedding) corresponding to the input string 10 based on the generated token embeddings 41 to 45. For example, the embedding unit 310 may generate the input string embedding 46 by arranging the token embeddings 41 to 45 according to the positions of each token 11 to 15 in the input string 10.
이동부(320)는 입력 문자열 임베딩(46)을 오른쪽으로 일정 간격만큼 이동시켜(shift) 오른쪽 이동 임베딩(51)을 생성하고, 입력 문자열 임베딩(46)을 왼쪽으로 일정 간격만큼 이동시켜 왼쪽 이동 임베딩(52)을 생성할 수 있다. 이때, 일정 간격은 하나의 토큰일 수 있으나, 이에 한정되는 것은 아니다.The moving unit 320 generates a right-shifted embedding 51 by shifting the input string embedding 46 to the right by a certain interval, and creates a left-shifted embedding by shifting the input string embedding 46 to the left by a certain interval. (52) can be generated. At this time, a certain interval may be one token, but is not limited thereto.
예를 들어, 도 5에 도시된 바와 같이, 이동부(320)는 입력 문자열 임베딩(46)의 왼쪽에 제로 패딩 토큰([0, 0, 0])을 추가하고 맨 오른쪽 토큰 임베딩([0.15, 0.09, 0.8])은 제거함으로써, 오른쪽 이동 임베딩(51)을 생성할 수 있다. 또한, 이동부(320)는 입력 문자열 임베딩(46)의 오른쪽에 제로 패딩 토큰([0, 0, 0])을 추가하고 맨 왼쪽 토큰 임베딩([0.1 ,0.05, 0.03])은 제거함으로써, 왼쪽 이동 임베딩(52)을 생성할 수 있다. 이때 제로 패딩 토큰은 토큰 임베딩(41 내지 45)과 동일 차원을 가질 수 있다.For example, as shown in Figure 5, the moving unit 320 adds a zero padding token ([0, 0, 0]) to the left of the input string embedding 46 and adds the rightmost token embedding ([0.15, 0.09, 0.8]) can be removed to create a right-shifted embedding (51). Additionally, the moving unit 320 adds a zero padding token ([0, 0, 0]) to the right of the input string embedding 46 and removes the leftmost token embedding ([0.1, 0.05, 0.03]), thereby A moving embedding 52 can be created. At this time, the zero padding token may have the same dimension as the token embeddings 41 to 45.
조합부(330)는 입력 문자열 임베딩(46), 오른쪽 이동 임베딩(51) 및 왼쪽 이동 임베딩(52)을 쌓고(stack), 그 결과를 기반으로 각 토큰(11 내지 15)에 대하여 각 토큰의 토큰 임베딩과 각 토큰의 좌우 인접 토큰들의 토큰 임베딩들이 조합된 조합 토큰 임베딩(53 내지 57)을 생성할 수 있다.The combination unit 330 stacks the input string embedding 46, the right shift embedding 51, and the left shift embedding 52, and based on the result, the token of each token (11 to 15) is stacked. Combination token embeddings 53 to 57 can be generated by combining the embedding with the token embeddings of the left and right adjacent tokens of each token.
예를 들어, 도 5에 도시된 바와 같이, 조합부(330)는 아래에서부터 왼쪽 이동 임베딩(52), 입력 문자열 임베딩(46) 및 오른쪽 이동 임베딩(51)을 순차적으로 쌓을 수 있다. 또한, 조합부(330)는 왼쪽 이동 임베딩(52), 입력 문자열 임베딩(46) 및 오른쪽 이동 임베딩(51) 각각에서 동일 위치의 토큰 임베딩을 추출하여 조합함으로써, 각 토큰(11 내지 15)의 조합 토큰 임베딩(53 내지 57)을 생성할 수 있다. 예를 들어, 조합부(330)는 추출된 토큰 임베딩들 즉, 각 토큰(11 내지 15)의 토큰 임베딩과 각 토큰(11 내지 15)의 좌우 인접 토큰들의 토큰 임베딩들을 연결(concatenate)하여 조합 토큰 임베딩(53 내지 57)을 생성할 수 있으나 이에 한정되는 것은 아니다.For example, as shown in FIG. 5, the combination unit 330 may sequentially stack the left shift embedding 52, the input string embedding 46, and the right shift embedding 51 from the bottom. In addition, the combination unit 330 extracts and combines token embeddings at the same position from each of the left shift embedding 52, the input string embedding 46, and the right shift embedding 51, thereby creating a combination of each token 11 to 15. Token embeddings 53 to 57 can be created. For example, the combination unit 330 concatenates the extracted token embeddings, that is, the token embeddings of each token (11 to 15) and the token embeddings of the left and right adjacent tokens of each token (11 to 15) to create a combination token. Embeddings 53 to 57 can be created, but are not limited to this.
한편, 도 5는 아래에서부터 왼쪽 이동 임베딩(52), 입력 문자열 임베딩(46) 및 오른쪽 이동 임베딩(51)을 순차적으로 쌓을 수 있은 실시예를 도시하나, 이는 일 실시예에 불과할 뿐 이에 한정되는 것은 아니다. 즉, 왼쪽 이동 임베딩(52), 입력 문자열 임베딩(46) 및 오른쪽 이동 임베딩(51)을 쌓는 순서에 특별한 제한이 있는 것은 아니다.Meanwhile, Figure 5 shows an embodiment in which the left shift embedding 52, the input string embedding 46, and the right shift embedding 51 can be sequentially stacked from the bottom, but this is only an embodiment and is not limited thereto. no. That is, there is no particular limitation on the order of stacking the left shift embedding (52), the input string embedding (46), and the right shift embedding (51).
입력 문자열 임베딩의 이동과 조합 토큰 임베딩의 생성을 수학식으로 표현하면 수학식 1로 표현될 수 있다.The movement of the input string embedding and the generation of the combination token embedding can be expressed as equation 1.
Figure PCTKR2022008366-appb-img-000001
Figure PCTKR2022008366-appb-img-000001
Figure PCTKR2022008366-appb-img-000002
Figure PCTKR2022008366-appb-img-000002
Figure PCTKR2022008366-appb-img-000003
Figure PCTKR2022008366-appb-img-000003
Figure PCTKR2022008366-appb-img-000004
Figure PCTKR2022008366-appb-img-000004
Figure PCTKR2022008366-appb-img-000005
Figure PCTKR2022008366-appb-img-000005
여기서,
Figure PCTKR2022008366-appb-img-000006
은 입력 문자열 임베딩을 나타내고, 0은 제로 페딩 벡터로서 제로 패딩 토큰을 나타내고, k는 이동 사이즈를 나타내고, w는 윈도우 사이즈를 나타낼 수 있다. 또한,
Figure PCTKR2022008366-appb-img-000007
Figure PCTKR2022008366-appb-img-000008
는 각각 왼쪽 이동 임베딩과 오른쪽 이동 임베딩을 나타낼 수 있다.
here,
Figure PCTKR2022008366-appb-img-000006
represents the input string embedding, 0 may represent a zero padding token as a zero padding vector, k may represent the movement size, and w may represent the window size. also,
Figure PCTKR2022008366-appb-img-000007
and
Figure PCTKR2022008366-appb-img-000008
may represent left shift embedding and right shift embedding, respectively.
예를 들어, 이동 사이즈 k가 1인 경우, 윈도우 사이즈 w는 3이 되고,
Figure PCTKR2022008366-appb-img-000009
Figure PCTKR2022008366-appb-img-000010
위치의 토큰의 조합 토큰 임베딩은
Figure PCTKR2022008366-appb-img-000011
의 t-1, t 및 t+1 위치의 3개의 토큰 임베딩을 포함할 수 있다.
Figure PCTKR2022008366-appb-img-000012
의 맨 왼쪽 토큰은 그 토큰의 오른쪽 토큰 및 제로 패딩 토큰과 함께 쌓이고(stack), 맨 오른쪽 토큰은 그 토큰의 왼쪽 토큰과 제로 패딩 토큰과 함께 쌓일 수 있다.
For example, if the movement size k is 1, the window size w is 3,
Figure PCTKR2022008366-appb-img-000009
of
Figure PCTKR2022008366-appb-img-000010
Token embedding is a combination of tokens at a location.
Figure PCTKR2022008366-appb-img-000011
It may contain three token embeddings at positions t-1, t, and t+1.
Figure PCTKR2022008366-appb-img-000012
The leftmost token of can be stacked with the token to its right and its zero padding token, and the rightmost token can be stacked with its left token and its zero padding token.
판단부(340)는 각 토큰(11 내지 15)의 조합 토큰 임베딩(53 내지 57)을 기반으로 각 토큰(11 내지 15)의 음소(111 내지 115)를 판단할 수 있다.The determination unit 340 may determine the phonemes 111 to 115 of each token 11 to 15 based on the combined token embeddings 53 to 57 of each token 11 to 15.
예시적 실시예에 따르면, 판단부(340)는 음소 판단 모델을 이용하여 각 토큰(11 내지 15)의 조합 토큰 임베딩(53 내지 57)으로부터 각 토큰(11 내지 15)의 음소를 판단할 수 있다. 이때, 음소 판단 모델은 각 토큰의 조합 토큰 임베딩으로부터 각 토큰의 음소를 판단할 수 있도록 미리 학습된 머신러닝 모델일 수 있다. 예를 들어, 음소 판단 모델은 다중 퍼셉트론일 수 있으나 이에 한정되는 것은 아니다.According to an exemplary embodiment, the determination unit 340 may determine the phoneme of each token (11 to 15) from the combined token embeddings (53 to 57) of each token (11 to 15) using a phoneme determination model. . At this time, the phoneme judgment model may be a machine learning model trained in advance to determine the phoneme of each token from the combination token embedding of each token. For example, the phoneme judgment model may be a multi-perceptron, but is not limited to this.
예시적 실시예에 따르면, 음소 판단 모델은 3개의 완전 연결 레이어(fully-connected layers)를 포함할 수 있다. 3개의 완전 연결 레이어 중 마지막 레이어를 제외한 2개의 레이어는 네트워크부(예컨대, 피드 포워드 네트워크(feed-forward network, FFN), 컨볼루셔널 뉴럴 네트워크(convolutional neural network, CNN) 등), 정규화부(예컨대, 배치 정규화(batch normalization), 레이어 정규화(layer normalization) 등), 활성화 함수(sigmoid, gelu, relu, tanh, elu 등), 규제화부(예컨대, 드롭아웃 등)을 포함할 수 있고, 3개의 완전 연결 레이어 중 마지막 레이어는 네트워크부와 소프트맥스 함수를 포함할 수 있다. 예를 들어 음소 판단 모델을 수학식으로 표현하면 수학식 2로 표현될 수 있다.According to an example embodiment, the phoneme judgment model may include three fully-connected layers. Among the three fully connected layers, two layers except the last layer include a network unit (e.g., feed-forward network (FFN), convolutional neural network (CNN), etc.) and a normalization unit (e.g., , batch normalization, layer normalization, etc.), activation functions (sigmoid, gelu, relu, tanh, elu, etc.), regularization units (e.g. dropout, etc.), and can include three complete The last layer among the connection layers may include a network unit and a softmax function. For example, if the phoneme judgment model is expressed mathematically, it can be expressed as Equation 2.
Figure PCTKR2022008366-appb-img-000013
Figure PCTKR2022008366-appb-img-000013
Figure PCTKR2022008366-appb-img-000014
Figure PCTKR2022008366-appb-img-000014
Figure PCTKR2022008366-appb-img-000015
Figure PCTKR2022008366-appb-img-000015
여기서
Figure PCTKR2022008366-appb-img-000016
는 각 토큰의 조합 토큰 임베딩을 나타내고, L은 네트워크부 예컨대, FFN 또는 CNN 등을 나타내고, N은 정규화부 예컨대, 배치 정규화(batch normalization) 또는 레이어 정규화(layer normalization)를 나타내고, A는 활성화 함수 예컨대, sigmoid, gelu, relu, tanh, 또는 elu 등을 나타내고, R은 규제화부 예컨대 드롭아웃 등을 나타내고, dict는 자소-음소 사전의 크기를 나타내고, Softmax는 소프트맥스 함수를 나타내고,
Figure PCTKR2022008366-appb-img-000017
는 각 클래스(음소 후보)에 대한 확률을 나타낼 수 있다.
here
Figure PCTKR2022008366-appb-img-000016
represents the combined token embedding of each token, L represents the network unit such as FFN or CNN, N represents the normalization unit such as batch normalization or layer normalization, and A represents the activation function such as , sigmoid, gelu, relu, tanh, or elu, etc., R represents a regularization part such as dropout, dict represents the size of the grapheme-phoneme dictionary, Softmax represents the softmax function,
Figure PCTKR2022008366-appb-img-000017
can represent the probability for each class (phoneme candidate).
일 실시예에 따르면, 판단부(340)는 각 토큰이 단음자(monophone)인지 다음자(polyphone)인지를 판단할 수 있다. 또한, 판단부(340)는 단음자 토큰은 매칭 테이블 또는 문자소-음소 사전을 이용하여 음소를 판단하고, 다음자 토큰에 대해서만 조합 토큰 임베딩을 이용으로 음소를 판단할 수 있다.According to one embodiment, the determination unit 340 may determine whether each token is a monophone or a polyphone. Additionally, the determination unit 340 may determine the phoneme for a single phonetic token using a matching table or a grapheme-phoneme dictionary, and may determine the phoneme using combination token embedding only for the polyphone token.
예를 들어, 도 5에서 단음자 토큰은 '開'(11) 및 '天'(12)이고, 다음자 토큰은 '??'(13), '地'(14) 및 '的'(15)일 수 있다. 판단부(340)는 단음자 토큰 '開'(11) 및 '天'(12)은 매칭 테이블 또는 문자소-음소 사전을 이용하여 각각의 음소(111, 112)를 판단하고, 다음자 토큰 '??'(13), '地'(14) 및 '的'(15)은 음소 판단 모델을 이용하여 각각의 조합 토큰 임베딩(55, 56, 57)을 기반으로 각각의 음소(113, 114, 115)를 판단할 수 있다.For example, in Figure 5, the single-character tokens are '開' (11) and '天' (12), and the polyphonic tokens are '??' (13), '地' (14), and '的' (15). ) can be. The judgment unit 340 determines the single phoneme tokens 'open' (11) and '天' (12) for each phoneme (111, 112) using a matching table or grapheme-phoneme dictionary, and determines the next letter token ' ??'(13), '地'(14), and '的'(15) use the phoneme judgment model to identify each phoneme (113, 114, 115) can be judged.
한편, 일 실시예에 따르면, 임베딩부(310)는 입력 문자열(10)에 포함된 각 토큰(11 내지 15)의 토큰 임베딩(41 내지 45)을 생성한 후, 생성된 토큰 임베딩(41 내지 45)의 차원을 줄이거나 늘릴 수 있다. 이 경우, 입력 문자열 임베딩의 생성 및 이동, 조합 토큰 임베딩의 생성, 각 토큰의 음소 판단은 각 차원별로 수행될 수 있으며, 각 차원별로 수행된 결과가 통합되어 각 토큰의 음소가 최종적으로 판단될 수 있다.Meanwhile, according to one embodiment, the embedding unit 310 generates token embeddings 41 to 45 for each token 11 to 15 included in the input string 10, and then generates token embeddings 41 to 45 ) can be reduced or increased. In this case, generation and movement of input string embeddings, generation of combination token embeddings, and phoneme determination of each token can be performed for each dimension, and the results performed for each dimension can be integrated to finally determine the phoneme of each token. there is.
도 6은 도 1의 음소 판단부(120)의 다른 실시예를 도시한 도면이고, 도 7은 다른 실시예에 따른 음소 판단 과정을 설명하기 위한 예시도이다.FIG. 6 is a diagram illustrating another embodiment of the phoneme determination unit 120 of FIG. 1, and FIG. 7 is an exemplary diagram for explaining a phoneme determination process according to another embodiment.
도 6 및 도 7을 참조하면, 음소 판단부(120b)는 임베딩부(610), 제로 패딩 추가부(620), 조합부(630) 및 판단부(640)를 포함할 수 있다. 여기서 임베딩부(610) 및 판단부(640)는 각각 도 3의 임베딩부(310) 및 판단부(340)와 실질적으로 동일 또는 유사하므로 그 상세한 설명은 생략하기로 한다.Referring to FIGS. 6 and 7 , the phoneme determination unit 120b may include an embedding unit 610, a zero padding addition unit 620, a combination unit 630, and a determination unit 640. Here, since the embedding unit 610 and the determination unit 640 are substantially the same as or similar to the embedding unit 310 and the determination unit 340 of FIG. 3, their detailed descriptions will be omitted.
제로 패딩 추가부(620)는 임베딩부(610)에서 생성된 입력 문자열 임베딩(46)의 왼쪽과 오른쪽에 제로 패딩 토큰을 추가하여 제로 패딩 토큰이 추가된 입력 문자열 임베딩(71)을 생성할 수 있다.The zero padding addition unit 620 may add zero padding tokens to the left and right sides of the input string embedding 46 generated by the embedding unit 610 to generate an input string embedding 71 to which the zero padding token is added. .
예를 들어, 도 7에 도시된 바와 같이 제로 패딩 추가부(620)는 입력 문자열 임베딩(46)의 왼쪽에 제로 패딩 토큰([0, 0, 0])을 추가하고, 오른쪽에 제로 패딩 토큰([0, 0, 0])을 추가하여, 왼쪽 및 오른쪽에 제로 패딩 토큰이 추가된 입력 문자열 임베딩(71)을 생성할 수 있다.For example, as shown in FIG. 7, the zero padding addition unit 620 adds a zero padding token ([0, 0, 0]) to the left of the input string embedding 46 and a zero padding token ([0, 0, 0]) to the right. By adding [0, 0, 0]), we can generate the input string embedding 71 with zero padding tokens added to the left and right.
조합부(630)는 제로 패딩 토큰이 추가된 입력 문자열 임베딩(71)을 기반으로 각 토큰(11 내지 15)의 조합 토큰 임베딩(53 내지 57)을 생성할 수 있다.The combination unit 630 may generate combination token embeddings 53 to 57 of each token 11 to 15 based on the input string embedding 71 to which a zero padding token is added.
예를 들어, 도 7에 도시된 바와 같이, 조합부(630)는 제로 패딩 토큰이 추가된 입력 문자열 임베딩(71)에서 각 토큰(11 내지 15)의 토큰 임베딩과 각 토큰(11 내지 15)의 좌우 인접 토큰들의 토큰 임베딩들을 추출하고 연결(Concatenate)하여 각 토큰(11 내지 15)의 조합 토큰 임베딩(53 내지 57)을 생성할 수 있다.For example, as shown in FIG. 7, the combination unit 630 combines the token embedding of each token 11 to 15 and the token embedding of each token 11 to 15 in the input string embedding 71 to which a zero padding token is added. Token embeddings of left and right adjacent tokens can be extracted and concatenated to generate combined token embeddings (53 to 57) of each token (11 to 15).
예시적 실시예에 따른 문자소-음소 변환 장치(100)는 입력 문자열을 구성하는 각 토큰의 음소를 판단할 때, 문자열 전체의 문맥이 아니라 지역적 문맥(local context) 즉, 각 토큰의 좌우 인접 토큰들만을 고려하므로, 비교적 가벼운 모델로 적은 연산량을 통하여 정확하게 토큰의 음소 변환이 가능하다.When determining the phoneme of each token constituting the input string, the grapheme-phoneme conversion device 100 according to an exemplary embodiment uses local context, that is, the left and right adjacent tokens of each token, rather than the context of the entire string. Since it only considers the phoneme of the token, it is possible to accurately convert the phoneme of the token through a relatively light model and with a small amount of calculation.
한편 예시적 실시예에 따른 문자소-음소 변환 장치(100)는 텍스트 음성 변환 시스템에 적용될 수 있다. 이때 텍스트 음성 변환 시스템은 임의의 텍스트 데이터를 입력 받아 입력된 텍스트 데이터의 내용을 발화하는 음성 데이터로 변환하는 장치일 수 있다.Meanwhile, the grapheme-phoneme conversion device 100 according to an exemplary embodiment may be applied to a text-to-speech conversion system. At this time, the text-to-speech conversion system may be a device that receives arbitrary text data and converts the contents of the input text data into speech data.
도 8은 예시적 실시예에 따른 문자소-음소 변환 방법을 도시한 흐름도이다.Figure 8 is a flowchart showing a grapheme-phoneme conversion method according to an exemplary embodiment.
도 8의 예시적 실시예에 따른 문자소-음소 변환 방법은 도 1의 문자소-음소 변환 장치(100)에 의해 수행될 수 있다.The grapheme-phoneme conversion method according to the exemplary embodiment of FIG. 8 may be performed by the grapheme-phoneme conversion apparatus 100 of FIG. 1 .
도 8을 참조하면, 문자소-음소 변환 장치는 입력 문자열을 토큰으로 분할할 수 있다(810). 이때 토큰은 어절, 단어, 형태소, 음절, 문자소 등일 수 있으며, 입력 문자열이 중국어인 경우, 토큰은 문자소일 수 있다.Referring to FIG. 8, the grapheme-phoneme conversion device can split the input string into tokens (810). At this time, the token may be a word, word, morpheme, syllable, grapheme, etc., and if the input string is Chinese, the token may be a grapheme.
문자소-음소 변환 장치는 각 토큰과 각 토큰의 좌우 인접 토큰들을 기반으로 각 토큰의 음소를 판단할 수 있다(820). The grapheme-phoneme conversion device can determine the phoneme of each token based on each token and its left and right adjacent tokens (820).
예를 들어, 문자소-음소 변환 장치는 미리 학습된 음소 판단 모델을 이용하여 각 토큰의 음소를 판단할 수 있다. 이때, 음소 판단 모델은 다중 퍼셉트론일 수 있으나 이에 한정되는 것은 아니다.For example, the grapheme-phoneme conversion device can determine the phoneme of each token using a pre-learned phoneme judgment model. At this time, the phoneme judgment model may be a multi-perceptron, but is not limited to this.
일 실시예에 따르면, 문자소-음소 변환 장치는 각 토큰이 단음자인지 다음자인지를 판단하고, 단음자 토큰은 단음자 토큰과 음소가 매칭된 매칭 테이블 또는 문자소-음소 사전을 이용하여 음소를 판단하고, 다음자 토큰에 대해서만 그 토큰과 그 토큰의 좌우 인접 토큰들을 기반으로 음소를 판단할 수 있다.According to one embodiment, the grapheme-phoneme conversion device determines whether each token is a single phoneme or a polyphone, and the single phoneme token is converted into a phoneme using a matching table or grapheme-phoneme dictionary in which single phoneme tokens are matched with phonemes. , and only for the next token, the phoneme can be judged based on that token and its left and right adjacent tokens.
도 9는 도 8의 각 토큰의 음소를 판단하는 과정(820)의 일 실시예를 도시한 흐름도이다.FIG. 9 is a flowchart illustrating an embodiment of a process 820 for determining the phoneme of each token in FIG. 8.
도 9를 참조하면, 문자소-음소 변환 장치는 각 토큰의 토큰 임베딩을 생성할 수 있다(910). 예를 들어, 문자소-음소 변환 장치는 임베딩 모델을 이용하여 각 토큰의 토큰 임베딩을 생성할 수 있다. 이때 임베딩 모델은 머신러닝 모델로서 토큰으로부터 임베딩을 생성하도록 미리 학습될 수 있다.Referring to FIG. 9, the grapheme-phoneme conversion device may generate a token embedding of each token (910). For example, a grapheme-to-phoneme conversion device can generate a token embedding of each token using an embedding model. At this time, the embedding model is a machine learning model and can be learned in advance to generate embeddings from tokens.
문자소-음소 변환 장치는 생성된 각 토큰의 토큰 임베딩을 기반으로 입력 문자열 임베딩을 생성할 수 있다(920). 예를 들어, 문자소-음소 변환 장치는 각 토큰의 토큰 임베딩을 입력 문자열 내 각 토큰의 위치에 맞게 나열하여 입력 문자열 임베딩을 생성할 수 있다.The grapheme-to-phoneme conversion device may generate an input string embedding based on the token embedding of each generated token (920). For example, a grapheme-to-phoneme conversion device may generate an input string embedding by listing the token embedding of each token according to the position of each token in the input string.
문자소-음소 변환 장치는 입력 문자열 임베딩을 오른쪽으로 일정 간격만큼 이동시켜(shift) 오른쪽 이동 임베딩을 생성하고, 입력 문자열 임베딩을 왼쪽으로 일정 간격만큼 이동시켜 왼쪽 이동 임베딩을 생성할 수 있다(930). 이때, 일정 간격은 하나의 토큰일 수 있으나, 이에 한정되는 것은 아니다.The grapheme-phoneme conversion device can create a right-shifted embedding by shifting the input string embedding to the right by a certain interval, and can generate a left-shift embedding by shifting the input string embedding to the left by a certain interval (930). . At this time, a certain interval may be one token, but is not limited thereto.
예를 들어, 문자소-음소 변환 장치는 입력 문자열 임베딩의 왼쪽에 제로 패딩 토큰을 추가하고 맨 오른쪽 토큰 임베딩은 제거함으로써, 오른쪽 이동 임베딩을 생성할 수 있다. 또한, 문자소-음소 변환 장치는 입력 문자열 임베딩의 오른쪽에 제로 패딩 토큰을 추가하고 맨 왼쪽 토큰 임베딩은 제거함으로써, 왼쪽 이동 임베딩을 생성할 수 있다.For example, a grapheme-to-phoneme converter can create a right-shifted embedding by adding zero padding tokens to the left of the input string embedding and removing the rightmost token embedding. Additionally, the grapheme-to-phoneme conversion device can create a left-shifted embedding by adding a zero padding token to the right of the input string embedding and removing the leftmost token embedding.
문자소-음소 변환 장치는 입력 문자열 임베딩, 오른쪽 이동 임베딩 및 왼쪽 이동 임베딩을 쌓고(stack), 그 결과를 기반으로 각 토큰에 대하여 각 토큰의 토큰 임베딩과 각 토큰의 좌우 인접 토큰들의 토큰 임베딩들이 조합된 조합 토큰 임베딩을 생성할 수 있다(940).The grapheme-to-phoneme conversion device stacks the input string embedding, right shift embedding, and left shift embedding, and based on the results, for each token, the token embedding of each token and the token embeddings of the left and right adjacent tokens of each token are combined. A combined token embedding can be generated (940).
예를 들어, 문자소-음소 변환 장치는 아래에서부터 왼쪽 이동 임베딩, 입력 문자열 임베딩 및 오른쪽 이동 임베딩을 순차적으로 쌓고, 왼쪽 이동 임베딩, 입력 문자열 임베딩 및 오른쪽 이동 임베딩 각각에서 동일 위치의 토큰 임베딩을 추출하여 조합함으로써, 각 토큰의 조합 토큰 임베딩을 생성할 수 있다. 예를 들어, 문자소-음소 변환 장치는 추출된 토큰 임베딩들 즉, 각 토큰의 토큰 임베딩과 각 토큰의 좌우 인접 토큰들의 토큰 임베딩들을 연결(concatenate)하여 조합 토큰 임베딩을 생성할 수 있다.For example, the grapheme-to-phoneme converter stacks the left shift embedding, input string embedding, and right shift embedding sequentially from the bottom, and extracts the token embedding at the same position from each of the left shift embedding, input string embedding, and right shift embedding, By combining, we can create a combined token embedding of each token. For example, the grapheme-phoneme conversion device may generate a combination token embedding by concatenating the extracted token embeddings, that is, the token embedding of each token and the token embeddings of the left and right adjacent tokens of each token.
문자소-음소 변환 장치는 각 토큰의 조합 토큰 임베딩을 기반으로 각 토큰의 음소를 판단할 수 있다(950).The grapheme-phoneme conversion device may determine the phoneme of each token based on the combination token embedding of each token (950).
예시적 실시예에 따르면, 문자소-음소 변환 장치는 음소 판단 모델을 이용하여 각 토큰의 조합 토큰 임베딩으로부터 각 토큰의 음소를 판단할 수 있다. 이때, 음소 판단 모델은 각 토큰의 조합 토큰 임베딩으로부터 각 토큰의 음소를 판단할 수 있도록 미리 학습된 머신러닝 모델일 수 있다. 예를 들어, 음소 판단 모델은 다중 퍼셉트론일 수 있으나 이에 한정되는 것은 아니다. According to an example embodiment, the grapheme-to-phoneme conversion device may determine the phoneme of each token from the combined token embedding of each token using a phoneme determination model. At this time, the phoneme judgment model may be a machine learning model trained in advance to determine the phoneme of each token from the combination token embedding of each token. For example, the phoneme judgment model may be a multi-perceptron, but is not limited to this.
예시적 실시예에 따르면, 문자소-음소 변환 장치는 각 토큰이 단음자인지 다음자인지를 판단하고, 단음자 토큰은 매칭 테이블 또는 문자소-음소 사전을 이용하여 음소를 판단하고, 다음자 토큰에 대해서만 조합 토큰 임베딩을 이용으로 음소를 판단할 수 있다.According to an exemplary embodiment, the grapheme-phoneme conversion device determines whether each token is a single phoneme or a polyphone, the monophone token determines the phoneme using a matching table or a grapheme-phoneme dictionary, and the polyphone token is determined by using a matching table or a grapheme-phoneme dictionary. The phoneme can be determined using combination token embedding only.
도 10는 도 8의 각 토큰의 음소를 판단하는 과정(820)의 다른 실시예를 도시한 흐름도이다.FIG. 10 is a flowchart illustrating another embodiment of the process 820 of determining the phoneme of each token in FIG. 8.
도 10을 참조하면, 문자소-음소 변환 장치는 각 토큰의 토큰 임베딩을 생성하고(1010), 생성된 각 토큰의 토큰 임베딩을 기반으로 입력 문자열 임베딩을 생성할 수 있다(1020).Referring to FIG. 10, the grapheme-phoneme conversion device may generate a token embedding of each token (1010) and generate an input string embedding based on the token embedding of each generated token (1020).
문자소-음소 변환 장치는 생성된 입력 문자열 임베딩의 왼쪽과 오른쪽에 제로 패딩 토큰을 추가하여 제로 패딩 토큰이 추가된 입력 문자열 임베딩을 생성할 수 있다(1030).The grapheme-phoneme conversion device may generate an input string embedding with zero padding tokens added by adding zero padding tokens to the left and right sides of the generated input string embedding (1030).
문자소-음소 변환 장치는 왼쪽과 오른쪽에 제로 패딩 토큰이 추가된 입력 문자열 임베딩을 기반으로 각 토큰의 조합 토큰 임베딩을 생성할 수 있다(1040).The grapheme-to-phoneme conversion device may generate a combined token embedding of each token based on the input string embedding with zero padding tokens added to the left and right sides (1040).
예를 들어, 문자소-음소 변환 장치는 왼쪽과 오른쪽에 제로 패딩 토큰이 추가된 입력 문자열 임베딩에서 각 토큰의 토큰 임베딩과 각 토큰의 좌우 인접 토큰들의 토큰 임베딩들을 추출하고 연결(concatenate)하여 각 토큰의 조합 토큰 임베딩을 생성할 수 있다.For example, the grapheme-to-phoneme conversion device extracts and concatenates the token embedding of each token and the token embeddings of the left and right adjacent tokens of each token from the input string embedding with zero padding tokens added to the left and right, and concatenates each token. A combination token embedding can be created.
문자소-음소 변환 장치는 각 토큰의 조합 토큰 임베딩을 기반으로 각 토큰의 음소를 판단할 수 있다(950).The grapheme-phoneme conversion device may determine the phoneme of each token based on the combination token embedding of each token (950).
예시적 실시예에 따르면, 문자소-음소 변환 장치는 각 토큰이 단음자인지 다음자인지를 판단하고, 단음자 토큰은 매칭 테이블 또는 문자소-음소 사전을 이용하여 음소를 판단하고, 다음자 토큰에 대해서만 조합 토큰 임베딩을 이용으로 음소를 판단할 수 있다.According to an exemplary embodiment, the grapheme-phoneme conversion device determines whether each token is a single phoneme or a polyphone, the monophone token determines the phoneme using a matching table or a grapheme-phoneme dictionary, and the polyphone token is determined by using a matching table or a grapheme-phoneme dictionary. The phoneme can be determined using combination token embedding only.
도 11은 예시적인 실시예들에서 사용되기에 적합한 컴퓨팅 장치를 포함하는 컴퓨팅 환경을 예시하여 설명하기 위한 블록도이다. 도시된 실시예에서, 각 컴포넌트들은 이하에 기술된 것 이외에 상이한 기능 및 능력을 가질 수 있고, 이하에 기술된 것 이외에도 추가적인 컴포넌트를 포함할 수 있다.11 is a block diagram illustrating and illustrating a computing environment including a computing device suitable for use in example embodiments. In the illustrated embodiment, each component may have different functions and capabilities in addition to those described below, and may include additional components in addition to those described below.
도시된 컴퓨팅 환경(1100)은 컴퓨팅 장치(1110)를 포함한다. 일 실시예에서, 컴퓨팅 장치(1110)는 문자소-음소 변환 장치(100)일 수 있다.The illustrated computing environment 1100 includes a computing device 1110 . In one embodiment, computing device 1110 may be a grapheme-to-phoneme conversion device 100.
컴퓨팅 장치(1110)는 적어도 하나의 프로세서(1111), 컴퓨터 판독 가능 저장 매체(1112) 및 통신 버스(1113)를 포함할 수 있다. 프로세서(1111)는 컴퓨팅 장치(1110)로 하여금 앞서 언급된 예시적인 실시예에 따라 동작하도록 할 수 있다. 예컨대, 프로세서(1110)는 컴퓨터 판독 가능 저장 매체(1112)에 저장된 하나 이상의 프로그램들을 실행할 수 있다. 하나 이상의 프로그램들은 하나 이상의 컴퓨터 실행 가능 명령어를 포함할 수 있으며, 컴퓨터 실행 가능 명령어는 프로세서(1111)에 의해 실행되는 경우 컴퓨팅 장치(1110)로 하여금 예시적인 실시예에 따른 동작들을 수행하도록 구성될 수 있다. Computing device 1110 may include at least one processor 1111, a computer-readable storage medium 1112, and a communication bus 1113. Processor 1111 may cause computing device 1110 to operate according to the above-mentioned example embodiments. For example, the processor 1110 may execute one or more programs stored in the computer-readable storage medium 1112. One or more programs may include one or more computer-executable instructions, which, when executed by the processor 1111, may be configured to cause computing device 1110 to perform operations according to example embodiments. there is.
컴퓨터 판독 가능 저장 매체(1112)는 컴퓨터 실행 가능 명령어 내지 프로그램 코드, 프로그램 데이터 및/또는 다른 적합한 형태의 정보를 저장하도록 구성될 수 있다. 컴퓨터 판독 가능 저장 매체(1112)에 저장된 프로그램(1114)은 프로세서(1111)에 의해 실행 가능한 명령어의 집합을 포함할 수 있다. 일 실시예에서, 컴퓨터 판독 가능 저장 매체(1112)는 메모리(랜덤 액세스 메모리와 같은 휘발성 메모리, 비휘발성 메모리, 또는 이들의 적절한 조합), 하나 이상의 자기 디스크 저장 디바이스들, 광학 디스크 저장 디바이스들, 플래시 메모리 디바이스들, 그 밖에 컴퓨팅 장치(1110)에 의해 액세스되고 원하는 정보를 저장할 수 있는 다른 형태의 저장 매체, 또는 이들의 적합한 조합일 수 있다.Computer-readable storage medium 1112 may be configured to store computer-executable instructions or program code, program data, and/or other suitable forms of information. The program 1114 stored in the computer-readable storage medium 1112 may include a set of instructions executable by the processor 1111. In one embodiment, computer-readable storage medium 1112 includes memory (volatile memory, such as random access memory, non-volatile memory, or an appropriate combination thereof), one or more magnetic disk storage devices, optical disk storage devices, flash It may be memory devices, another form of storage medium that can be accessed by computing device 1110 and store desired information, or a suitable combination thereof.
통신 버스(1113)는 컴퓨팅 장치(1110)의 다른 다양한 컴포넌트들을 상호 연결할 수 있다. Communication bus 1113 may interconnect various other components of computing device 1110.
컴퓨팅 장치(1110)는 또한 하나 이상의 입출력 장치(1120)를 위한 인터페이스를 제공하는 하나 이상의 입출력 인터페이스(1115) 및 하나 이상의 네트워크 통신 인터페이스(1116)를 포함할 수 있다. 입출력 인터페이스(1115) 및 네트워크 통신 인터페이스(1116)는 통신 버스(1113)에 연결될 수 있다. 입출력 장치(1120)는 입출력 인터페이스(1115)를 통해 컴퓨팅 장치(1110)의 다른 컴포넌트들에 연결될 수 있다. 예시적인 입출력 장치(1120)는 포인팅 장치(마우스 또는 트랙패드 등), 키보드, 터치 입력 장치(터치패드 또는 터치스크린 등), 음성 또는 소리 입력 장치, 다양한 종류의 센서 장치 및/또는 촬영 장치와 같은 입력 장치, 및/또는 디스플레이 장치, 프린터, 스피커 및/또는 네트워크 카드와 같은 출력 장치를 포함할 수 있다. 예시적인 입출력 장치(1120)는 컴퓨팅 장치(1110)를 구성하는 일 컴포넌트로서 컴퓨팅 장치(1110)의 내부에 포함될 수도 있고, 컴퓨팅 장치(1110)와는 구별되는 별개의 장치로 컴퓨팅 장치(1110)와 연결될 수도 있다. Computing device 1110 may also include one or more input/output interfaces 1115 and one or more network communication interfaces 1116 that provide an interface for one or more input/output devices 1120. The input/output interface 1115 and the network communication interface 1116 may be connected to the communication bus 1113. Input/output device 1120 may be connected to other components of computing device 1110 through input/output interface 1115. Exemplary input/output devices 1120 include, but are not limited to, a pointing device (such as a mouse or trackpad), a keyboard, a touch input device (such as a touchpad or touch screen), a voice or sound input device, various types of sensor devices, and/or an imaging device. It may include input devices and/or output devices such as display devices, printers, speakers, and/or network cards. The exemplary input/output device 1120 may be included within the computing device 1110 as a component that constitutes the computing device 1110, or may be connected to the computing device 1110 as a separate device distinct from the computing device 1110. It may be possible.
이제까지 본 발명에 대하여 그 바람직한 실시 예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 따라서, 본 발명의 범위는 전술한 실시 예에 한정되지 않고 특허 청구범위에 기재된 내용과 동등한 범위 내에 있는 다양한 실시 형태가 포함되도록 해석되어야 할 것이다.So far, the present invention has been examined focusing on its preferred embodiments. A person skilled in the art to which the present invention pertains will understand that the present invention may be implemented in a modified form without departing from the essential characteristics of the present invention. Accordingly, the scope of the present invention is not limited to the above-described embodiments, but should be construed to include various embodiments within the scope equivalent to the content described in the patent claims.

Claims (16)

  1. 입력 문자열을 토큰으로 분할하는 토큰화부; 및A tokenization unit that splits the input string into tokens; and
    각 토큰과 상기 각 토큰의 좌우 인접 토큰들을 기반으로 상기 각 토큰의 음소를 판단하는 음소 판단부; 를 포함하는,a phoneme determination unit that determines the phoneme of each token based on each token and its left and right adjacent tokens; Including,
    문자소-음소 변환 장치.A grapheme-to-phoneme converter.
  2. 제1항에 있어서,According to paragraph 1,
    상기 입력 문자열은 중국어이고, 상기 토큰은 문자소인,The input string is Chinese, the token is a character stamp,
    문자소-음소 변환 장치.A grapheme-to-phoneme converter.
  3. 제1항에 있어서,According to paragraph 1,
    상기 음소 판단부는,The phoneme judgment unit,
    상기 각 토큰이 단음자인지 다음자인지를 판단하고, 단음자 토큰은 매칭 테이블 또는 문자소-음소 사전을 이용하여 음소를 판단하고, 다음자 토큰은 그 토큰과 그 토큰의 좌우 인접 토큰들을 기반으로 음소를 판단하는,It is determined whether each token is a single phoneme or a polyphone, the phoneme is determined for the monophone token using a matching table or a grapheme-phoneme dictionary, and the polyphonic token is based on the token and its left and right adjacent tokens. judging phonemes,
    문자소-음소 변환 장치.A grapheme-to-phoneme converter.
  4. 제1항에 있어서,According to paragraph 1,
    상기 음소 판단부는,The phoneme judgment unit,
    미리 학습된 다중 퍼셉트론 기반 음소 판단 모델을 이용하여 상기 각 토큰의 음소를 판단하는,Determining the phoneme of each token using a pre-trained multi-perceptron-based phoneme judgment model,
    문자소-음소 변환 장치.A grapheme-to-phoneme converter.
  5. 제1항에 있어서,According to paragraph 1,
    상기 음소 판단부는,The phoneme judgment unit,
    상기 각 토큰의 토큰 임베딩을 생성하고, 상기 생성된 토큰 임베딩을 기반으로 상기 입력 문자열에 대응하는 입력 문자열 임베딩을 생성하는 임베딩부;an embedding unit that generates a token embedding of each token and generates an input string embedding corresponding to the input string based on the generated token embedding;
    상기 입력 문자열 임베딩을 왼쪽으로 일정 간격만큼 이동시켜 왼쪽 이동 임베딩을 생성하고, 상기 입력 문자열 임베딩을 오른쪽으로 상기 일정 간격만큼 이동시켜 오른쪽 이동 임베딩을 생성하는 이동부;a moving unit for generating a left-shifted embedding by moving the input string embedding to the left by a predetermined interval and generating a right-shifting embedding by moving the input string embedding to the right by a predetermined interval;
    상기 입력 문자열 임베딩, 상기 왼쪽 이동 임베딩 및 상기 오른쪽 이동 임베딩을 쌓고(stack), 쌓은 결과를 기반으로 상기 각 토큰의 토큰 임베딩과 상기 각 토큰의 좌우 인접 토큰들의 토큰 임베딩들이 조합된 각 토큰의 조합 토큰 임베딩을 생성하는 조합부; 및The input string embedding, the left shift embedding, and the right shift embedding are stacked, and based on the stacking result, the token embedding of each token and the token embeddings of the left and right adjacent tokens of each token are combined to form a combination token of each token. A combination unit that generates embeddings; and
    상기 생성된 조합 토큰 임베딩을 기반으로 상기 각 토큰의 음소를 판단하는 판단부; 를 포함하는,a determination unit that determines the phoneme of each token based on the generated combination token embedding; Including,
    문자소-음소 변환 장치.A grapheme-to-phoneme converter.
  6. 제5항에 있어서,According to clause 5,
    상기 일정 간격은 하나의 토큰인,The regular interval is one token,
    문자소-음소 변환 장치.A grapheme-to-phoneme converter.
  7. 제5항에 있어서,According to clause 5,
    상기 이동부는,The moving part,
    상기 입력 문자열 임베딩의 오른쪽에 제로 패딩 토큰을 추가하고, 맨 왼쪽 토큰 임베딩은 제거하여 상기 왼쪽 이동 임베딩을 생성하고, 상기 입력 문자열 임베딩의 왼쪽에 제로 패딩 토큰을 추가하고 맨 오른쪽 토큰 임베딩은 제거하여 상기 오른쪽 이동 임베딩을 생성하는,Create the left shifted embedding by adding a zero padding token to the right of the input string embedding and removing the leftmost token embedding, and adding a zero padding token to the left of the input string embedding and removing the rightmost token embedding to create the left shift embedding. Generating a right shift embedding,
    문자소-음소 변환 장치.A grapheme-to-phoneme converter.
  8. 제1항에 있어서,According to paragraph 1,
    상기 음소 판단부는,The phoneme judgment unit,
    상기 각 토큰의 토큰 임베딩을 생성하고, 상기 생성된 토큰 임베딩을 기반으로 상기 입력 문자열에 대응하는 입력 문자열 임베딩을 생성하는 임베딩부;an embedding unit that generates a token embedding of each token and generates an input string embedding corresponding to the input string based on the generated token embedding;
    상기 생성된 입력 문자열 임베딩의 왼쪽과 오른쪽에 제로 패딩 토큰을 추가하는 제로 패딩 추가부;a zero padding addition unit that adds zero padding tokens to the left and right sides of the generated input string embedding;
    상기 제로 패딩 토큰이 추가된 입력 문자열 임베딩을 기반으로 상기 각 토큰의 토큰 임베딩과 상기 각 토큰의 좌우 인접 토큰들의 토큰 임베딩들이 조합된 상기 각 토큰의 조합 토큰 임베딩을 생성하는 조합부; 및A combination unit that generates a combination token embedding of each token by combining the token embedding of each token and token embeddings of left and right adjacent tokens of each token based on the input string embedding to which the zero padding token is added; and
    상기 생성된 조합 토큰 임베딩을 기반으로 상기 각 토큰의 음소를 판단하는 판단부; 를 포함하는,a determination unit that determines the phoneme of each token based on the generated combination token embedding; Including,
    문자소-음소 변환 장치.A grapheme-to-phoneme converter.
  9. 입력 문자열을 토큰으로 분할하는 단계; 및splitting the input string into tokens; and
    각 토큰과 상기 각 토큰의 좌우 인접 토큰들을 기반으로 상기 각 토큰의 음소를 판단하는 단계; 를 포함하는,determining the phoneme of each token based on each token and its left and right adjacent tokens; Including,
    문자소-음소 변환 방법.How to convert grapheme to phoneme.
  10. 제9항에 있어서,According to clause 9,
    상기 입력 문자열은 중국어이고, 상기 토큰은 문자소인,The input string is Chinese, the token is a character stamp,
    문자소-음소 변환 방법.How to convert grapheme to phoneme.
  11. 제9항에 있어서,According to clause 9,
    상기 각 토큰의 음소를 판단하는 단계는,The step of determining the phoneme of each token is,
    상기 각 토큰이 단음자인지 다음자인지를 판단하고, 단음자 토큰은 매칭 테이블 또는 문자소-음소 사전을 이용하여 음소를 판단하고, 다음자 토큰은 그 토큰과 그 토큰의 좌우 인접 토큰들을 기반으로 음소를 판단하는,It is determined whether each token is a single phoneme or a polyphone, the phoneme is determined for the monophone token using a matching table or a grapheme-phoneme dictionary, and the polyphonic token is based on the token and its left and right adjacent tokens. judging phonemes,
    문자소-음소 변환 방법.How to convert grapheme to phoneme.
  12. 제9항에 있어서,According to clause 9,
    상기 각 토큰의 음소를 판단하는 단계는,The step of determining the phoneme of each token is,
    미리 학습된 다중 퍼셉트론 기반 음소 판단 모델을 이용하여 상기 각 토큰의 음소를 판단하는,Determining the phoneme of each token using a pre-trained multi-perceptron-based phoneme judgment model,
    문자소-음소 변환 방법.How to convert grapheme to phoneme.
  13. 제9항에 있어서,According to clause 9,
    상기 각 토큰의 음소를 판단하는 단계는,The step of determining the phoneme of each token is,
    상기 각 토큰의 토큰 임베딩을 생성하는 단계;generating a token embedding of each token;
    상기 생성된 토큰 임베딩을 기반으로 상기 입력 문자열에 대응하는 입력 문자열 임베딩을 생성하는 단계;generating an input string embedding corresponding to the input string based on the generated token embedding;
    상기 입력 문자열 임베딩을 왼쪽으로 일정 간격만큼 이동시켜 왼쪽 이동 임베딩을 생성하는 단계;generating a left-shifted embedding by shifting the input string embedding to the left by a predetermined interval;
    상기 입력 문자열 임베딩을 오른쪽으로 상기 일정 간격만큼 이동시켜 오른쪽 이동 임베딩을 생성하는 단계;generating a right-shifted embedding by shifting the input string embedding to the right by the predetermined interval;
    상기 입력 문자열 임베딩, 상기 왼쪽 이동 임베딩 및 상기 오른쪽 이동 임베딩을 쌓고(stack), 쌓은 결과를 기반으로 상기 각 토큰의 토큰 임베딩과 상기 각 토큰의 좌우 인접 토큰들의 토큰 임베딩들이 조합된 각 토큰의 조합 토큰 임베딩을 생성하는 단계; 및The input string embedding, the left shift embedding, and the right shift embedding are stacked, and based on the stacking result, the token embedding of each token and the token embeddings of the left and right adjacent tokens of each token are combined to form a combination token of each token. generating an embedding; and
    상기 생성된 조합 토큰 임베딩을 기반으로 상기 각 토큰의 음소를 판단하는 단계; 를 포함하는,determining the phoneme of each token based on the generated combination token embedding; Including,
    문자소-음소 변환 방법.How to convert grapheme to phoneme.
  14. 제13항에 있어서,According to clause 13,
    상기 일정 간격은 하나의 토큰인,The regular interval is one token,
    문자소-음소 변환 방법.How to convert grapheme to phoneme.
  15. 제13항에 있어서,According to clause 13,
    상기 왼쪽 이동 임베딩을 생성하는 단계는,The step of generating the left shift embedding is,
    상기 입력 문자열 임베딩의 오른쪽에 제로 패딩 토큰을 추가하고, 맨 왼쪽 토큰 임베딩은 제거하여 상기 왼쪽 이동 임베딩을 생성하고,Create the left shift embedding by adding a zero padding token to the right of the input string embedding and removing the leftmost token embedding,
    상기 오른쪽 이동 임베딩을 생성하는 단계는,The step of generating the right shift embedding is,
    상기 입력 문자열 임베딩의 왼쪽에 제로 패딩 토큰을 추가하고 맨 오른쪽 토큰 임베딩은 제거하여 상기 오른쪽 이동 임베딩을 생성하는,creating the right-shifted embedding by adding a zero padding token to the left of the input string embedding and removing the rightmost token embedding,
    문자소-음소 변환 방법.How to convert grapheme to phoneme.
  16. 제9항에 있어서,According to clause 9,
    상기 각 토큰의 음소를 판단하는 단계는,The step of determining the phoneme of each token is,
    상기 각 토큰의 토큰 임베딩을 생성하는 단계;generating a token embedding of each token;
    상기 생성된 토큰 임베딩을 기반으로 상기 입력 문자열에 대응하는 입력 문자열 임베딩을 생성하는 단계;generating an input string embedding corresponding to the input string based on the generated token embedding;
    상기 생성된 입력 문자열 임베딩의 왼쪽과 오른쪽에 제로 패딩 토큰을 추가하는 단계;adding zero padding tokens to the left and right sides of the generated input string embedding;
    상기 제로 패딩 토큰이 추가된 입력 문자열 임베딩을 기반으로 상기 각 토큰의 토큰 임베딩과 상기 각 토큰의 좌우 인접 토큰들의 토큰 임베딩들이 조합된 상기 각 토큰의 조합 토큰 임베딩을 생성하는 단계; 및Generating a combined token embedding of each token by combining the token embedding of each token and the token embeddings of left and right adjacent tokens of each token based on the input string embedding to which the zero padding token is added; and
    상기 생성된 조합 토큰 임베딩을 기반으로 상기 각 토큰의 음소를 판단하는 단계; 를 포함하는,determining the phoneme of each token based on the generated combination token embedding; Including,
    문자소-음소 변환 방법.How to convert grapheme to phoneme.
PCT/KR2022/008366 2022-06-10 2022-06-14 Apparatus and method for converting grapheme to phoneme WO2023238975A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR10-2022-0070726 2022-06-10
KR1020220070726A KR102622609B1 (en) 2022-06-10 2022-06-10 Apparatus and method for converting grapheme to phoneme

Publications (1)

Publication Number Publication Date
WO2023238975A1 true WO2023238975A1 (en) 2023-12-14

Family

ID=89118522

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2022/008366 WO2023238975A1 (en) 2022-06-10 2022-06-14 Apparatus and method for converting grapheme to phoneme

Country Status (2)

Country Link
KR (1) KR102622609B1 (en)
WO (1) WO2023238975A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110091294A (en) * 2010-02-05 2011-08-11 고려대학교 산학협력단 Automatic loanword-to-korean transliteration method and apparatus
KR20190064803A (en) * 2017-12-01 2019-06-11 건국대학교 산학협력단 Method for training language model using zero padding and apparatus therefor
US20210209311A1 (en) * 2018-11-28 2021-07-08 Ping An Technology (Shenzhen) Co., Ltd. Sentence distance mapping method and apparatus based on machine learning and computer device
KR20220010259A (en) * 2020-07-17 2022-01-25 삼성전자주식회사 Natural language processing method and apparatus
KR20220054772A (en) * 2020-09-25 2022-05-03 주식회사 딥브레인에이아이 Method and apparatus for synthesizing voice of based text

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102462932B1 (en) 2020-08-03 2022-11-04 주식회사 딥브레인에이아이 Apparatus and method for preprocessing text

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110091294A (en) * 2010-02-05 2011-08-11 고려대학교 산학협력단 Automatic loanword-to-korean transliteration method and apparatus
KR20190064803A (en) * 2017-12-01 2019-06-11 건국대학교 산학협력단 Method for training language model using zero padding and apparatus therefor
US20210209311A1 (en) * 2018-11-28 2021-07-08 Ping An Technology (Shenzhen) Co., Ltd. Sentence distance mapping method and apparatus based on machine learning and computer device
KR20220010259A (en) * 2020-07-17 2022-01-25 삼성전자주식회사 Natural language processing method and apparatus
KR20220054772A (en) * 2020-09-25 2022-05-03 주식회사 딥브레인에이아이 Method and apparatus for synthesizing voice of based text

Also Published As

Publication number Publication date
KR20230170346A (en) 2023-12-19
KR102622609B1 (en) 2024-01-09

Similar Documents

Publication Publication Date Title
Chomsky On certain formal properties of grammars
WO2017010652A1 (en) Automatic question and answer method and device therefor
WO2021162362A1 (en) Method of training voice recognition model and voice recognition device trained by using same method
WO2020204364A2 (en) Method and device for word embedding on basis of context information and morphological information of word
WO2015050321A1 (en) Apparatus for generating self-learning alignment-based alignment corpus, method therefor, apparatus for analyzing destructive expression morpheme by using alignment corpus, and morpheme analysis method therefor
WO2015023035A1 (en) Preposition error correcting method and device performing same
WO2021132797A1 (en) Method for classifying emotions of speech in conversation by using semi-supervised learning-based word-by-word emotion embedding and long short-term memory model
Khan et al. Speak Pakistan: Challenges in developing Pakistan sign language using information technology
WO2016208941A1 (en) Text preprocessing method and preprocessing system for performing same
WO2014106979A1 (en) Method for recognizing statistical voice language
WO2022030732A1 (en) Apparatus and method for preprocessing text
Yu et al. Multilingual grapheme-to-phoneme conversion with byte representation
WO2014142422A1 (en) Method for processing dialogue based on processing instructing expression and apparatus therefor
WO2023238975A1 (en) Apparatus and method for converting grapheme to phoneme
WO2022060060A1 (en) Method for generating educational foreign language text by adjusting difficulty level of text, computer program therefor, and apparatus therefor
WO2023163383A1 (en) Multimodal-based method and apparatus for recognizing emotion in real time
WO2022065603A1 (en) Text-based voice synthesis method and device
Dutta Word-level language identification using subword embeddings for code-mixed Bangla-English social media data
WO2022131740A1 (en) Methods and systems for generating abbreviations for a target word
WO2009148224A2 (en) Latin character input device and portable terminal unit utilizing same
WO2022154341A1 (en) Operation method of speech synthesis system
Nga et al. Cyclic Transfer Learning for Mandarin-English Code-Switching Speech Recognition
WO2022131851A1 (en) A method and systems for decoding an audio query
WO2022114327A1 (en) Method and device for recognizing entity name in input sentence
WO2024029726A1 (en) Device and method for emotion recognition

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

Country of ref document: EP

Kind code of ref document: A1