KR20230054242A - Electronic device and control method thereof - Google Patents

Electronic device and control method thereof Download PDF

Info

Publication number
KR20230054242A
KR20230054242A KR1020220046172A KR20220046172A KR20230054242A KR 20230054242 A KR20230054242 A KR 20230054242A KR 1020220046172 A KR1020220046172 A KR 1020220046172A KR 20220046172 A KR20220046172 A KR 20220046172A KR 20230054242 A KR20230054242 A KR 20230054242A
Authority
KR
South Korea
Prior art keywords
language
feature vector
text
external device
decoder
Prior art date
Application number
KR1020220046172A
Other languages
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 삼성전자주식회사
Priority to PCT/KR2022/012876 priority Critical patent/WO2023063569A1/en
Priority to EP22881199.8A priority patent/EP4332960A1/en
Priority to US18/105,011 priority patent/US20230197059A1/en
Publication of KR20230054242A publication Critical patent/KR20230054242A/en

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/28Constructional details of speech recognition systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/58Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation
    • 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/005Language recognition
    • 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
    • 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/26Speech to text systems

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)
  • Machine Translation (AREA)

Abstract

An electronic device is disclosed. The electronic device includes: a microphone; a communication interface including a communication circuit; a memory storing a first encoder and a first decoder corresponding to a first language; and a processor, when receiving a user voice in the first language through the microphone, acquiring a text in the first language corresponding to the user voice, inputting the text in the first language into the first encoder and acquiring a first feature vector, transmitting the first feature vector to an external device through the communication interface, and, when receiving a second feature vector from the external device through the communication interface, inputting the second feature vector into the second feature vector and acquiring a text in the first language corresponding to the second feature vector. Therefore, the present invention is capable of providing a smooth translation function without an excessive resource request.

Description

전자 장치 및 그 제어 방법 { Electronic device and control method thereof }Electronic device and control method thereof { Electronic device and control method thereof }

본 발명은 전자 장치 및 그 제어 방법에 관한 것으로, 더욱 상세하게는, 사용자 음성을 수신하는 전자 장치 및 그 제어 방법에 관한 것이다.The present invention relates to an electronic device and a control method thereof, and more particularly, to an electronic device receiving a user's voice and a control method thereof.

최근, 다수의 전자 장치에 번역 기능이 탑재되고 있다. Recently, many electronic devices are equipped with a translation function.

전자 장치에 탑재되는 번역 기능은 기본적으로 사용자의 음성을 인코딩하는 인코더와, 번역(또는, 통역)하고자 하는 타 언어로 디코딩하는 디코더를 이용하여 수행가능하다.The translation function installed in the electronic device can basically be performed using an encoder that encodes a user's voice and a decoder that decodes into another language to be translated (or interpreted).

통신을 수행하는 외부 장치 예를 들어, 통화 상대방의 언어를 전자 장치의 사용자의 언어로 번역하기 위해서는, 전자 장치가 통화 상대방의 언어에 대응되는 인코더와 디코더를 구비하여야 한다.In order to translate the language of an external device performing communication, for example, the language of the other party to the language of the user of the electronic device, the electronic device must be equipped with an encoder and a decoder corresponding to the language of the other party.

따라서, 다양한 언어를 모두 사용자의 언어로 번역하기 위해서는 다양한 언어 모두에 대응되는 인코더와 디코더를 구비하여야 하므로, 온 디바이스(On device) 형태로 번역 기능을 제공하기에는 전자 장치의 리소스 상 한계가 있으며, 전자 장치의 제품 사양이 높아야만 원활한 번역이 가능하다는 문제가 있다.Therefore, in order to translate all of the various languages into the user's language, since encoders and decoders corresponding to all of the various languages must be provided, there is a resource limit of the electronic device to provide the translation function in the form of an on device. There is a problem that smooth translation is possible only when the product specifications of the device are high.

전자 장치가 외부 서버로 사용자 음성을 전송한 뒤에, 번역하고자 하는 언어(예를 들어, 타겟 언어)의 텍스트를 수신하는 경우에는, 다양한 언어 모두에 대응되는 인코더와 디코더를 구비할 필요는 없으나, 해킹의 위험, 개인 정보 또는 사생활 노출 위험 등 보안 관련 이슈가 있다.When an electronic device receives text in a language to be translated (eg, a target language) after transmitting user voice to an external server, it is not necessary to have encoders and decoders corresponding to various languages, but hacking There are security-related issues, such as the risk of personal information or privacy exposure.

따라서, 다양한 언어 모두에 대응되는 인코더와 디코더를 구비하지 않아도, 온 디바이스로 원활한 번역 기능을 제공하는 전자 장치, 방법에 대한 필요성이 대두되었다.Therefore, there is a need for an electronic device and method for providing a smooth translation function on-device without having encoders and decoders corresponding to various languages.

본 개시는 상술한 필요성에 따른 것으로, 본 개시의 목적은, 전자 장치가 외부 장치와 특징 벡터를 송수신하여 번역 기능을 제공하는 전자 장치 및 그 제어 방법을 제공함에 있다. The present disclosure has been made in accordance with the above-mentioned necessity, and an object of the present disclosure is to provide an electronic device and a control method for providing a translation function by transmitting and receiving a feature vector to and from an external device.

이상과 같은 목적을 달성하기 위한 본 개시의 일 실시 예에 따른 전자 장치는, 마이크, 통신 회로를 포함하는 통신 인터페이스, 제1 언어에 대응되는 제1 인코더 및 제1 디코더를 저장하는 메모리 및 상기 마이크를 통해 상기 제1 언어의 사용자 음성이 수신되면, 상기 사용자 음성에 대응되는 상기 제1 언어의 텍스트를 획득하고, 상기 제1 언어의 텍스트를 상기 제1 인코더에 입력하여 제1 특징 벡터를 획득하고, 상기 통신 인터페이스를 통해 상기 제1 특징 벡터를 외부 장치로 전송하며, 상기 통신 인터페이스를 통해 상기 외부 장치로부터 제2 특징 벡터가 수신되면, 상기 제2 특징 벡터를 상기 제1 디코더에 입력하여 상기 제2 특징 벡터에 대응되는 상기 제1 언어의 텍스트를 획득하는 프로세서를 포함한다.An electronic device according to an embodiment of the present disclosure for achieving the above object is a communication interface including a microphone and a communication circuit, a memory for storing a first encoder and a first decoder corresponding to a first language, and the microphone. When the user voice of the first language is received through, obtaining a text of the first language corresponding to the user voice, inputting the text of the first language to the first encoder to obtain a first feature vector, , Transmits the first feature vector to an external device through the communication interface, and when a second feature vector is received from the external device through the communication interface, the second feature vector is input to the first decoder to generate the first feature vector. and a processor for acquiring the text of the first language corresponding to the 2 feature vectors.

여기서, 상기 제1 인코더는, 제1 언어의 제1 텍스트 및 벡터 공간 상의 특징 벡터를 입력 데이터 및 출력 데이터로 하여 학습된 모델이고, 상기 제1 언어와 상이한 제2 언어에 대응되는 제2 인코더는, 상기 제1 텍스트와 임계 값 이상의 유사도를 가지는 제2 언어의 제2 텍스트 및 상기 벡터 공간 상의 상기 특징 벡터를 입력 데이터 및 출력 데이터로 하여 학습된 모델일 수 있다.Here, the first encoder is a model learned using a first text of a first language and a feature vector on a vector space as input data and output data, and a second encoder corresponding to a second language different from the first language is , It may be a model learned by using the second text of the second language having a similarity with the first text and a threshold value or higher and the feature vector on the vector space as input data and output data.

여기서, 상기 제2 언어에 대응되는 상기 제2 인코더는, 상기 외부 장치에 포함되며, 상기 제2 언어의 사용자 음성에 대응되는 텍스트가 입력되면, 상기 제2 특징 벡터를 출력할 수 있다.Here, the second encoder corresponding to the second language is included in the external device and can output the second feature vector when text corresponding to the user's voice of the second language is input.

또한, 상기 제1 디코더는, 벡터 공간 상의 특징 벡터 및 제1 언어의 제1 텍스트를 입력 데이터 및 출력 데이터로 하여 학습된 모델이고, 상기 제1 언어와 상이한 제2 언어에 대응되는 제2 디코더는, 상기 벡터 공간 상의 상기 특징 벡터 및 상기 제1 텍스트와 임계 값 이상의 유사도를 가지는 제2 언어의 제2 텍스트를 입력 데이터 및 출력 데이터로 하여 학습된 모델일 수 있다.In addition, the first decoder is a model learned using a feature vector on a vector space and a first text of a first language as input data and output data, and a second decoder corresponding to a second language different from the first language , The feature vector on the vector space and the second text of the second language having a similarity with the first text at or above a threshold value may be a model learned as input data and output data.

여기서, 상기 제2 언어에 대응되는 상기 제2 디코더는, 상기 외부 장치에 포함되며, 상기 전자 장치로부터 수신된 상기 제1 특징 벡터가 입력되면, 상기 제2 언어의 텍스트를 출력할 수 있다.Here, the second decoder corresponding to the second language is included in the external device and can output text of the second language when the first feature vector received from the electronic device is input.

또한, 상기 프로세서는, 상기 외부 장치와 통신을 수행하여 상기 외부 장치가 상기 제2 언어에 대응되는 제2 디코더를 포함하는지 여부를 식별하고, 상기 외부 장치가 상기 제2 디코더를 포함하는 것으로 식별되면, 상기 제1 특징 벡터를 상기 외부 장치로 전송하고, 상기 외부 장치가 상기 제2 디코더를 포함하지 않는 것으로 식별되면, 상기 제1 특징 벡터를 서버로 전송할 수 있다.In addition, the processor performs communication with the external device to identify whether the external device includes a second decoder corresponding to the second language, and if the external device is identified as including the second decoder, , The first feature vector may be transmitted to the external device, and if the external device is identified as not including the second decoder, the first feature vector may be transmitted to the server.

또한, 스피커를 더 포함하며, 상기 프로세서는, TTS(Text to speech)를 이용하여 상기 제1 언어의 텍스트에 대응되는 상기 제1 언어의 사운드를 획득하고, 상기 제1 언어의 사운드를 상기 스피커를 통해 출력할 수 있다.The processor may further include a speaker, wherein the processor obtains a sound of the first language corresponding to the text of the first language using Text to Speech (TTS), and transmits the sound of the first language through the speaker. can be output through

또한, 상기 메모리는, 컴프레서(compressor) 및 디컴프레서(decompressor)를 더 포함하며, 상기 프로세서는, 상기 컴프레서에 기초하여 상기 제1 특징 벡터를 압축하며, 상기 압축된 제1 특징 벡터를 상기 통신 인터페이스를 통해 상기 외부 장치로 전송하고, 상기 외부 장치로부터 압축된 제2 특징 벡터가 수신되면, 상기 디컴프레서에 기초하여 상기 압축된 제2 특징 벡터를 압축 해제하고, 상기 압축 해제된 제2 특징 벡터를 상기 제1 디코더에 입력할 수 있다.The memory further includes a compressor and a decompressor, and the processor compresses the first feature vector based on the compressor, and transmits the compressed first feature vector to the communication interface. is transmitted to the external device through and when the compressed second feature vector is received from the external device, the compressed second feature vector is decompressed based on the decompressor, and the decompressed second feature vector is may be input to the first decoder.

또한, 상기 제1 인코더 및 상기 제1 디코더는, 신경망 기계 번역(Neural machine translation, NMT) 모델에 포함되며, 상기 신경망 기계 번역 모델은, 상기 사용자 음성이 입력되면, 상기 사용자 음성에 대응되는 텍스트를 벡터 값으로 변환하여 상기 제1 특징 벡터를 획득하며, 상기 제2 특징 벡터가 입력되면, 상기 제2 특징 벡터를 상기 제1 언어의 텍스트로 변환할 수 있다.In addition, the first encoder and the first decoder are included in a neural machine translation (NMT) model, and the neural network machine translation model converts text corresponding to the user voice when the user voice is input. The first feature vector may be obtained by converting into a vector value, and when the second feature vector is input, the second feature vector may be converted into text of the first language.

한편, 본 개시의 일 실시 예에 따른 전자 장치의 제어 방법은, 상기 제1 언어의 사용자 음성이 수신되면, 상기 사용자 음성에 대응되는 상기 제1 언어의 텍스트를 획득하는 단계, 상기 제1 언어의 텍스트를 상기 제1 언어에 대응되는 제1 인코더에 입력하여 제1 특징 벡터를 획득하는 단계, 상기 제1 특징 벡터를 외부 장치로 전송하는 단계 및 상기 외부 장치로부터 제2 특징 벡터가 수신되면, 상기 제2 특징 벡터를 상기 제1 언어에 대응되는 제1 디코더에 입력하여 상기 제2 특징 벡터에 대응되는 상기 제1 언어의 텍스트를 획득하는 단계를 포함할 수 있다.Meanwhile, the method for controlling an electronic device according to an embodiment of the present disclosure includes, when a user voice of the first language is received, obtaining text in the first language corresponding to the user voice; Acquiring a first feature vector by inputting text into a first encoder corresponding to the first language, transmitting the first feature vector to an external device, and when a second feature vector is received from the external device, the The method may include obtaining text in the first language corresponding to the second feature vector by inputting a second feature vector to a first decoder corresponding to the first language.

여기서, 상기 제1 인코더는, 제1 언어의 제1 텍스트 및 벡터 공간 상의 특징 벡터를 입력 데이터 및 출력 데이터로 하여 학습된 모델이고, 상기 제1 언어와 상이한 제2 언어에 대응되는 제2 인코더는, 상기 제1 텍스트와 임계 값 이상의 유사도를 가지는 제2 언어의 제2 텍스트 및 상기 벡터 공간 상의 상기 특징 벡터를 입력 데이터 및 출력 데이터로 하여 학습된 모델일 수 있다.Here, the first encoder is a model learned using a first text of a first language and a feature vector on a vector space as input data and output data, and a second encoder corresponding to a second language different from the first language is , It may be a model learned by using the second text of the second language having a similarity with the first text and a threshold value or higher and the feature vector on the vector space as input data and output data.

또한, 상기 제2 언어에 대응되는 상기 제2 인코더는, 상기 외부 장치에 포함되며, 상기 제2 언어의 사용자 음성에 대응되는 텍스트가 입력되면, 상기 제2 특징 벡터를 출력할 수 있다.Also, the second encoder corresponding to the second language is included in the external device and can output the second feature vector when text corresponding to the user's voice of the second language is input.

여기서, 상기 제1 디코더는, 벡터 공간 상의 특징 벡터 및 제1 언어의 제1 텍스트를 입력 데이터 및 출력 데이터로 하여 학습된 모델이고, 상기 제1 언어와 상이한 제2 언어에 대응되는 제2 디코더는, 상기 벡터 공간 상의 상기 특징 벡터 및 상기 제1 텍스트와 임계 값 이상의 유사도를 가지는 제2 언어의 제2 텍스트를 입력 데이터 및 출력 데이터로 하여 학습된 모델일 수 있다.Here, the first decoder is a model learned using a feature vector on a vector space and a first text of a first language as input data and output data, and a second decoder corresponding to a second language different from the first language , The feature vector on the vector space and the second text of the second language having a similarity with the first text at or above a threshold value may be a model learned as input data and output data.

여기서, 상기 제2 언어에 대응되는 상기 제2 디코더는, 상기 외부 장치에 포함되며, 상기 전자 장치로부터 수신된 상기 제1 특징 벡터가 입력되면, 상기 제2 언어의 텍스트를 출력할 수 있다.Here, the second decoder corresponding to the second language is included in the external device and can output text of the second language when the first feature vector received from the electronic device is input.

여기서, 상기 외부 장치와 통신을 수행하여 상기 외부 장치가 상기 제2 언어에 대응되는 제2 디코더를 포함하는지 여부를 식별하는 단계, 상기 외부 장치가 상기 제2 디코더를 포함하는 것으로 식별되면, 상기 제1 특징 벡터를 상기 외부 장치로 전송하는 단계 및 상기 외부 장치가 상기 제2 디코더를 포함하지 않는 것으로 식별되면, 상기 제1 특징 벡터를 서버로 전송하는 단계를 더 포함할 수 있다.Here, identifying whether or not the external device includes a second decoder corresponding to the second language by communicating with the external device, if the external device is identified as including the second decoder, the The method may further include transmitting 1 feature vector to the external device and, when the external device is identified as not including the second decoder, transmitting the first feature vector to a server.

또한, TTS(Text to speech)를 이용하여 상기 제1 언어의 텍스트에 대응되는 상기 제1 언어의 사운드를 획득하는 단계 및 상기 제1 언어의 사운드를 출력하는 단계를 더 포함할 수 있다.The method may further include obtaining a sound of the first language corresponding to the text of the first language using text to speech (TTS) and outputting a sound of the first language.

또한, 컴프레서에 기초하여 상기 제1 특징 벡터를 압축하는 단계, 상기 압축된 제1 특징 벡터를 상기 통신 인터페이스를 통해 상기 외부 장치로 전송하는 단계, 상기 외부 장치로부터 압축된 제2 특징 벡터가 수신되면, 디컴프레서에 기초하여 상기 압축된 제2 특징 벡터를 압축 해제하는 단계 및 상기 압축 해제된 제2 특징 벡터를 상기 제1 디코더에 입력하는 단계를 더 포함할 수 있다.In addition, the step of compressing the first feature vector based on a compressor, the step of transmitting the compressed first feature vector to the external device through the communication interface, when the compressed second feature vector is received from the external device , decompressing the compressed second feature vector based on a decompressor, and inputting the decompressed second feature vector to the first decoder.

또한, 상기 제1 인코더 및 상기 제1 디코더는, 신경망 기계 번역(Neural machine translation, NMT) 모델에 포함되며, 상기 신경망 기계 번역 모델은, 상기 사용자 음성이 입력되면, 상기 사용자 음성에 대응되는 텍스트를 벡터 값으로 변환하여 상기 제1 특징 벡터를 획득하며, 상기 제2 특징 벡터가 입력되면, 상기 제2 특징 벡터를 상기 제1 언어의 텍스트로 변환할 수 있다.In addition, the first encoder and the first decoder are included in a neural machine translation (NMT) model, and the neural network machine translation model converts text corresponding to the user voice when the user voice is input. The first feature vector may be obtained by converting into a vector value, and when the second feature vector is input, the second feature vector may be converted into text of the first language.

상술한 바와 같이 본 개시의 다양한 실시 예에 따르면, 복수의 전자 장치 각각은 사용자의 주된 언어에 대응되는 인코딩 및 디코딩을 구비하므로, 과도한 리소스 요구 없이도 원활한 번역 기능 제공이 가능하다.As described above, according to various embodiments of the present disclosure, since each of the plurality of electronic devices is provided with encoding and decoding corresponding to a user's primary language, a smooth translation function can be provided without excessive resource requirements.

도 1은 종래에 따른 번역 기능을 제공하는 전자 장치에 구비된 인코더 및 디코더를 설명하기 위한 도면이다.
도 2는 본 개시의 일 실시 예에 따른 전자 장치에 구비된 인코더 및 디코더를 설명하기 위한 도면이다.
도 3은 본 개시의 일 실시 예에 따른 전자 장치의 구성을 설명하기 위한 블록도이다.
도 4는 본 개시의 일 실시 예에 따른 전자 장치와 외부 장치의 통신을 설명하기 위한 도면이다.
도 5는 본 개시의 일 실시 예에 따른 압축 과정을 설명하기 위한 도면이다.
도 6은 본 개시의 일 실시 예에 따른 특징 벡터를 전송하는 과정을 설명하기 위한 시퀀스도이다.
도 7은 본 개시의 일 실시 예에 따른 특징 벡터를 수신하는 과정을 설명하기 위한 시퀀스도이다.
도 8은 본 개시의 일 실시 예에 따른 인코더와 디코더의 학습 과정을 설명하기 위한 도면이다.
도 9는 본 개시의 일 실시 예에 따른 서버와 통신을 수행하는 전자 장치를 설명하기 위한 도면이다.
도 10은 본 개시의 일 실시 예에 따른 전자 장치의 제어 방법을 설명하기 위한 흐름도이다.
1 is a diagram for explaining an encoder and a decoder included in a conventional electronic device providing a translation function.
2 is a diagram for explaining an encoder and a decoder included in an electronic device according to an embodiment of the present disclosure.
3 is a block diagram for explaining the configuration of an electronic device according to an embodiment of the present disclosure.
4 is a diagram for explaining communication between an electronic device and an external device according to an embodiment of the present disclosure.
5 is a diagram for explaining a compression process according to an embodiment of the present disclosure.
6 is a sequence diagram for explaining a process of transmitting a feature vector according to an embodiment of the present disclosure.
7 is a sequence diagram for explaining a process of receiving a feature vector according to an embodiment of the present disclosure.
8 is a diagram for explaining a learning process of an encoder and a decoder according to an embodiment of the present disclosure.
9 is a diagram for explaining an electronic device that communicates with a server according to an embodiment of the present disclosure.
10 is a flowchart for explaining a control method of an electronic device according to an embodiment of the present disclosure.

이하에서는 첨부 도면을 참조하여 본 개시를 상세히 설명한다. Hereinafter, the present disclosure will be described in detail with reference to the accompanying drawings.

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

본 명세서에서, "가진다," "가질 수 있다," "포함한다," 또는 "포함할 수 있다" 등의 표현은 해당 특징(예: 수치, 기능, 동작, 또는 부품 등의 구성요소)의 존재를 가리키며, 추가적인 특징의 존재를 배제하지 않는다.In this specification, expressions such as “has,” “can have,” “includes,” or “can include” indicate the existence of a corresponding feature (eg, numerical value, function, operation, or component such as a part). , which does not preclude the existence of additional features.

A 또는/및 B 중 적어도 하나라는 표현은 "A" 또는 "B" 또는 "A 및 B" 중 어느 하나를 나타내는 것으로 이해되어야 한다. The expression at least one of A and/or B should be understood to denote either "A" or "B" or "A and B".

본 명세서에서 사용된 "제1," "제2," "첫째," 또는 "둘째,"등의 표현들은 다양한 구성요소들을, 순서 및/또는 중요도에 상관없이 수식할 수 있고, 한 구성요소를 다른 구성요소와 구분하기 위해 사용될 뿐 해당 구성요소들을 한정하지 않는다. Expressions such as "first," "second," "first," or "second," as used herein, may modify various components regardless of order and/or importance, and may refer to one component It is used only to distinguish it from other components and does not limit the corresponding components.

어떤 구성요소(예: 제1 구성요소)가 다른 구성요소(예: 제2 구성요소)에 "(기능적으로 또는 통신적으로) 연결되어((operatively or communicatively) coupled with/to)" 있다거나 "접속되어(connected to)" 있다고 언급된 때에는, 어떤 구성요소가 다른 구성요소에 직접적으로 연결되거나, 다른 구성요소(예: 제3 구성요소)를 통하여 연결될 수 있다고 이해되어야 할 것이다. A component (e.g., a first component) is "(operatively or communicatively) coupled with/to" another component (e.g., a second component); When referred to as "connected to", it should be understood that an element may be directly connected to another element, or may be connected through another element (eg, a third element).

단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "구성되다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다. Singular expressions include plural expressions unless the context clearly dictates otherwise. In this application, the terms "comprise" or "consist of" are intended to designate that there is a feature, number, step, operation, component, part, or combination thereof described in the specification, but one or more other It should be understood that the presence or addition of features, numbers, steps, operations, components, parts, or combinations thereof is not precluded.

본 개시에서 "모듈" 혹은 "부"는 적어도 하나의 기능이나 동작을 수행하며, 하드웨어 또는 소프트웨어로 구현되거나 하드웨어와 소프트웨어의 결합으로 구현될 수 있다. 또한, 복수의 "모듈" 혹은 복수의 "부"는 특정한 하드웨어로 구현될 필요가 있는 "모듈" 혹은 "부"를 제외하고는 적어도 하나의 모듈로 일체화되어 적어도 하나의 프로세서(미도시)로 구현될 수 있다.In the present disclosure, a “module” or “unit” performs at least one function or operation, and may be implemented in hardware or software or a combination of hardware and software. In addition, a plurality of "modules" or a plurality of "units" are integrated into at least one module and implemented by at least one processor (not shown), except for "modules" or "units" that need to be implemented with specific hardware. It can be.

본 명세서에서, 사용자라는 용어는 전자 장치를 사용하는 사람 또는 전자 장치를 사용하는 장치(예: 인공지능 전자 장치)를 지칭할 수 있다.In this specification, the term user may refer to a person using an electronic device or a device (eg, an artificial intelligence electronic device) using an electronic device.

이하 첨부된 도면들을 참조하여 본 개시의 일 실시 예를 보다 상세하게 설명한다.Hereinafter, an embodiment of the present disclosure will be described in more detail with reference to the accompanying drawings.

도 1은 종래에 따른 번역 기능을 제공하는 전자 장치에 구비된 인코더 및 디코더를 설명하기 위한 도면이다.1 is a diagram for explaining an encoder and a decoder included in a conventional electronic device providing a translation function.

도 1을 참조하면, 종래의 전자 장치는 제1 언어를 제2 언어로 번역(또는, 변환)하기 위해 제1 언어의 인코더와 제2 언어의 디코더를 구비하였다.Referring to FIG. 1 , a conventional electronic device includes a first language encoder and a second language decoder to translate (or convert) a first language into a second language.

예를 들어, 종래의 전자 장치는 한국어(KR)의 사용자 음성 또는 텍스트를 영어(EN)로 번역하기 위해 한국어 인코더(Encoder) 및 영어 디코더(Decoder)를 구비하였다.For example, a conventional electronic device includes a Korean encoder and an English decoder to translate a user's voice or text in Korean (KR) into English (EN).

일 실시 예에 따라 종래의 전자 장치는 한국어의 사용자 음성이 수신되면, 사용자 음성을 한국어 텍스트로 변환한다. 이어서, 한국어 인코더는 한국어 텍스트를 특징 벡터로 변환한다. 이어서, 영어 디코더는 특징 벡터를 영어 텍스트로 변환하며, 종래의 전자 장치는 영어 디코더를 통해 획득된 영어 텍스트를 디스플레이하거나 사운드로 출력할 수 있고, 전자 장치와 통신을 수행하는 외부 장치로 전송할 수도 있다.According to an embodiment, when a user's voice in Korean is received, a conventional electronic device converts the user's voice into Korean text. The Korean encoder then converts the Korean text into a feature vector. Subsequently, the English decoder converts the feature vector into English text, and the conventional electronic device can display or output the English text acquired through the English decoder as sound, and may transmit it to an external device that communicates with the electronic device. .

도 1에 도시된 바와 같이, 종래의 전자 장치는 다양한 언어에 대한 번역 기능을 제공하기 위해 복수의 인코더 및 복수의 디코더를 구비하였다. 예를 들어, 종래의 전자 장치는 한국어에서 영어로의 변역 기능을 제공하기 위해 한국어 인코더 및 영어 디코더를 구비하였으며, 영어에서 한국어로의 번역 기능을 제공하기 위해 영어 인코더 및 한국어 디코더를 구비하였다. As shown in FIG. 1 , a conventional electronic device includes a plurality of encoders and a plurality of decoders to provide a translation function for various languages. For example, a conventional electronic device includes a Korean encoder and an English decoder to provide a translation function from Korean to English, and an English encoder and a Korean decoder to provide a translation function from English to Korean.

이외에도, 도 1에 도시된 바와 같이 한국어에서 중국어로의 번역 기능, 중국어에서 한국어로의 번역 기능 등 다양한 언어에 대한 번역 기능을 제공하기 위해서는 각 언어에 대응되는 인코더와 디코더를 구비하여야 하므로, 종래의 전자 장치는 복수의 인코더와 디코더를 구동하기 위한 매우 큰 리소스(resource), 높은 제품 사양(specification)을 구비하여야하는 문제가 있었다.In addition, as shown in FIG. 1, in order to provide a translation function for various languages, such as a Korean to Chinese translation function and a Chinese to Korean translation function, it is necessary to have an encoder and a decoder corresponding to each language. Electronic devices have a problem of having to have very large resources and high product specifications for driving a plurality of encoders and decoders.

특히, 종래의 전자 장치는 리소스 한계로 인하여 복수의 인코더와 디코더를 원활히 구동하기 어렵거나, 실시간으로 번역 기능을 제공하기 어려운 경우, 서버로 제1 언어의 텍스트를 전송한 뒤, 서버로부터 제2 언어로 번역된 텍스트를 수신하여 번역 기능을 제공하였다. 이 경우, 네트워크나 서버를 거치지 않고 전자 장치 자체에서 번역을 수행하는 온 디바이스(On device) 형태의 번역 기능을 제공하지 못하므로, 사용자 음성이나 텍스트가 해킹에 외부로 노출될 우려가 있으며, 이는 보안과 관련된 중요한 이슈가 있다.In particular, when it is difficult for a conventional electronic device to smoothly drive a plurality of encoders and decoders due to resource limitations or to provide a translation function in real time, after transmitting text in a first language to a server, the second language text is transmitted from the server. The translated text was received and the translation function was provided. In this case, since it is not possible to provide an on-device translation function in which the electronic device itself performs translation without going through a network or server, there is a risk that the user's voice or text may be exposed to hacking, which is a security risk. There are important issues related to

이하에서는 본 개시의 다양한 실시 예에 따라 종래와 달리 리소스 또는 제품 사양에 따른 한계 없이도, 온 디바이스 형태의 번역 기능을 제공 가능한 전자 장치, 시스템 및 제어 방법에 대해 설명하도록 한다.Hereinafter, according to various embodiments of the present disclosure, an electronic device capable of providing an on-device type of translation function, a system, and a control method without limitations due to resources or product specifications unlike the prior art will be described.

도 2는 본 개시의 일 실시 예에 따른 전자 장치에 구비된 인코더 및 디코더를 설명하기 위한 도면이다.2 is a diagram for explaining an encoder and a decoder included in an electronic device according to an embodiment of the present disclosure.

도 2를 참조하면, 전자 장치(100)는 다양한 외부 장치와 통신을 수행할 수 있다.Referring to FIG. 2 , the electronic device 100 may communicate with various external devices.

예를 들어, 전자 장치(100)의 사용자는 주된 언어로 한국어를 이용하며, 제2 외부 장치(200)의 사용자는 주된 언어로 영어를 이용하고, 제3 외부 장치(300)의 사용자는 주된 언어로 중국어를 이용하는 경우를 상정할 수 있다.For example, a user of the electronic device 100 uses Korean as a main language, a user of the second external device 200 uses English as a main language, and a user of the third external device 300 uses Korean as a main language. It can be assumed that the Chinese language is used as

종래의 방법에 따라 전자 장치(100)가 한국어의 사용자 음성을 제1 외부 장치(200)와 제2 외부 장치(300) 각각의 사용자가 이용하는 주된 언어로 번역한 뒤, 제1 외부 장치(200)와 제2 외부 장치(300) 각각으로 전송하기 위해서 전자 장치(100)는 한국어 인코더, 영어 디코더 및 중국어 디코더를 구비하여야 했다.After the electronic device 100 translates the Korean user voice into the main language used by each user of the first external device 200 and the second external device 300 according to a conventional method, the first external device 200 and the second external device 300, respectively, the electronic device 100 had to be equipped with a Korean encoder, an English decoder, and a Chinese decoder.

본 개시의 일 실시 예에 따르면, 전자 장치(100)는 전자 장치(100)의 사용자의 주된 언어(이하, 제1 언어)에 대응되는 제1 인코더 및 제1 디코더를 구비할 수 있다.According to an embodiment of the present disclosure, the electronic device 100 may include a first encoder and a first decoder corresponding to a user's main language (hereinafter, a first language) of the electronic device 100 .

전자 장치(100)와 통신을 수행하는 제1 외부 장치(200)는 제1 외부 장치(200)의 사용자의 주된 언어(이하, 제2 언어)에 대응되는 제2 인코더 및 제2 디코더를 구비할 수 있다.The first external device 200 that communicates with the electronic device 100 may include a second encoder and a second decoder corresponding to a user's primary language (hereinafter referred to as a second language) of the first external device 200. can

또한, 제2 외부 장치(300)는 제2 외부 장치(200)의 사용자의 주된 언어 즉, 제3 언어에 대응되는 제3 인코더 및 제3 디코더를 구비할 수 있다.In addition, the second external device 300 may include a third encoder and a third decoder corresponding to a user's main language of the second external device 200, that is, a third language.

도 2를 참조하면, 전자 장치(100)는 복수의 인코더와 복수의 디코더를 구비하지 않으며, 제1 언어에 대응되는 제1 인코더와 제1 디코더만을 구비할 수 있다.Referring to FIG. 2 , the electronic device 100 does not include a plurality of encoders and a plurality of decoders, but may include only a first encoder and a first decoder corresponding to a first language.

일 실시 예에 따라 전자 장치(100)는 제1 언어의 사용자 음성이 수신되면, 사용자 음성을 텍스트로 변환한 뒤, 텍스트를 제1 인코더에 입력할 수 있다. 이어서, 제1 인코더는 텍스트에 대응되는 제1 특징 벡터를 획득할 수 있다.According to an embodiment, when the user's voice of the first language is received, the electronic device 100 may convert the user's voice into text and then input the text into the first encoder. Subsequently, the first encoder may obtain a first feature vector corresponding to text.

이어서, 전자 장치(100)는 제1 특징 벡터를 전자 장치(100)와 통신을 수행하는 제1 외부 장치(200)로 전송할 수 있다.Subsequently, the electronic device 100 may transmit the first feature vector to the first external device 200 communicating with the electronic device 100 .

제1 외부 장치(200)는 전자 장치로부터 수신된 제1 특징 벡터를 제2 디코더에 입력하여 제1 특징 벡터에 대응되는 제2 언어의 텍스트를 획득할 수 있다.The first external device 200 may acquire text in a second language corresponding to the first feature vector by inputting the first feature vector received from the electronic device to the second decoder.

상술한 과정을 통해, 전자 장치(100)가 제2 언어에 대응되는 제2 디코더를 구비하지 않아도, 전자 장치(100)는 제1 특징 벡터를 전송하고 제1 외부 장치(200)는 전자 장치(1000)로부터 수신된 제1 특징 벡터를 제2 언어의 텍스트로 변환하여, 결과적으로 제1 언어의 사용자 음성을 대응되는 제2 언어의 텍스트로 변환하여 전자 장치(100)의 사용자와 제1 외부 장치(200)의 사용자 간 커뮤니케이션이 가능할 수 있다.Through the above process, even if the electronic device 100 does not have a second decoder corresponding to the second language, the electronic device 100 transmits the first feature vector and the first external device 200 transmits the electronic device ( 1000) converts the first feature vector received from text in the second language, and as a result, converts the user's voice in the first language into text in the corresponding second language so that the user of the electronic device 100 and the first external device Communication between users of 200 may be possible.

다른 예로, 제1 외부 장치(200)가 제2 언어의 사용자 음성(또는, 사용자 음성에 대응되는 텍스트)을 제2 인코더에 입력하여 제2 특징 벡터를 획득할 수 있다. 이어서, 제1 외부 장치(200)는 제2 특징 벡터를 전자 장치(100)로 전송하며, 전자 장치(100)는 제2 특징 벡터를 제1 디코더에 입력하여 제1 언어의 텍스트를 획득할 수 있다.As another example, the first external device 200 may obtain a second feature vector by inputting a user's voice (or text corresponding to the user's voice) in the second language to the second encoder. Subsequently, the first external device 200 may transmit the second feature vector to the electronic device 100, and the electronic device 100 may obtain text in the first language by inputting the second feature vector to the first decoder. there is.

일 실시 예에 따라 전자 장치(100), 제1 외부 장치(200) 및 제2 외부 장치(300)) 각각은, 자체적으로 구비된 인코더를 이용하여 사용자 음성을 특징 벡터로 변환한 뒤, 변환된 특징 벡터를 전송한다. 또한, 전자 장치(100)와 제1 외부 장치(200)(또는, 제2 외부 장치(300)) 각각은, 특징 벡터를 수신한 뒤, 자체적으로 구비된 디코더를 이용하여 특징 벡터를 텍스트로 변환할 수 있다.According to an embodiment, each of the electronic device 100, the first external device 200, and the second external device 300 converts the user's voice into a feature vector using its own encoder, and then converts the converted Send feature vectors. In addition, each of the electronic device 100 and the first external device 200 (or the second external device 300) receives a feature vector and then converts the feature vector into text using its own decoder. can do.

도 3은 본 개시의 일 실시 예에 따른 전자 장치의 구성을 설명하기 위한 블록도이다.3 is a block diagram for explaining the configuration of an electronic device according to an embodiment of the present disclosure.

도 3을 참조하면, 전자 장치(100)는 마이크(110), 메모리(120), 통신 인터페이스(130) 및 프로세서(140)를 포함한다.Referring to FIG. 3 , the electronic device 100 includes a microphone 110 , a memory 120 , a communication interface 130 and a processor 140 .

우선, 마이크(110)는 사용자 음성을 수신할 수 있다. 다만, 마이크(110)는 입력부의 일 예시이며, 전자 장치(100)는 키보드(key board), 마우스(mouse), 키 패드(key pad), 터치 패드 등을 통해 사용자 입력을 수신할 수도 있음은 물론이다. First, the microphone 110 may receive a user's voice. However, the microphone 110 is an example of an input unit, and the electronic device 100 may receive user input through a keyboard, mouse, key pad, or touch pad. Of course.

메모리(120)는 본 개시의 다양한 실시 예를 위해 필요한 데이터를 저장할 수 있다. 메모리(120)는 데이터 저장 용도에 따라 전자 장치(100)에 임베디드된 메모리 형태로 구현되거나, 전자 장치(100)에 탈부착이 가능한 메모리 형태로 구현될 수도 있다. The memory 120 may store data necessary for various embodiments of the present disclosure. The memory 120 may be implemented in the form of a memory embedded in the electronic device 100 or in the form of a removable memory in the electronic device 100 according to a data storage purpose.

예를 들어, 전자 장치(100)의 구동을 위한 데이터는 전자 장치(100)에 임베디드된 메모리에 저장되고, 전자 장치(100)의 확장 기능을 위한 데이터는 전자 장치(100)에 탈부착이 가능한 메모리에 저장될 수 있다. 한편, 전자 장치(100)에 임베디드된 메모리의 경우 휘발성 메모리(예: DRAM(dynamic RAM), SRAM(static RAM), 또는 SDRAM(synchronous dynamic RAM) 등), 비휘발성 메모리(non-volatile Memory)(예: OTPROM(one time programmable ROM), PROM(programmable ROM), EPROM(erasable and programmable ROM), EEPROM(electrically erasable and programmable ROM), mask ROM, flash ROM, 플래시 메모리(예: NAND flash 또는 NOR flash 등), 하드 드라이브, 또는 솔리드 스테이트 드라이브(solid state drive(SSD)) 중 적어도 하나로 구현될 수 있다. 또한, 전자 장치(100)에 탈부착이 가능한 메모리의 경우 메모리 카드(예를 들어, CF(compact flash), SD(secure digital), Micro-SD(micro secure digital), Mini-SD(mini secure digital), xD(extreme digital), MMC(multi-media card) 등), USB 포트에 연결가능한 외부 메모리(예를 들어, USB 메모리) 등과 같은 형태로 구현될 수 있다.For example, data for driving the electronic device 100 is stored in a memory embedded in the electronic device 100, and data for an extended function of the electronic device 100 is a memory that is detachable from the electronic device 100. can be stored in On the other hand, in the case of memory embedded in the electronic device 100, volatile memory (eg, DRAM (dynamic RAM), SRAM (static RAM), SDRAM (synchronous dynamic RAM), etc.), non-volatile memory (non-volatile memory) ( Examples: OTPROM (one time programmable ROM), PROM (programmable ROM), EPROM (erasable and programmable ROM), EEPROM (electrically erasable and programmable ROM), mask ROM, flash ROM, flash memory (such as NAND flash or NOR flash, etc.) ), a hard drive, or a solid state drive (SSD). In addition, in the case of a memory that is detachable from the electronic device 100, a memory card (eg, a compact flash drive (CF)) ), SD (secure digital), Micro-SD (micro secure digital), Mini-SD (mini secure digital), xD (extreme digital), MMC (multi-media card), etc.), external memory that can be connected to the USB port ( For example, it may be implemented in the form of a USB memory) or the like.

일 예에 따라 메모리(120)는 전자 장치(100)를 제어하기 위한 적어도 하나의 인스트럭션(instruction) 또는 인스트럭션들을 포함하는 컴퓨터 프로그램을 저장할 수 있다.According to an example, the memory 120 may store at least one instruction or a computer program including instructions for controlling the electronic device 100 .

특히, 메모리(120)는 복수의 레이어를 포함하는 인공 지능 모델에 관한 정보를 저장할 수 있다. 여기서, 인공 지능 모델에 관한 정보를 저장한다는 것은 인공 지능 모델의 동작과 관련된 다양한 정보, 예를 들어 인공 지능 모델에 포함된 복수의 레이어에 대한 정보, 복수의 레이어 각각에서 이용되는 파라미터(예를 들어, 필터 계수, 바이어스 등)에 대한 정보 등을 저장한다는 것을 의미할 수 있다. In particular, the memory 120 may store information about an artificial intelligence model including a plurality of layers. Here, storing information about the artificial intelligence model means various information related to the operation of the artificial intelligence model, for example, information about a plurality of layers included in the artificial intelligence model, parameters used in each of the plurality of layers (eg, , filter coefficients, bias, etc.)

예를 들어, 메모리(120)는 본 개시의 일 실시 예에 따라 제1 언어의 텍스트를 특징 벡터로 변환하도록 학습된 제1 인코더, 특징 벡터를 제1 언어의 텍스트로 변환하도록 학습된 제1 디코더를 포함하는 신경망 기계 번역(Neural machine translation, NMT) 모델을 저장할 수 있다. NMT 모델에 대한 구체적인 설명은 후술하도록 한다.For example, the memory 120 may include a first encoder learned to convert text in a first language into a feature vector and a first decoder learned to convert a feature vector into text in a first language according to an embodiment of the present disclosure. A neural machine translation (NMT) model including a may be stored. A detailed description of the NMT model will be described later.

본 개시의 일 실시 예에 따른 통신 인터페이스(130)는 다양한 데이터를 입력받는다. 예를 들어, 통신 인터페이스(130)는 AP 기반의 Wi-Fi(와이파이, Wireless LAN 네트워크), 블루투스(Bluetooth), 지그비(Zigbee), 유/무선 LAN(Local Area Network), WAN(Wide Area Network), 이더넷(Ethernet), IEEE 1394, HDMI(High-Definition Multimedia Interface), USB(Universal Serial Bus), MHL(Mobile High-Definition Link), AES/EBU(Audio Engineering Society/ European Broadcasting Union), 옵티컬(Optical), 코액셜(Coaxial) 등과 같은 통신 방식을 통해 외부 장치(예를 들어, 제1 외부 장치(100), 제2 외부 장치(200) 등 사용자 단말 장치), 외부 저장 매체(예를 들어, USB 메모리), 외부 서버(예를 들어, 번역 기능 제공 서버) 등으로부터 다양한 데이터를 입력받을 수 있다.The communication interface 130 according to an embodiment of the present disclosure receives various data. For example, the communication interface 130 is AP-based Wi-Fi (Wi-Fi, Wireless LAN network), Bluetooth (Bluetooth), Zigbee (Zigbee), wired / wireless LAN (Local Area Network), WAN (Wide Area Network) , Ethernet, IEEE 1394, HDMI (High-Definition Multimedia Interface), USB (Universal Serial Bus), MHL (Mobile High-Definition Link), AES/EBU (Audio Engineering Society/ European Broadcasting Union), Optical ), an external device (eg, a user terminal device such as the first external device 100 or the second external device 200), an external storage medium (eg, USB) through a communication method such as coaxial. memory), an external server (eg, a server providing a translation function), and the like.

특히, 통신 인터페이스(130)는 프로세서(140)의 제어에 따라 외부 장치로 특징 벡터를 전송하거나, 외부 장치로부터 특징 벡터를 수신할 수 있다. 이에 대한 구체적인 설명은 후술하도록 한다.In particular, the communication interface 130 may transmit a feature vector to an external device or receive a feature vector from an external device under the control of the processor 140 . A detailed description of this will be described later.

본 개시의 일 실시 예에 따른 프로세서(130)는 전자 장치(100)의 전반적인 동작을 제어한다.The processor 130 according to an embodiment of the present disclosure controls overall operations of the electronic device 100 .

일 실시 예에 따라 프로세서(140)는 디지털 영상 신호를 처리하는 디지털 시그널 프로세서(digital signal processor(DSP), 마이크로 프로세서(microprocessor), AI(Artificial Intelligence) 프로세서, T-CON(Timing controller)으로 구현될 수 있다. 다만, 이에 한정되는 것은 아니며, 중앙처리장치(central processing unit(CPU)), MCU(Micro Controller Unit), MPU(micro processing unit), 컨트롤러(controller), 어플리케이션 프로세서(application processor(AP)), 또는 커뮤니케이션 프로세서(communication processor(CP)), ARM 프로세서 중 하나 또는 그 이상을 포함하거나, 해당 용어로 정의될 수 있다. 또한, 프로세서(140)는 프로세싱 알고리즘이 내장된 SoC(System on Chip), LSI(large scale integration)로 구현될 수도 있고, FPGA(Field Programmable gate array) 형태로 구현될 수도 있다.According to an embodiment, the processor 140 may be implemented as a digital signal processor (DSP), a microprocessor, an artificial intelligence (AI) processor, or a timing controller (T-CON) for processing digital video signals. However, it is not limited thereto, and is not limited to, a central processing unit (CPU), a micro controller unit (MCU), a micro processing unit (MPU), a controller, and an application processor (AP). ), communication processor (communication processor (CP)), ARM processor, or may include one or more of, or may be defined in terms of, In addition, the processor 140 is a SoC (System on Chip) having a processing algorithm embedded therein. , LSI (large scale integration) may be implemented, or FPGA (Field Programmable Gate Array) may be implemented.

특히, 프로세서(140)는 사용자 음성을 인식하여 사용자 음성에 대응되는 텍스트 또는, 사용자 입력에 따른 텍스트를 제1 인코더에 입력하여 텍스트에 대응되는 특징 벡터를 획득할 수 있다. 예를 들어, 프로세서(140)에 구비된 음성 인식(Automatic speech recognition, ASR) 모듈은 마이크(110)를 통해 수신된 사용자 음성을 인식하여 사용자 음성에 대응되는 제1 언어의 텍스트를 획득할 수 있다. In particular, the processor 140 may recognize a user's voice and input text corresponding to the user's voice or text according to the user's input to the first encoder to obtain a feature vector corresponding to the text. For example, an automatic speech recognition (ASR) module provided in the processor 140 may recognize a user's voice received through the microphone 110 and obtain text in a first language corresponding to the user's voice. .

또한, 프로세서(140)는 외부 장치로부터 통신 인터페이스(130)를 통해 수신된 특징 벡터를 제1 디코더에 입력하여 특징 벡터에 대응되는 제1 언어의 텍스트를 획득할 수 있다.Also, the processor 140 may obtain text in the first language corresponding to the feature vector by inputting the feature vector received from the external device through the communication interface 130 to the first decoder.

한편, 메모리(120)는 제1 인코더로 동작하는 신경망 모델, 제1 디코더로 동작하는 신경망 모델 즉, 적어도 두개의 신경망 모델을 저장할 수 있다. Meanwhile, the memory 120 may store a neural network model operating as a first encoder and a neural network model operating as a first decoder, that is, at least two neural network models.

다른 예로, 메모리(120)는 제1 인코더 및 제1 디코더를 포함하여, 제1 언어의 텍스트가 입력되면 특징 벡터로 변환하고, 특징 벡터가 입력되면 제1 언어의 텍스트로 변환하도록 학습된 하나의 신경망 모델을 저장할 수도 있음은 물론이다.As another example, the memory 120 includes a first encoder and a first decoder, and converts text of the first language into a feature vector when the text of the first language is input, and converts the feature vector into text of the first language. Of course, the neural network model can also be stored.

여기서, 제1 언어에 대응되는 제1 인코더는, 제1 언어의 제1 텍스트를 입력 데이터로, 벡터 공간 상의 특징 벡터를 출력 데이터로 하여 학습된 모델일 수 있다.Here, the first encoder corresponding to the first language may be a model learned by using the first text of the first language as input data and a feature vector on a vector space as output data.

일 실시 예에 따라 제1 언어와 상이한 제2 언어에 대응되는 제2 인코더는, 제1 텍스트와 임계 값 이상의 유사도를 가지는 제2 언어의 제2 텍스트를 입력 데이터로, 벡터 공간 상의 특징 벡터를 출력 데이터로 하여 학습된 모델일 수 있다.According to an embodiment, a second encoder corresponding to a second language different from the first language outputs a feature vector on a vector space using second text of a second language having a similarity with the first text at a threshold value or higher as input data. It may be a model learned from data.

한편, 제1 인코더의 입력 데이터인 제1 텍스트와 제2 인코더의 입력 데이터인 제2 텍스트의 의미가 임계 값 이상의 유사도를 가지면, 제1 인코더의 출력 데이터인 특징 벡터와 제2 인코더의 출력 데이터인 특징 벡터는 동일 또는 유사할 수 있다.On the other hand, if the meaning of the first text, which is the input data of the first encoder, and the second text, which is the input data of the second encoder, have a similarity equal to or higher than the threshold value, the feature vector, which is the output data of the first encoder, and the output data of the second encoder, The feature vectors may be the same or similar.

여기서, 유사도는, 제1 언어의 제1 텍스트와 제2 언어의 제2 텍스트 간에 의미가 유사한 지를 수치화한 값으로서, 0 내지 1의 값으로 표현될 수 있다. 유사도가 1에 가까울수록 제1 언어의 제1 텍스트와 제2 언어의 제2 텍스트의 의미가 동일, 유사함을 의미할 수 있다. 한편, 제1 임계 값은 0.9일 수 있으며, 이는 일 예시일 뿐 이에 한정되지 않음은 물론이다.Here, the degree of similarity is a numerical value of whether the first text of the first language and the second text of the second language are similar in meaning, and may be expressed as a value of 0 to 1. As the similarity is closer to 1, it may mean that the meaning of the first text in the first language and the second text in the second language are the same or similar. Meanwhile, the first threshold value may be 0.9, which is only an example and is not limited thereto.

제1 언어에 대응되는 제1 디코더는, 벡터 공간 상의 특징 벡터를 입력 데이터로, 제1 언어의 제1 텍스트를 출력 데이터로 하여 학습된 모델일 수 있다.The first decoder corresponding to the first language may be a model learned using a feature vector on a vector space as input data and first text of the first language as output data.

일 실시 예에 따라 제1 언어와 상이한 제2 언어에 대응되는 제2 디코더는, 벡터 공간 상의 특징 벡터를 입력 데이터로, 제2 언어의 제2 텍스트를 출력 데이터로 하여 학습된 모델일 수 있다.According to an embodiment, the second decoder corresponding to a second language different from the first language may be a model learned using a feature vector on a vector space as input data and a second text of the second language as output data.

한편, 제1 디코더의 입력 데이터인 특징 벡터와 제2 디코더의 입력 데이터인 특징 벡터가 동일하면, 제1 디코더의 출력 데이터인 제1 언어의 제1 텍스트와 제2 디코더의 출력 데이터인 제2 언어의 제2 텍스트의 의미는 임계 값 이상의 유사도를 가질 수 있다.Meanwhile, if the feature vector, which is the input data of the first decoder, and the feature vector, which is the input data of the second decoder, are the same, the first text of the first language, which is output data of the first decoder, and the second language, which is output data of the second decoder, are the same. The meaning of the second text of may have a similarity higher than a threshold value.

한편, 메모리(120)에 저장된 신경망 모델은 통계적 기계 번역(Statistical machine translation, SMT) 모델에 기반한 모델일 수도 있고, 신경망 기계 번역(Neural machine translation, NMT)에 기반한 모델일 수도 있다. 여기서, 신경망 기계 번역 모델(NMT)은 단어를 개별적으로 번역하는 것이 아닌, 전체 문장, 구 단위로 번역을 수행함에 따라 자연스럽고 완성도 높은 번역물을 출력하는 효과가 있다. 이에 대한 구체적인 설명은 도 8을 참조하여 후술하도록 한다.Meanwhile, the neural network model stored in the memory 120 may be a model based on a statistical machine translation (SMT) model or a model based on a neural machine translation (NMT) model. Here, the neural network machine translation model (NMT) has the effect of outputting a natural and high-quality translation by performing translation in units of whole sentences or phrases, rather than individually translating words. A detailed description of this will be described later with reference to FIG. 8 .

도 4는 본 개시의 일 실시 예에 따른 전자 장치와 외부 장치의 통신을 설명하기 위한 도면이다.4 is a diagram for explaining communication between an electronic device and an external device according to an embodiment of the present disclosure.

도 4를 참조하면, 프로세서(140)는 마이크(110)를 통해 제1 언어의 사용자 음성(예를 들어, 안녕)이 수신되면, 제1 언어에 대응되는 제1 인코더(1-1)에 입력하여 제1 특징 벡터를 획득할 수 있다.Referring to FIG. 4 , when a user voice (eg, hello) of a first language is received through the microphone 110, the processor 140 inputs the input to the first encoder 1-1 corresponding to the first language. Thus, the first feature vector can be obtained.

이어서, 프로세서(140)는 통신 인터페이스(130)를 이용하여 제1 특징 벡터를 제1 외부 장치(200), 제2 외부 장치(300) 등으로 전송할 수 있다.Subsequently, the processor 140 may transmit the first feature vector to the first external device 200 and the second external device 300 using the communication interface 130 .

한편, 제1 외부 장치(200)는 수신된 제1 특징 벡터를 제2 언어에 대응되는 제2 디코더(2-2)에 입력하여 제2 언어의 제2 텍스트(예를 들어, Hello)를 획득할 수 있다.Meanwhile, the first external device 200 acquires second text (eg, Hello) in the second language by inputting the received first feature vector to the second decoder 2-2 corresponding to the second language. can do.

다른 예로, 제1 외부 장치(200)는 제2 언어의 사용자 음성(예를 들어, Hello)이 수신되면, 제2 언어에 대응되는 제2 인코더(1-2)에 입력하여 제2 특징 벡터를 획득할 수 있다.As another example, when the first external device 200 receives a user voice (eg, Hello) in the second language, the second feature vector is generated by inputting the second feature vector to the second encoder 1-2 corresponding to the second language. can be obtained

이어서, 제1 외부 장치(200)는 제2 특징 벡터를 전자 장치(100) 또는 제2 외부 장치(300) 등으로 전송할 수 있다.Subsequently, the first external device 200 may transmit the second feature vector to the electronic device 100 or the second external device 300 or the like.

전자 장치(100)에 구비된 프로세서(140)는 수신된 제2 특징 벡터를 제1 언어에 대응되는 제1 디코더(2-1)에 입력하여 제1 언어의 제1 텍스트(예를 들어, 안녕)를 획득할 수 있다. 이어서, 프로세서(140)는 TTS(Text to speech) 모델을 이용하여 제1 언어의 제1 텍스트에 대응되는 제1 언어의 사운드를 획득할 수 있고, 제1 언어의 사운드를 출력부(150)를 통해 출력할 수 있다. 여기서, 출력부(150)는 스피커로 구현될 수 있으며, 다른 예로, 디스플레이 등으로 구현될 수도 있음은 물론이다.The processor 140 provided in the electronic device 100 inputs the received second feature vector to the first decoder 2-1 corresponding to the first language to provide first text (eg, Hello) of the first language. ) can be obtained. Subsequently, the processor 140 may obtain a sound of the first language corresponding to the first text of the first language by using a text to speech (TTS) model, and output the sound of the first language to the output unit 150. can be output through Here, the output unit 150 may be implemented as a speaker, or as another example, may be implemented as a display or the like, of course.

도 5는 본 개시의 일 실시 예에 따른 압축 과정을 설명하기 위한 도면이다.5 is a diagram for explaining a compression process according to an embodiment of the present disclosure.

도 5는 전자 장치(100)와 외부 장치 간의 통신 효율을 증대시키기 위하여 특징 벡터를 압축한 뒤 전송하는 방법을 설명하기 위한 도면이다.5 is a diagram for explaining a method of compressing and transmitting a feature vector in order to increase communication efficiency between the electronic device 100 and an external device.

도 4에서 설명한 바와 같이, 프로세서(140)는 마이크(110)를 통해 제1 언어의 사용자 음성(예를 들어, 안녕)이 수신되면, 제1 언어에 대응되는 제1 인코더(1-1)에 입력하여 제1 특징 벡터를 획득할 수 있다.As described with reference to FIG. 4 , when the user's voice (for example, hello) of the first language is received through the microphone 110, the processor 140 outputs a signal to the first encoder 1-1 corresponding to the first language. The first feature vector may be obtained by inputting

여기서, 메모리(120)는 특징 벡터를 압축하기 위한 다양한 압축 알고리즘(이하, 컴프레서(compressor)을 저장할 수 있다. 프로세서(140)는 컴프레서를 이용하여 제1 특징 벡터를 압축한 뒤, 압축된 제1 특징 벡터를 통신 인터페이스(130)를 이용하여 제1 외부 장치(200), 제2 외부 장치(300) 등으로 전송할 수 있다.Here, the memory 120 may store various compression algorithms (hereinafter referred to as compressors) for compressing the feature vector. The processor 140 compresses the first feature vector using the compressor, and then compresses the first feature vector. The feature vector may be transmitted to the first external device 200 or the second external device 300 using the communication interface 130 .

한편, 제1 외부 장치(200)는 다양한 압축 해제 알고리즘(이하, 디컴프레서(decompressor))을 이용하여 압축된 제1 특징 벡터의 압축을 해제할 수 있다. 이어서, 제1 외부 장치(200)는 제1 특징 벡터를 제2 언어에 대응되는 제2 디코더(2-2)에 입력하여 제2 언어의 제2 텍스트(예를 들어, Hello)를 획득할 수 있다.Meanwhile, the first external device 200 may decompress the compressed first feature vector using various decompression algorithms (hereinafter referred to as decompressors). Next, the first external device 200 may input the first feature vector to the second decoder 2-2 corresponding to the second language to obtain second text (eg, Hello) in the second language. there is.

다른 예로, 제1 외부 장치(200)는 제2 언어의 사용자 음성(예를 들어, Hello)이 수신되면, 제2 언어에 대응되는 제2 인코더(1-2)에 입력하여 제2 특징 벡터를 획득하고, 제2 특징 벡터를 압축한 뒤 전자 장치(100)로 전송할 수 있다.As another example, when the first external device 200 receives a user voice (eg, Hello) in the second language, the second feature vector is generated by inputting the second feature vector to the second encoder 1-2 corresponding to the second language. After obtaining, compressing the second feature vector, it may be transmitted to the electronic device 100 .

전자 장치(100)에 구비된 프로세서(140)는 압축된 제2 특징 벡터를 메모리(120)에 저장된 디컴프세서를 이용하여 압축을 해제할 수 있다. 이어서, 프로세서(140)는 제2 특징 벡터를 제1 언어에 대응되는 제1 디코더(2-1)에 입력하여 제1 언어의 제1 텍스트(예를 들어, 안녕)를 획득할 수 있다. The processor 140 included in the electronic device 100 may decompress the compressed second feature vector using a decompressor stored in the memory 120 . Subsequently, the processor 140 may obtain first text (eg, hello) of the first language by inputting the second feature vector to the first decoder 2-1 corresponding to the first language.

한편, 전자 장치(100), 외부 장치 각각에 구비된 컴프레서 및 디컴프레서는 종래의 공간 영역 성분인 벡터를 압축(또는, 압축 해제)하는 알고리즘을 이용할 수 있다. 여기서, 벡터 압축 알고리즘은 손실 또는 무손실 압축 알고리즘 중 적어도 하나를 포함할 수 있다.Meanwhile, the compressor and decompressor provided in each of the electronic device 100 and the external device may use a conventional algorithm for compressing (or decompressing) a vector, which is a spatial domain component. Here, the vector compression algorithm may include at least one of a lossy or lossless compression algorithm.

예를 들어, 프로세서(140)는 전자 장치(100)와 외부 장치 간의 통신 상태를 식별하며, 통신 상태에 따른 대역폭, 속도 등이 기준치 미만이면, 손실 압축 알고리즘을 이용하여 특징 벡터를 상대적으로 높은 압축률로 압축할 수 있다.For example, the processor 140 identifies a communication state between the electronic device 100 and an external device, and if the bandwidth or speed according to the communication state is less than a reference value, the feature vector is converted to a relatively high compression rate by using a lossy compression algorithm. can be compressed with

다른 예로, 프로세서(140)는 전자 장치(100)와 외부 장치 간의 통신 상태를 식별하며, 통신 상태에 따른 대역폭, 속도 등이 기준치 이상이면, 무손실 압축 알고리즘을 이용하여 특징 벡터를 상대적으로 낮은 압축률로 압축할 수 있다. 또 다른 예로, 프로세서(140)는 압축하지 않은 특징 벡터를 외부 장치로 전송할 수도 있음은 물론이다.As another example, the processor 140 identifies a communication state between the electronic device 100 and an external device, and if the bandwidth, speed, etc. according to the communication state is greater than or equal to a reference value, the feature vector is compressed at a relatively low compression rate using a lossless compression algorithm. can be compressed. As another example, of course, the processor 140 may transmit an uncompressed feature vector to an external device.

도 6은 본 개시의 일 실시 예에 따른 특징 벡터를 전송하는 과정을 설명하기 위한 시퀀스도이다.6 is a sequence diagram for explaining a process of transmitting a feature vector according to an embodiment of the present disclosure.

도 6을 참조하면, 마이크(110)를 통해 수신된 제1 언어의 사용자 음성이 프로세서(140)로 전송된다(S610). 프로세서(140)는 ASR 모듈을 이용하여 사용자 음성에 대응되는 제1 텍스트를 획득할 수 있다(S620).Referring to FIG. 6 , the user's voice of the first language received through the microphone 110 is transmitted to the processor 140 (S610). The processor 140 may obtain first text corresponding to the user's voice using the ASR module (S620).

이어서, 프로세서(140)는 제1 언어에 대응되는 인코더(1-1)를 이용하여 제1 텍스트에 대응되는 제1 특징 벡터를 획득할 수 있다(S630).Subsequently, the processor 140 may obtain a first feature vector corresponding to the first text using the encoder 1-1 corresponding to the first language (S630).

이어서, 프로세서(140)는 제1 특징 벡터를 컴프레서 모듈로 전송할 수 있다(S640). 프로세서(140)는 컴프레서 모듈을 이용하여 제1 특징 벡터를 압축하며(S650), 압축된 제1 특징 벡터를 통신 인터페이스(130)로 전송할 수 있다(S660).Subsequently, the processor 140 may transmit the first feature vector to the compressor module (S640). The processor 140 may compress the first feature vector using the compressor module (S650) and transmit the compressed first feature vector to the communication interface 130 (S660).

이어서, 프로세서(140)는 통신 인터페이스(130)를 통해 압축된 제1 특징 벡터를 제1 외부 장치(200)로 전송할 수 있다(S670).Subsequently, the processor 140 may transmit the compressed first feature vector to the first external device 200 through the communication interface 130 (S670).

도 7은 본 개시의 일 실시 예에 따른 특징 벡터를 수신하는 과정을 설명하기 위한 시퀀스도이다.7 is a sequence diagram for explaining a process of receiving a feature vector according to an embodiment of the present disclosure.

도 7을 참조하면, 통신 인터페이스(130)를 통해 제1 외부 장치(200)로부터 압축된 제2 특징 벡터를 수신한다(S710). 이어서, 프로세서(140)는 통신 인터페이스(130)로부터 압축된 제2 특징 벡터가 수신되면(S720), 디컴프레서 모듈을 이용하여 압축된 제2 특징 벡터를 압축 해제할 수 있다(S730).Referring to FIG. 7 , a compressed second feature vector is received from the first external device 200 through the communication interface 130 (S710). Subsequently, when the compressed second feature vector is received from the communication interface 130 (S720), the processor 140 may decompress the compressed second feature vector using the decompressor module (S730).

이어서, 프로세서(140)는 제2 특징 벡터를 제1 언어에 대응되는 제1 디코더(2-1)에 입력하여 제1 언어에 대응되는 제2 텍스트를 획득할 수 있다(S750). 프로세서(140)는 제1 언어에 대응되는 제2 텍스트를 TTS 모델에 입력하여 제2 텍스트에 대응되는 사운드를 획득할 수 있으며, 사운드를 출력부(150)로 전송할 수 있다(760). 이어서, 전자 장치(100)는 출력부(150)를 이용하여 사운드를 출력할 수 있다.Subsequently, the processor 140 may obtain second text corresponding to the first language by inputting the second feature vector to the first decoder 2-1 corresponding to the first language (S750). The processor 140 may obtain a sound corresponding to the second text by inputting the second text corresponding to the first language to the TTS model, and may transmit the sound to the output unit 150 (760). Subsequently, the electronic device 100 may output sound using the output unit 150 .

도 8은 본 개시의 일 실시 예에 따른 인코더와 디코더의 학습 과정을 설명하기 위한 도면이다.8 is a diagram for explaining a learning process of an encoder and a decoder according to an embodiment of the present disclosure.

우선, 복수의 언어 각각에 대응되는 인코더 및 복수의 언어 각각에 대응되는 디코더가 구비된다.First, an encoder corresponding to each of a plurality of languages and a decoder corresponding to each of a plurality of languages are provided.

여기서, 복수의 언어 중 제1 언어에 대응되는 제1 인코더는 제1 언어의 제1 텍스트를 입력 데이터(Source sentence)로 하며, 복수의 언어 중 제2 언어에 대응되는 제2 인코더는 제2 언어의 제2 텍스트를 입력 데이터(Source sentence)로 한다.Here, a first encoder corresponding to a first language among a plurality of languages uses a first text of the first language as input data (source sentence), and a second encoder corresponding to a second language among a plurality of languages uses a first text of the first language as a source sentence. The second text of is used as the input data (source sentence).

여기서, 제1 언어의 제1 텍스트와 제2 언어의 제2 텍스트는 언어는 상이하나 의미가 동일할 수 있다(또는, 의미가 임계 값 이상의 유사도를 가질 수 있다).Here, the first text of the first language and the second text of the second language may have different languages but the same meaning (or, the meaning may have a similarity higher than a threshold value).

한편, 제1 인코더와 제2 인코더 각각은, 시퀀스-투-시퀀스(sequence-to-sequence) 모델일 수 있다. 여기서, 시퀀스(sequence)란 서로 연관된 연속의 데이터를 의미하며, 본 개시에 있어서 시퀀스(sequence)란 개별적인 단어가 아닌, 문장, 구 단위를 의미할 수 있다. 예를 들어, 제1 언어의 제1 텍스트, 제2 언어의 제2 텍스트 등은 서로 연관된 연속의 데이터 즉, 문장(sentence)일 수 있다.Meanwhile, each of the first encoder and the second encoder may be a sequence-to-sequence model. Here, a sequence means data of a series related to each other, and in the present disclosure, a sequence may mean a sentence or a phrase unit, not individual words. For example, a first text of a first language, a second text of a second language, and the like may be sequential data that are related to each other, that is, a sentence.

<복수의 언어 각각에 대응되는 의미가 유사한 Source sentence 획득 방법><How to obtain source sentences with similar meanings corresponding to each of a plurality of languages>

예를 들어, 프로세서(140)는 언어 모델(Language Model, LM)을 이용하여 복수의 언어 각각에 대응되는 텍스트를 획득할 수 있다. 여기서, 언어 모델은 제1 언어의 문장이 입력되면, 임계 값 이상의 유사도를 갖는 제2 언어의 문장을 출력하도록 학습된 인공 지능 모델을 의미할 수 있다. For example, the processor 140 may obtain text corresponding to each of a plurality of languages using a language model (LM). Here, the language model may refer to an artificial intelligence model trained to output a sentence of a second language having a similarity higher than a threshold value when a sentence of the first language is input.

언어 모델은 시퀀스-투-시퀀스(sequence-to-sequence) 모델일 수 있으며, 입력 데이터의 처리를 위한 인코더(encoder) 및 출력 데이터의 처리를 위한 디코더(decoder)를 포함할 수 있다. 여기서, 인코더 및 디코더 각각은 복수의 순환 신경망(Recurrent Neural Network, RNN) 셀을 포함할 수 있다. 예를 들어, 복수의 RNN 셀은 LSTM(Long Short-Term Memory) 또는 GRU(Gated Recurrent Unit)로 구성될 수 있다. The language model may be a sequence-to-sequence model and may include an encoder for processing input data and a decoder for processing output data. Here, each of the encoder and decoder may include a plurality of Recurrent Neural Network (RNN) cells. For example, a plurality of RNN cells may be composed of Long Short-Term Memory (LSTM) or Gated Recurrent Unit (GRU).

일 실시 예에 따른 언어 모델은 신경망 기계 번역(NMT) 모델이며, 프로세서(140)는 제1 언어의 제1 텍스트가 수신되면, NMT 모델에 입력하여 제2 언어의 제2 텍스트를 획득할 수 있다.The language model according to an embodiment is a neural network machine translation (NMT) model, and if the first text of the first language is received, the processor 140 may obtain second text of the second language by inputting the received text to the NMT model. .

여기서, 신경망 기계 번역 모델은 병렬 코퍼스(parallel corpus)에 기초하여 학습된 모델일 수 있다. 여기서, 병렬 코퍼스는 서로 다른 언어의 문장들이 서로 대응되도록 병렬적으로 구성된 코퍼스일 수 있다. 신경망 기계 번역 모델은 제1 언어의 제1 텍스트를 제2 언어의 제2 텍스트로 번역하기 위한 병렬 코퍼스에 포함된 복수의 문장에 기초하여 학습될 수 있다. Here, the neural network machine translation model may be a model learned based on a parallel corpus. Here, the parallel corpus may be a corpus configured in parallel so that sentences of different languages correspond to each other. A neural network machine translation model may be trained based on a plurality of sentences included in a parallel corpus for translating a first text in a first language into a second text in a second language.

<인코더의 학습 방법><Encoder learning method>

한편, 프로세서(140)는 신경망 기계 번역 모델을 이용하여 획득된 제1 언어의 제1 텍스트 및 제2 언어의 제2 텍스트 각각을 제1 인코더 및 제2 인코더에 입력할 수 있다.Meanwhile, the processor 140 may input the first text of the first language and the second text of the second language obtained by using the neural network machine translation model to the first encoder and the second encoder, respectively.

여기서, 제1 텍스트와 제2 텍스트는 언어는 상이하나, 의미가 동일하므로, 제1 인코더가 제1 텍스트를 변환하여 출력한 특징 벡터와 제2 인코더가 제2 텍스트를 변환하여 출력한 특징 벡터가 동일하도록 제1 인코더와 제2 인코더는 학습될 수 있다.Here, since the first text and the second text have different languages but the same meaning, the feature vector converted and output by the first encoder and the feature vector output by converting the second text by the second encoder are The first encoder and the second encoder may be learned to be the same.

한편, 특징 벡터는 컨텍스트 벡터(context vector)로 불릴 수도 있다. 인코더는 입력 데이터 즉, 문장을 구성하는 복수의 단어들을 순차적으로 입력받은 뒤, 복수의 단어들을 포함하는 문장을 하나의 컨텍스트 벡터로 표현할 수 있다. 컨텍스트 벡터는 차원, 사이즈는 다양할 수 있다. 이하에서는 설명의 편의를 위해 특징 벡터로 통칭하도록 한다.On the other hand, features A vector may also be called a context vector. The encoder may sequentially receive input data, that is, a plurality of words constituting a sentence, and then express the sentence including the plurality of words as one context vector. Context vectors can have different dimensions and sizes. Hereinafter, for convenience of explanation, it will be collectively referred to as a feature vector.

<디코더의 학습 방법><Decoder learning method>

일 실시 예에 따라, 프로세서(140)는 제1 인코더를 이용하여 획득된 특징 벡터를 제2 디코더에 입력하며, 제2 디코더를 이용하여 획득된 특징 벡터를 제1 디코더에 입력할 수 있다.According to an embodiment, the processor 140 may input the feature vector obtained using the first encoder to the second decoder, and may input the feature vector obtained using the second decoder to the first decoder.

한편, 제1 디코더와 제2 디코더 각각에 입력되는 특징 벡터가 동일하므로, 제1 디코더가 출력하는 제1 언어의 제1 텍스트와 제2 디코더가 출력하는 제2 언어의 제2 텍스트는 언어는 상이하나, 의미가 동일하도록 제1 디코더 및 제2 디코더가 학습될 수 있다.Meanwhile, since the feature vectors input to the first decoder and the second decoder are the same, the first text of the first language output from the first decoder and the second text of the second language output from the second decoder have different languages. However, the first decoder and the second decoder may be learned to have the same meaning.

<인코더와 디코더의 동작 방법><Operation method of encoder and decoder>

일 실시 예에 따른, 인코더는 토큰화(tokenization)를 통해 텍스트를 단어 단위로 나누며, 워드 임베딩(word embedding)을 통해 나누어진 각각의 단어를 특징 벡터로 변환할 수 있다. 그리고, 디코더는 특징 벡터로 변환된 각각의 단어를 언어 모델에 포함되는 각각의 RNN 셀에 대한 각 시점(time-step)에 입력하며, 각 시점(time step)의 RNN 셀에서 출력 벡터가 나오면, 출력 벡터를 소프트맥스 함수를 통해 출력 시퀀스의 각 단어별 확률값으로 변환하고, 디코더는 출력 단어 즉, 텍스트를 결정할 수 있다.According to an embodiment, the encoder may divide text into word units through tokenization and convert each divided word into a feature vector through word embedding. Then, the decoder inputs each word converted into a feature vector at each time-step for each RNN cell included in the language model, and when an output vector is output from the RNN cell at each time step, The output vector is converted into a probability value for each word of the output sequence through the softmax function, and the decoder can determine the output word, that is, text.

도 9는 본 개시의 일 실시 예에 따른 서버와 통신을 수행하는 전자 장치를 설명하기 위한 도면이다.9 is a diagram for explaining an electronic device that communicates with a server according to an embodiment of the present disclosure.

상술한 실시 예들에서 전자 장치(100)가 제1 언어에 대응되는 제1 인코더와 제1 디코더를 포함하며, 제1 외부 장치(200)가 제2 언어에 대응되는 제2 인코더와 제2 디코더를 포함하므로, 전자 장치(100)와 제1 외부 장치(200)가 특징 벡터를 전송 또는 수신하여도 제1 언어에서 제2 언어로의 번역 기능 또는 제2 언어에서 제1 언어로의 번역 기능을 원활히 제공할 수 있었다.In the above-described embodiments, the electronic device 100 includes a first encoder and a first decoder corresponding to a first language, and the first external device 200 includes a second encoder and a second decoder corresponding to a second language. Therefore, even when the electronic device 100 and the first external device 200 transmit or receive feature vectors, the translation function from the first language to the second language or the translation function from the second language to the first language can be smoothly performed. could provide

다만, 전자 장치(100)가 통신을 수행하는 제1 외부 장치(200)가 제2 언어에 대응되는 제2 인코더와 제2 디코더를 포함하지 않으면, 전자 장치(100)가 제1 언어의 텍스트를 특징 벡터로 변환한 뒤, 특징 벡터를 제1 외부 장치(200)로 전송하여도 제1 외부 장치(200)는 특징 벡터를 제2 언어의 텍스트로 변환하기 위한 제2 디코더가 부재하므로, 제2 언어의 텍스트를 획득할 수 없다는 문제가 있다.However, when the first external device 200 through which the electronic device 100 communicates does not include a second encoder and a second decoder corresponding to the second language, the electronic device 100 converts text in the first language. After converting the feature vector into a feature vector, even if the feature vector is transmitted to the first external device 200, the first external device 200 does not have a second decoder for converting the feature vector into text in a second language. There is a problem that the text of the language cannot be obtained.

본 개시의 다른 실시 예에 따라 전자 장치(100)는 제1 외부 장치(200)와 통신을 수행하여 제1 외부 장치(200)가 제2 언어에 대응되는 제2 디코더를 포함하는지 여부를 식별할 수 있다.According to another embodiment of the present disclosure, the electronic device 100 may perform communication with the first external device 200 to identify whether the first external device 200 includes a second decoder corresponding to the second language. can

이어서, 프로세서(140)는 제1 외부 장치(200)가 제2 디코더를 포함하는 것으로 식별되면, 특징 벡터를 제1 외부 장치(200)로 전송할 수 있다.Subsequently, when the first external device 200 is identified as including the second decoder, the processor 140 may transmit the feature vector to the first external device 200 .

다른 예로, 프로세서(140)는 제1 외부 장치(200)가 제2 디코더를 포함하지 않는 것으로 식별되면, 특징 벡터를 서버(1000)로 전송할 수 있다.As another example, if the first external device 200 is identified as not including the second decoder, the processor 140 may transmit the feature vector to the server 1000 .

이어서, 프로세서(140)는 전송에 따라 서버(1000)로부터 제2 언어의 텍스트가 수신되면, 수신된 제2 언어의 텍스트를 제1 외부 장치(200)로 전송할 수 있다.Subsequently, when text in the second language is received from the server 1000 according to transmission, the processor 140 may transmit the received text in the second language to the first external device 200 .

따라서, 제1 외부 장치(200)가 전자 장치(100)처럼 사용자의 주된 언어에 대응되는 인코더 및 디코더를 구비하지 않은 경우에도, 전자 장치(100)의 사용자와 제1 외부 장치(200)의 사용자 간의 커뮤니케이션이 가능할 수 있다.Therefore, even when the first external device 200 does not have an encoder and a decoder corresponding to the user's primary language like the electronic device 100, the user of the electronic device 100 and the user of the first external device 200 Communication between them can be possible.

도 3으로 돌아와서, 본 개시의 일 실시 예에 따른 전자 장치(100), 외부 장치는 예를 들면, 스마트폰, 태블릿 PC, 이동 전화기, 영상 전화기, 전자책 리더기, 데스크탑 PC, 랩탑 PC, 넷북 컴퓨터, 워크스테이션, 서버, PDA, PMP(portable multimedia player), MP3 플레이어, 의료기기, 카메라, 가상 현실(virtual reality(VR)) 구현 장치 또는 웨어러블 장치 중 적어도 하나를 포함할 수 있다. 웨어러블 장치는 액세서리형(예: 시계, 반지, 팔찌, 발찌, 목걸이, 안경, 콘택트 렌즈, 또는 머리 착용형 장치(head-mounted-device(HMD)), 직물 또는 의류 일체형(예: 전자 의복), 신체 부착형(예: 스킨 패드 또는 문신), 또는 생체 이식형 회로 중 적어도 하나를 포함할 수 있다.Returning to FIG. 3 , the electronic device 100 and the external device according to an embodiment of the present disclosure include, for example, a smart phone, a tablet PC, a mobile phone, a video phone, an e-book reader, a desktop PC, a laptop PC, and a netbook computer. , a workstation, a server, a PDA, a portable multimedia player (PMP), an MP3 player, a medical device, a camera, a virtual reality (VR) implementation device, or a wearable device. A wearable device may be in the form of an accessory (e.g. watch, ring, bracelet, anklet, necklace, eyeglasses, contact lens, or head-mounted-device (HMD)), integrated into textiles or clothing (e.g. electronic garment); It may include at least one of a body-attached circuit (eg, a skin pad or tattoo) or a body-implanted circuit.

어떤 실시 예들에서, 전자 장치(100)는 예를 들면, 텔레비전, DVD(digital video disk) 플레이어, 오디오, 냉장고, 에어컨, 청소기, 오븐, 전자레인지, 세탁기, 공기 청정기, 셋톱 박스, 홈 오토매이션 컨트롤 패널, 보안 컨트롤 패널, 미디어 박스(예: 삼성 HomeSyncTM, 애플TVTM, 또는 구글 TVTM), 게임 콘솔(예: XboxTM, PlayStationTM), 전자 사전, 전자 키, 캠코더, 또는 전자 액자 중 적어도 하나를 포함할 수 있다.In some embodiments, the electronic device 100 may be, for example, a television, a digital video disk (DVD) player, an audio device, a refrigerator, an air conditioner, a vacuum cleaner, an oven, a microwave oven, a washing machine, an air purifier, a set top box, and a home automation device. It may include at least one of a control panel, a secure control panel, a media box (eg Samsung HomeSyncTM, Apple TVTM, or Google TVTM), a game console (eg XboxTM, PlayStationTM), an electronic dictionary, an electronic key, a camcorder, or an electronic picture frame. can

다른 실시 예에서, 전자 장치(100)는 각종 의료기기(예: 각종 휴대용 의료측정기기(혈당 측정기, 심박 측정기, 혈압 측정기, 또는 체온 측정기 등), MRA(magnetic resonance angiography), MRI(magnetic resonance imaging), CT(computed tomography), 촬영기, 또는 초음파기 등), 네비게이션 장치, 위성 항법 시스템(GNSS(global navigation satellite system)), EDR(event data recorder), FDR(flight data recorder), 자동차 인포테인먼트 장치, 선박용 전자 장비(예: 선박용 항법 장치, 자이로 콤파스 등), 항공 전자기기(avionics), 보안 기기, 차량용 헤드 유닛(head unit), 산업용 또는 가정용 로봇, 드론(drone), 금융 기관의 ATM, 상점의 POS(point of sales), 또는 사물 인터넷 장치 (예: 전구, 각종 센서, 스프링클러 장치, 화재 경보기, 온도조절기, 가로등, 토스터, 운동기구, 온수탱크, 히터, 보일러 등) 중 적어도 하나를 포함할 수 있다.In another embodiment, the electronic device 100 may include various types of medical devices (eg, various portable medical measuring devices such as a blood glucose meter, heart rate monitor, blood pressure monitor, or body temperature monitor), magnetic resonance angiography (MRA), and magnetic resonance imaging (MRI). ), CT (computed tomography), camera, or ultrasonicator, etc.), navigation device, satellite navigation system (GNSS (global navigation satellite system)), EDR (event data recorder), FDR (flight data recorder), automobile infotainment device, ship Electronic equipment (e.g. navigation systems for ships, gyrocompasses, etc.), avionics, security devices, head units for vehicles, industrial or domestic robots, drones, ATMs in financial institutions, POS in stores (point of sales), or IoT devices (e.g., light bulbs, various sensors, sprinkler devices, fire alarms, thermostats, street lights, toasters, exercise equipment, hot water tanks, heaters, boilers, etc.). .

본 개시에서, 인공 지능 모델이 학습된다는 것은, 기본 인공 지능 모델(예를 들어 임의의 랜덤한 파라미터를 포함하는 인공 지능 모델)이 학습 알고리즘에 의하여 다수의 훈련 데이터들을 이용하여 학습됨으로써, 원하는 특성(또는, 목적)을 수행하도록 설정된 기 정의된 동작 규칙 또는 인공 지능 모델이 만들어짐을 의미한다. 이러한 학습은 별도의 서버 및/또는 시스템을 통해 이루어질 수 있으나, 이에 한정되는 것은 아니며 전자 장치(100)에서 이루어질 수도 있다. 학습 알고리즘의 예로는, 지도형 학습(supervised learning), 비지도형 학습(unsupervised learning), 준지도형 학습(semi-supervised learning), 전이 학습(transfer learning) 또는 강화 학습(reinforcement learning)이 있으나, 전술한 예에 한정되지 않는다.In the present disclosure, learning of an artificial intelligence model means that a basic artificial intelligence model (eg, an artificial intelligence model including random parameters) is learned using a plurality of training data by a learning algorithm, so that desired characteristics ( Or, it means that a predefined action rule or artificial intelligence model set to perform a purpose) is created. Such learning may be performed through a separate server and/or system, but is not limited thereto and may be performed in the electronic device 100 . Examples of learning algorithms include supervised learning, unsupervised learning, semi-supervised learning, transfer learning, or reinforcement learning, but the aforementioned not limited to examples.

여기서, 인공 지능 모델 각각은, 예를 들어, CNN (Convolutional Neural Network), RNN (Recurrent Neural Network), RBM (Restricted Boltzmann Machine), DBN (Deep Belief Network), BRDNN(Bidirectional Recurrent Deep Neural Network) 또는 심층 Q-네트워크 (Deep Q-Networks) 등으로 구현될 수 있으나, 이에 한정되지 않는다.Here, each artificial intelligence model is, for example, a Convolutional Neural Network (CNN), a Recurrent Neural Network (RNN), a Restricted Boltzmann Machine (RBM), a Deep Belief Network (DBN), a Bidirectional Recurrent Deep Neural Network (BRDNN), or a deep Neural Network (BRDNN). It may be implemented as Q-networks (Deep Q-Networks), etc., but is not limited thereto.

본 개시의 일 실시 예에 따른 인공 지능 모델을 실행하기 위한 프로세서(140)는 CPU, AP, DSP(Digital Signal Processor) 등과 같은 범용 프로세서, GPU, VPU(Vision Processing Unit)와 같은 그래픽 전용 프로세서 또는 NPU와 같은 인공 지능 전용 프로세서와 소프트웨어의 조합을 통해 구현될 수 있다. 프로세서(140)는, 메모리(120)에 저장된 기 정의된 동작 규칙 또는 인공 지능 모델에 따라, 입력 데이터를 처리하도록 제어할 수 있다. 또는, 프로세서(140)가 전용 프로세서(또는 인공 지능 전용 프로세서)인 경우, 특정 인공 지능 모델의 처리에 특화된 하드웨어 구조로 설계될 수 있다. 예를 들어, 특정 인공 지능 모델의 처리에 특화된 하드웨어는 ASIC, FPGA 등의 하드웨어 칩으로 설계될 수 있다. 프로세서(140)가 전용 프로세서로 구현되는 경우, 본 개시의 실시 예를 구현하기 위한 메모리를 포함하도록 구현되거나, 외부 메모리를 이용하기 위한 메모리 처리 기능을 포함하도록 구현될 수 있다.The processor 140 for executing the artificial intelligence model according to an embodiment of the present disclosure may be a general-purpose processor such as a CPU, an AP, a digital signal processor (DSP), a graphics-only processor such as a GPU, a vision processing unit (VPU), or an NPU. It can be implemented through a combination of a dedicated artificial intelligence processor and software. The processor 140 may control input data to be processed according to predefined operation rules or artificial intelligence models stored in the memory 120 . Alternatively, if the processor 140 is a dedicated processor (or artificial intelligence dedicated processor), it may be designed as a hardware structure specialized for processing a specific artificial intelligence model. For example, hardware specialized for the processing of a specific artificial intelligence model may be designed as a hardware chip such as an ASIC or FPGA. When the processor 140 is implemented as a dedicated processor, it may be implemented to include a memory for implementing an embodiment of the present disclosure or to include a memory processing function for using an external memory.

다른 예에 따라, 메모리(120)는 복수의 레이어를 포함하는 인공 지능 모델에 관한 정보를 저장할 수 있다. 여기서, 인공 지능 모델에 관한 정보를 저장한다는 것은 인공 지능 모델의 동작과 관련된 다양한 정보, 예를 들어 인공 지능 모델에 포함된 복수의 레이어에 대한 정보, 복수의 레이어 각각에서 이용되는 파라미터(예를 들어, 필터 계수, 바이어스 등)에 대한 정보 등을 저장한다는 것을 의미할 수 있다. According to another example, the memory 120 may store information about an artificial intelligence model including a plurality of layers. Here, storing information about the artificial intelligence model means various information related to the operation of the artificial intelligence model, for example, information about a plurality of layers included in the artificial intelligence model, parameters used in each of the plurality of layers (eg, , filter coefficients, bias, etc.)

도 10은 본 개시의 일 실시 예에 따른 전자 장치의 제어 방법을 설명하기 위한 흐름도이다.10 is a flowchart for explaining a control method of an electronic device according to an embodiment of the present disclosure.

본 개시의 일 실시 예에 따른 전자 장치의 제어 방법은, 우선, 제1 언어의 사용자 음성이 수신되면, 사용자 음성에 대응되는 제1 언어의 텍스트를 획득한다(S1010).In the method for controlling an electronic device according to an embodiment of the present disclosure, first, when a user's voice in a first language is received, text in the first language corresponding to the user's voice is obtained (S1010).

이어서, 제1 언어의 텍스트를 제1 언어에 대응되는 제1 인코더에 입력하여 제1 특징 벡터를 획득한다(S1020).Next, a first feature vector is acquired by inputting the text of the first language to the first encoder corresponding to the first language (S1020).

이어서, 제1 특징 벡터를 외부 장치로 전송한다(S1030).Subsequently, the first feature vector is transmitted to an external device (S1030).

이어서, 외부 장치로부터 제2 특징 벡터가 수신되면, 제2 특징 벡터를 제1 언어에 대응되는 제1 디코더에 입력하여 제2 특징 벡터에 대응되는 제1 언어의 텍스트를 획득한다(S1040).Subsequently, when the second feature vector is received from the external device, the second feature vector is input to the first decoder corresponding to the first language to obtain text in the first language corresponding to the second feature vector (S1040).

일 실시 예에 따른 제1 인코더는, 제1 언어의 제1 텍스트 및 벡터 공간 상의 특징 벡터를 입력 데이터 및 출력 데이터로 하여 학습된 모델이고, 제1 언어와 상이한 제2 언어에 대응되는 제2 인코더는, 제1 텍스트와 임계 값 이상의 유사도를 가지는 제2 언어의 제2 텍스트 및 벡터 공간 상의 특징 벡터를 입력 데이터 및 출력 데이터로 하여 학습된 모델일 수 있다.A first encoder according to an embodiment is a model learned using a first text of a first language and a feature vector on a vector space as input data and output data, and a second encoder corresponding to a second language different from the first language may be a model learned by using, as input data and output data, a second text of a second language having a similarity with the first text and a feature vector on a vector space.

또한, 제2 언어에 대응되는 제2 인코더는, 외부 장치에 포함되며, 제2 언어의 사용자 음성에 대응되는 텍스트가 입력되면, 제2 특징 벡터를 출력할 수 있다.In addition, the second encoder corresponding to the second language is included in the external device and can output a second feature vector when text corresponding to the user's voice of the second language is input.

여기서, 제1 디코더는, 벡터 공간 상의 특징 벡터 및 제1 언어의 제1 텍스트를 입력 데이터 및 출력 데이터로 하여 학습된 모델이고, 제1 언어와 상이한 제2 언어에 대응되는 제2 디코더는, 벡터 공간 상의 특징 벡터 및 제1 텍스트와 임계 값 이상의 유사도를 가지는 제2 언어의 제2 텍스트를 입력 데이터 및 출력 데이터로 하여 학습된 모델일 수 있다.Here, the first decoder is a model learned using a feature vector on a vector space and a first text of a first language as input data and output data, and a second decoder corresponding to a second language different from the first language is a vector It may be a model learned by using a feature vector in space and a second text of a second language having a similarity with the first text equal to or higher than a threshold value as input data and output data.

여기서, 제2 언어에 대응되는 제2 디코더는, 외부 장치에 포함되며, 전자 장치로부터 수신된 제1 특징 벡터가 입력되면, 제2 언어의 텍스트를 출력할 수 있다.Here, the second decoder corresponding to the second language is included in the external device and can output text of the second language when the first feature vector received from the electronic device is input.

여기서, 외부 장치와 통신을 수행하여 외부 장치가 제2 언어에 대응되는 제2 디코더를 포함하는지 여부를 식별하는 단계, 외부 장치가 제2 디코더를 포함하는 것으로 식별되면, 제1 특징 벡터를 외부 장치로 전송하는 단계 및 외부 장치가 제2 디코더를 포함하지 않는 것으로 식별되면, 제1 특징 벡터를 서버로 전송하는 단계를 더 포함할 수 있다.Here, identifying whether or not the external device includes a second decoder corresponding to the second language by communicating with the external device. If the external device is identified as including the second decoder, a first feature vector is transmitted to the external device. and if the external device is identified as not including the second decoder, transmitting the first feature vector to the server.

일 실시 예에 따른 제어 방법은 TTS(Text to speech)를 이용하여 제1 언어의 텍스트에 대응되는 제1 언어의 사운드를 획득하는 단계 및 제1 언어의 사운드를 출력하는 단계를 더 포함할 수 있다.The control method according to an embodiment may further include obtaining a sound of the first language corresponding to the text of the first language by using Text to Speech (TTS) and outputting the sound of the first language. .

일 실시 예에 따른 제어 방법은 컴프레서에 기초하여 제1 특징 벡터를 압축하는 단계, 압축된 제1 특징 벡터를 통신 인터페이스를 통해 외부 장치로 전송하는 단계, 외부 장치로부터 압축된 제2 특징 벡터가 수신되면, 디컴프레서에 기초하여 압축된 제2 특징 벡터를 압축 해제하는 단계 및 압축 해제된 제2 특징 벡터를 제1 디코더에 입력하는 단계를 더 포함할 수 있다.A control method according to an embodiment includes compressing a first feature vector based on a compressor, transmitting the compressed first feature vector to an external device through a communication interface, and receiving a compressed second feature vector from the external device. If so, the method may further include decompressing the compressed second feature vector based on the decompressor and inputting the decompressed second feature vector to the first decoder.

일 실시 예에 따른 제1 인코더 및 제1 디코더는, 신경망 기계 번역(Neural machine translation, NMT) 모델에 포함되며, 신경망 기계 번역 모델은, 사용자 음성이 입력되면, 사용자 음성에 대응되는 텍스트를 벡터 값으로 변환하여 제1 특징 벡터를 획득하며, 제2 특징 벡터가 입력되면, 제2 특징 벡터를 제1 언어의 텍스트로 변환할 수 있다.The first encoder and the first decoder according to an embodiment are included in a neural machine translation (NMT) model, and when a user voice is input, the neural network machine translation model converts text corresponding to the user voice into a vector value. to obtain a first feature vector, and when the second feature vector is input, the second feature vector may be converted into text in the first language.

다만, 본 개시의 다양한 실시 예들은 전자 장치 뿐 아니라, 음성 신호를 수신할 수 있는 모든 전자 장치에 적용될 수 있음은 물론이다. However, it goes without saying that various embodiments of the present disclosure may be applied to all electronic devices capable of receiving voice signals as well as electronic devices.

한편, 이상에서 설명된 다양한 실시 예들은 소프트웨어(software), 하드웨어(hardware) 또는 이들의 조합을 이용하여 컴퓨터(computer) 또는 이와 유사한 장치로 읽을 수 있는 기록 매체 내에서 구현될 수 있다. 일부 경우에 있어 본 명세서에서 설명되는 실시 예들이 프로세서 자체로 구현될 수 있다. 소프트웨어적인 구현에 의하면, 본 명세서에서 설명되는 절차 및 기능과 같은 실시 예들은 별도의 소프트웨어 모듈들로 구현될 수 있다. 소프트웨어 모듈들 각각은 본 명세서에서 설명되는 하나 이상의 기능 및 동작을 수행할 수 있다.Meanwhile, various embodiments described above may be implemented in a recording medium readable by a computer or a similar device using software, hardware, or a combination thereof. In some cases, the embodiments described herein may be implemented in a processor itself. According to software implementation, embodiments such as procedures and functions described in this specification may be implemented as separate software modules. Each of the software modules may perform one or more functions and operations described herein.

한편, 상술한 본 개시의 다양한 실시 예들에 따른 전자 장치(100)의 프로세싱 동작을 수행하기 위한 컴퓨터 명령어(computer instructions)는 비일시적 컴퓨터 판독 가능 매체(non-transitory computer-readable medium) 에 저장될 수 있다. 이러한 비일시적 컴퓨터 판독 가능 매체에 저장된 컴퓨터 명령어는 특정 기기의 프로세서에 의해 실행되었을 때 상술한 다양한 실시 예에 따른 음향 출력 장치(100)에서의 처리 동작을 특정 기기가 수행하도록 한다. Meanwhile, computer instructions for performing the processing operation of the electronic device 100 according to various embodiments of the present disclosure described above may be stored in a non-transitory computer-readable medium. there is. When the computer instructions stored in the non-transitory computer readable medium are executed by the processor of the specific device, the processing operation in the audio output device 100 according to various embodiments described above is performed by the specific device.

비일시적 컴퓨터 판독 가능 매체란 레지스터, 캐쉬, 메모리 등과 같이 짧은 순간 동안 데이터를 저장하는 매체가 아니라 반영구적으로 데이터를 저장하며, 기기에 의해 판독(reading)이 가능한 매체를 의미한다. 비일시적 컴퓨터 판독 가능 매체의 구체적인 예로는, CD, DVD, 하드 디스크, 블루레이 디스크, USB, 메모리카드, ROM 등이 있을 수 있다.A non-transitory computer readable medium is a medium that stores data semi-permanently and is readable by a device, not a medium that stores data for a short moment, such as a register, cache, or memory. Specific examples of the non-transitory computer readable media may include CD, DVD, hard disk, Blu-ray disk, USB, memory card, ROM, and the like.

이상에서는 본 개시의 바람직한 실시 예에 대하여 도시하고 설명하였지만, 본 개시는 상술한 특정의 실시 예에 한정되지 아니하며, 청구범위에서 청구하는 본 개시의 요지를 벗어남이 없이 당해 개시에 속하는 기술분야에서 통상의 지식을 가진자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 개시의 기술적 사상이나 전망으로부터 개별적으로 이해되어져서는 안될 것이다.Although the preferred embodiments of the present disclosure have been shown and described above, the present disclosure is not limited to the specific embodiments described above, and is common in the technical field belonging to the present disclosure without departing from the gist of the present disclosure claimed in the claims. Of course, various modifications are possible by those with knowledge of, and these modifications should not be individually understood from the technical spirit or perspective of the present disclosure.

100: 전자 장치 110: 마이크
120: 메모리 130: 통신 인터페이스
140: 프로세서
100: electronic device 110: microphone
120: memory 130: communication interface
140: processor

Claims (18)

전자 장치에 있어서,
마이크;
통신 회로를 포함하는 통신 인터페이스;
제1 언어에 대응되는 제1 인코더 및 제1 디코더를 저장하는 메모리; 및
상기 마이크를 통해 상기 제1 언어의 사용자 음성이 수신되면, 상기 사용자 음성에 대응되는 상기 제1 언어의 텍스트를 획득하고,
상기 제1 언어의 텍스트를 상기 제1 인코더에 입력하여 제1 특징 벡터를 획득하고,
상기 통신 인터페이스를 통해 상기 제1 특징 벡터를 외부 장치로 전송하며,
상기 통신 인터페이스를 통해 상기 외부 장치로부터 제2 특징 벡터가 수신되면, 상기 제2 특징 벡터를 상기 제1 디코더에 입력하여 상기 제2 특징 벡터에 대응되는 상기 제1 언어의 텍스트를 획득하는 프로세서;를 포함하는, 전자 장치.
In electronic devices,
mike;
a communication interface including communication circuitry;
a memory for storing a first encoder and a first decoder corresponding to the first language; and
When the user's voice of the first language is received through the microphone, obtaining text of the first language corresponding to the user's voice;
Obtaining a first feature vector by inputting text of the first language to the first encoder;
Transmitting the first feature vector to an external device through the communication interface;
When a second feature vector is received from the external device through the communication interface, a processor inputting the second feature vector to the first decoder to obtain text in the first language corresponding to the second feature vector; Including, electronic devices.
제1항에 있어서,
상기 제1 인코더는,
제1 언어의 제1 텍스트 및 벡터 공간 상의 특징 벡터를 입력 데이터 및 출력 데이터로 하여 학습된 모델이고,
상기 제1 언어와 상이한 제2 언어에 대응되는 제2 인코더는,
상기 제1 텍스트와 임계 값 이상의 유사도를 가지는 제2 언어의 제2 텍스트 및 상기 벡터 공간 상의 상기 특징 벡터를 입력 데이터 및 출력 데이터로 하여 학습된 모델인, 전자 장치.
According to claim 1,
The first encoder,
A model learned using a first text of a first language and a feature vector on a vector space as input data and output data;
A second encoder corresponding to a second language different from the first language,
The electronic device of claim 1 , wherein the electronic device is a model learned using a second text of a second language having a similarity with the first text and a threshold value or higher and the feature vector on the vector space as input data and output data.
제2항에 있어서,
상기 제2 언어에 대응되는 상기 제2 인코더는, 상기 외부 장치에 포함되며,
상기 제2 언어의 사용자 음성에 대응되는 텍스트가 입력되면, 상기 제2 특징 벡터를 출력하는, 전자 장치.
According to claim 2,
The second encoder corresponding to the second language is included in the external device,
The electronic device outputting the second feature vector when text corresponding to the user's voice of the second language is input.
제1항에 있어서,
상기 제1 디코더는,
벡터 공간 상의 특징 벡터 및 제1 언어의 제1 텍스트를 입력 데이터 및 출력 데이터로 하여 학습된 모델이고,
상기 제1 언어와 상이한 제2 언어에 대응되는 제2 디코더는,
상기 벡터 공간 상의 상기 특징 벡터 및 상기 제1 텍스트와 임계 값 이상의 유사도를 가지는 제2 언어의 제2 텍스트를 입력 데이터 및 출력 데이터로 하여 학습된 모델인, 전자 장치.
According to claim 1,
The first decoder,
A model learned using a feature vector on a vector space and a first text in a first language as input data and output data,
A second decoder corresponding to a second language different from the first language,
The electronic device of claim 1 , wherein the electronic device is a model learned by using the feature vector on the vector space and a second text of a second language having a similarity of a threshold value or higher to the first text as input data and output data.
제4항에 있어서,
상기 제2 언어에 대응되는 상기 제2 디코더는, 상기 외부 장치에 포함되며,
상기 전자 장치로부터 수신된 상기 제1 특징 벡터가 입력되면, 상기 제2 언어의 텍스트를 출력하는, 전자 장치.
According to claim 4,
The second decoder corresponding to the second language is included in the external device,
The electronic device outputting text in the second language when the first feature vector received from the electronic device is input.
제4항에 있어서,
상기 프로세서는,
상기 외부 장치와 통신을 수행하여 상기 외부 장치가 상기 제2 언어에 대응되는 제2 디코더를 포함하는지 여부를 식별하고, 상기 외부 장치가 상기 제2 디코더를 포함하는 것으로 식별되면, 상기 제1 특징 벡터를 상기 외부 장치로 전송하고,
상기 외부 장치가 상기 제2 디코더를 포함하지 않는 것으로 식별되면, 상기 제1 특징 벡터를 서버로 전송하는, 전자 장치.
According to claim 4,
the processor,
It identifies whether the external device includes a second decoder corresponding to the second language by communicating with the external device, and if the external device is identified as including the second decoder, the first feature vector to the external device,
and transmitting the first feature vector to a server when the external device is identified as not including the second decoder.
제1항에 있어서,
스피커;를 더 포함하며,
상기 프로세서는,
TTS(Text to speech)를 이용하여 상기 제1 언어의 텍스트에 대응되는 상기 제1 언어의 사운드를 획득하고,
상기 제1 언어의 사운드를 상기 스피커를 통해 출력하는, 전자 장치.
According to claim 1,
It further includes a speaker;
the processor,
Obtaining a sound of the first language corresponding to the text of the first language using Text to Speech (TTS);
An electronic device that outputs the sound of the first language through the speaker.
제1항에 있어서,
상기 메모리는,
컴프레서(compressor) 및 디컴프레서(decompressor)를 더 포함하며,
상기 프로세서는,
상기 컴프레서에 기초하여 상기 제1 특징 벡터를 압축하며,
상기 압축된 제1 특징 벡터를 상기 통신 인터페이스를 통해 상기 외부 장치로 전송하고,
상기 외부 장치로부터 압축된 제2 특징 벡터가 수신되면, 상기 디컴프레서에 기초하여 상기 압축된 제2 특징 벡터를 압축 해제하고, 상기 압축 해제된 제2 특징 벡터를 상기 제1 디코더에 입력하는, 전자 장치.
According to claim 1,
the memory,
Further comprising a compressor and a decompressor,
the processor,
Compressing the first feature vector based on the compressor;
Transmitting the compressed first feature vector to the external device through the communication interface;
When the compressed second feature vector is received from the external device, decompressing the compressed second feature vector based on the decompressor and inputting the decompressed second feature vector to the first decoder. Device.
제1항에 있어서,
상기 제1 인코더 및 상기 제1 디코더는,
신경망 기계 번역(Neural machine translation, NMT) 모델에 포함되며,
상기 신경망 기계 번역 모델은,
상기 사용자 음성이 입력되면, 상기 사용자 음성에 대응되는 텍스트를 벡터 값으로 변환하여 상기 제1 특징 벡터를 획득하며,
상기 제2 특징 벡터가 입력되면, 상기 제2 특징 벡터를 상기 제1 언어의 텍스트로 변환하는, 전자 장치.
According to claim 1,
The first encoder and the first decoder,
Included in the neural machine translation (NMT) model,
The neural network machine translation model,
When the user voice is input, converting text corresponding to the user voice into a vector value to obtain the first feature vector;
When the second feature vector is input, the electronic device converts the second feature vector into text of the first language.
전자 장치의 제어 방법에 있어서,
상기 제1 언어의 사용자 음성이 수신되면, 상기 사용자 음성에 대응되는 상기 제1 언어의 텍스트를 획득하는 단계;
상기 제1 언어의 텍스트를 상기 제1 언어에 대응되는 제1 인코더에 입력하여 제1 특징 벡터를 획득하는 단계;
상기 제1 특징 벡터를 외부 장치로 전송하는 단계; 및
상기 외부 장치로부터 제2 특징 벡터가 수신되면, 상기 제2 특징 벡터를 상기 제1 언어에 대응되는 제1 디코더에 입력하여 상기 제2 특징 벡터에 대응되는 상기 제1 언어의 텍스트를 획득하는 단계;를 포함하는 제어 방법.
In the control method of an electronic device,
obtaining text in the first language corresponding to the user's voice when the user's voice of the first language is received;
obtaining a first feature vector by inputting text of the first language to a first encoder corresponding to the first language;
transmitting the first feature vector to an external device; and
obtaining text in the first language corresponding to the second feature vector by inputting the second feature vector to a first decoder corresponding to the first language when the second feature vector is received from the external device; A control method comprising a.
제10항에 있어서,
상기 제1 인코더는,
제1 언어의 제1 텍스트 및 벡터 공간 상의 특징 벡터를 입력 데이터 및 출력 데이터로 하여 학습된 모델이고,
상기 제1 언어와 상이한 제2 언어에 대응되는 제2 인코더는,
상기 제1 텍스트와 임계 값 이상의 유사도를 가지는 제2 언어의 제2 텍스트 및 상기 벡터 공간 상의 상기 특징 벡터를 입력 데이터 및 출력 데이터로 하여 학습된 모델인, 제어 방법.
According to claim 10,
The first encoder,
A model learned using a first text of a first language and a feature vector on a vector space as input data and output data;
A second encoder corresponding to a second language different from the first language,
The control method of claim 1 , wherein the control method is a model learned using a second text of a second language having a similarity with the first text and a threshold value or higher and the feature vector on the vector space as input data and output data.
제11항에 있어서,
상기 제2 언어에 대응되는 상기 제2 인코더는, 상기 외부 장치에 포함되며,
상기 제2 언어의 사용자 음성에 대응되는 텍스트가 입력되면, 상기 제2 특징 벡터를 출력하는, 제어 방법.
According to claim 11,
The second encoder corresponding to the second language is included in the external device,
and outputting the second feature vector when text corresponding to the user's voice of the second language is input.
제12항에 있어서,
상기 제1 디코더는,
벡터 공간 상의 특징 벡터 및 제1 언어의 제1 텍스트를 입력 데이터 및 출력 데이터로 하여 학습된 모델이고,
상기 제1 언어와 상이한 제2 언어에 대응되는 제2 디코더는,
상기 벡터 공간 상의 상기 특징 벡터 및 상기 제1 텍스트와 임계 값 이상의 유사도를 가지는 제2 언어의 제2 텍스트를 입력 데이터 및 출력 데이터로 하여 학습된 모델인, 제어 방법.
According to claim 12,
The first decoder,
A model learned using a feature vector on a vector space and a first text in a first language as input data and output data,
A second decoder corresponding to a second language different from the first language,
The control method of claim 1 , wherein the control method is a model learned by using the feature vector on the vector space and a second text of a second language having a similarity of at least a threshold value to the first text as input data and output data.
제13항에 있어서,
상기 제2 언어에 대응되는 상기 제2 디코더는, 상기 외부 장치에 포함되며,
상기 전자 장치로부터 수신된 상기 제1 특징 벡터가 입력되면, 상기 제2 언어의 텍스트를 출력하는, 제어 방법.
According to claim 13,
The second decoder corresponding to the second language is included in the external device,
The control method of outputting text in the second language when the first feature vector received from the electronic device is input.
제14항에 있어서,
상기 외부 장치와 통신을 수행하여 상기 외부 장치가 상기 제2 언어에 대응되는 제2 디코더를 포함하는지 여부를 식별하는 단계;
상기 외부 장치가 상기 제2 디코더를 포함하는 것으로 식별되면, 상기 제1 특징 벡터를 상기 외부 장치로 전송하는 단계; 및
상기 외부 장치가 상기 제2 디코더를 포함하지 않는 것으로 식별되면, 상기 제1 특징 벡터를 서버로 전송하는 단계;를 더 포함하는, 제어 방법.
According to claim 14,
identifying whether the external device includes a second decoder corresponding to the second language by communicating with the external device;
transmitting the first feature vector to the external device when the external device is identified as including the second decoder; and
and transmitting the first feature vector to a server when the external device is identified as not including the second decoder.
제10항에 있어서,
TTS(Text to speech)를 이용하여 상기 제1 언어의 텍스트에 대응되는 상기 제1 언어의 사운드를 획득하는 단계; 및
상기 제1 언어의 사운드를 출력하는 단계;를 포함하는, 제어 방법.
According to claim 10,
obtaining a sound of the first language corresponding to the text of the first language by using Text to Speech (TTS); and
Outputting the sound of the first language; including, the control method.
제10항에 있어서,
컴프레서에 기초하여 상기 제1 특징 벡터를 압축하는 단계;
상기 압축된 제1 특징 벡터를 상기 통신 인터페이스를 통해 상기 외부 장치로 전송하는 단계;
상기 외부 장치로부터 압축된 제2 특징 벡터가 수신되면, 디컴프레서에 기초하여 상기 압축된 제2 특징 벡터를 압축 해제하는 단계; 및
상기 압축 해제된 제2 특징 벡터를 상기 제1 디코더에 입력하는 단계;를 더 포함하는, 전자 장치.
According to claim 10,
compressing the first feature vector based on a compressor;
transmitting the compressed first feature vector to the external device through the communication interface;
decompressing the compressed second feature vector based on a decompressor when the compressed second feature vector is received from the external device; and
The electronic device further comprising: inputting the decompressed second feature vector to the first decoder.
제11항에 있어서,
상기 제1 인코더 및 상기 제1 디코더는,
신경망 기계 번역(Neural machine translation, NMT) 모델에 포함되며,
상기 신경망 기계 번역 모델은,
상기 사용자 음성이 입력되면, 상기 사용자 음성에 대응되는 텍스트를 벡터 값으로 변환하여 상기 제1 특징 벡터를 획득하며,
상기 제2 특징 벡터가 입력되면, 상기 제2 특징 벡터를 상기 제1 언어의 텍스트로 변환하는, 제어 방법.

According to claim 11,
The first encoder and the first decoder,
Included in the neural machine translation (NMT) model,
The neural network machine translation model,
When the user voice is input, converting text corresponding to the user voice into a vector value to obtain the first feature vector;
When the second feature vector is input, converting the second feature vector into text of the first language.

KR1020220046172A 2021-10-15 2022-04-14 Electronic device and control method thereof KR20230054242A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/KR2022/012876 WO2023063569A1 (en) 2021-10-15 2022-08-29 Electronic device and control method thereof
EP22881199.8A EP4332960A1 (en) 2021-10-15 2022-08-29 Electronic device and control method thereof
US18/105,011 US20230197059A1 (en) 2021-10-15 2023-02-02 Electronic device and control method thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20210137491 2021-10-15
KR1020210137491 2021-10-15

Publications (1)

Publication Number Publication Date
KR20230054242A true KR20230054242A (en) 2023-04-24

Family

ID=86141620

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220046172A KR20230054242A (en) 2021-10-15 2022-04-14 Electronic device and control method thereof

Country Status (1)

Country Link
KR (1) KR20230054242A (en)

Similar Documents

Publication Publication Date Title
US11657799B2 (en) Pre-training with alignments for recurrent neural network transducer based end-to-end speech recognition
CN105654952B (en) Electronic device, server and method for outputting voice
US20190188567A1 (en) Dynamic neural network surgery
US9520128B2 (en) Frame skipping with extrapolation and outputs on demand neural network for automatic speech recognition
TWI610295B (en) Computer-implemented method of decompressing and compressing transducer data for speech recognition and computer-implemented system of speech recognition
US20200135213A1 (en) Electronic device and control method thereof
US11631400B2 (en) Electronic apparatus and controlling method thereof
KR102356623B1 (en) Virtual assistant electronic device and control method thereof
TW201636996A (en) System and method of automatic speech recognition using on-the-fly word lattice generation with word histories
US11880754B2 (en) Electronic apparatus and control method thereof
CN110114765B (en) Electronic device performing translation by sharing context of utterance and operating method thereof
KR20210136706A (en) Electronic apparatus and method for controlling thereof
US11893813B2 (en) Electronic device and control method therefor
KR20220061467A (en) Electronic device and Method for processing the audio signal thereof
EP4332960A1 (en) Electronic device and control method thereof
US20230316952A1 (en) System and method for bidirectional automatic sign language translation and production
US20230140997A1 (en) Method and Apparatus for Selecting Sample Corpus Used to Optimize Translation Model
KR20230054242A (en) Electronic device and control method thereof
EP4206972A1 (en) Electronic apparatus and method for controlling thereof
US20230130287A1 (en) Light-weight machine learning models for lip sync animation on mobile devices or other devices
CN118119945A (en) Electronic apparatus and control method thereof
KR20230096825A (en) Electronic apparatus for providing disaster information and control method thereof
US20230274739A1 (en) Method and apparatus for providing voice assistant service
EP4325484A1 (en) Electronic device and control method thereof
KR20220069777A (en) Electronic apparatus, control method thereof and electronic system