728x90
반응형

음성인식은 기술 특성상 언어모델(Language Model)을 사용할 수 밖에 없었습니다.

사람 목소리에 대한 음향학적 모델(Acoustic Model)을 처리하여, 글자(Words)를 탐색하는 과정에서 언어모델을 사용하였죠. 그 언어모델을 단일 서버에서 처리하기 힘들 경우에는 분산시스템(Distributed)이라 하여,  인식 대상 네크워크인 언어모델을 쪼개어서(distributed) 인식을 수행하고, 다시 최종 결과를 판단(merge)하는 방식을 사용하였죠.

 

음성인식 기술은 딥러닝 기술을 도입한 초기에는 음향모델(Acoutic Model)에 먼저 도입하였습니다. 기존의 통계적 모델링 주로 가우시안 분포로 모델링하였는데, 딥러닝을 도입하면서 신경망을 적용하였습니다. 이를 통해 소위  가우시안 분포의 Outlier를 반영하지 않던 것을,  신경망에서는 모두 작은 가중치라도 반영(/참여)을 하게 되었죠. 이를 통해 성능이 개선되었습니다. 이러한 방식을 하이드리드(Hybrid)방식이라 하였는데,  이때도 언어모델은 여전히 통계기반 모델을 사용하였죠. 최종적인  음성인식의 탐색 대상 네트워크는 wFST(weighted Finite State Tranducer)로 표현되었습니다. 인텔에서 개발된 wFST는 음향모델과 언어모델을 평면적(flatten)으로, 함께 표현하여  탐색 알고리즘을 간단하게(?) 하였습니다.

 

주요 응용분야를 살펴보면 아래와 같습니다. 최근 십여년 이내에 상당한 상용화 사례를 이루고 있습니다.

응용 설명
Voice Assistants LLM 개념이 있어야 합니다. 
Siri, Alexa,Google Assistant 등의 서비스가 있습니다.
Transcription Services Audio 나 Vedio 콘텐츠의 내용을 전사(/표현)해 주십니다.
Jounalists, Content Creators, Researchers 등에 유용합니다.
Call Centers 고객 서비스 상호작용에 대해 효율성을 제공해 줍니다.
예를 들면, 상품 안내의 적합성, 고객 민원 처리, VOC를 처리합니다.
Accessibility 청각에 어려움이 있는 분들에게 도움을 줄 수 있습니다.
Language Translation 실시간 음성기반 자동번역 서비스를 제공합니다.
해외 여행, 다문화간 소통 등에서 많이 사용되고 있습니다.

 

그럼, 이러한 상황과 더불어 최근에 Hot한  진정한 LLM(주로 문장/답변 생성)이 음성인식기술과 결합된 서비스는 있는 것인가?의 질문을 던져봅니다.

 

'조건부로 결합된 서비스'는 외국 사례에서 조사/파악이 됩니다.

'조건부'로 표현한 것은  인식결과를 주고서, 그 이후에 어떤 요청(request)을 하는 방식입니다.

반례로,  일반적인 생성형모델은 질문을 먼저합니다. 즉 조건을 주지 않죠.

 

조건부로 결합된 서비스는 아래와 같습니다. LLM에 요청하는 형태 기반으로 파악이 가능합니다.

1. 결과 요약( Custom Summarization) 

  params = {
  "context": "The caller is interested in buying a car.",
"answer_format": "Short sentence"
}

   음성 내용은  자동차를 구매하고자 하는 고객이니,    그 내용을 짧게 표현해줘...   라고 요청(request parameter)하고 있습니다.

2. 질의 응답( Question & Answer )

questions = [
aai.LemurQuestion(
question="Is this caller a qualified buyer?",
answer_options=[
"Yes",
"No"
]),
aai.LemurQuestion(
question="What is the caller's mood?",
answer_format="Short sentence")
]

 음성 인식결과를 조건부로 하여,  질의 응답을 할 수도 있습니다.  응답은 Yes or No로 요청할 수도 있고, 짧은 문장으로도 요청할 수 있습니다.

 

3. Action Items

params = {
"context": "this is a support call"
}

 음성인식결과(Transciption)으로부터 액션 아이템을 추출할 수도 있습니다.

 

 

 

조건을 제시하고, 출력 형태를 지시하는 프람프팅(Prompting)에 관련된 사항을 위의 예시 중, Action Item 추출을 간단한 예시로, 기존 GPT-4를 사용해 보면 아래와 같습니다.

 

요청문(Prompt)

f"""

     You are a syntax parser for a home automation system. Given a user's sentence like:

 

     if <condition> then <action>

 

     perform the following:

 

              1. Extract <condition> and <action>. If no condition, set it to None.

              2. Rewrite the extracted <condition> and <action> so that any of the user's personal and possessive pronouns are replaced with "the user"

 

                Process this sentence using the above steps:

 

               {lock the doors when nobody is home}

 

               Return the result in this format:

 

               {{

 

                   "condition": <the rewritten condition from step 2>

                   "action": <the rewritten action from step 2>

 

                }}

"""

 

로 입력하니, 출력은

 

Certainly, I can help you with this task. Let's break down the given sentence and follow the specified steps:

Input Sentence: "lock the doors when nobody is home"

Step 1: Extract <condition> and <action>.

  • <condition>: "nobody is home"
  • <action>: "lock the doors"

Step 2: Rewrite the extracted <condition> and <action> with personal and possessive pronouns replaced by "the user".

  • Rewritten <condition>: "the user is home"
  • Rewritten <action>: "lock the doors"

Now, let's format the result according to your specified format:

jsonCopy code
{ "condition": "the user is home",
  "action": "lock the doors" }

This is the final result based on the given steps and input sentence.

 

 

입니다.

 

출력의 "condition"이 조금 오답이지만,   조건(" lock the doors when nobody is home")주면서, Action Item("lock the doors")를 추출할 수 있었습니다.

즉, 조건(전사데이터)을 주면서, 액션을 추출할 수 있을 것입니다.

 

728x90
반응형

+ Recent posts