
멘토님이 강조하신 본질을 이해하라는 말씀을 듣고 계속해서 되뇌었음. 뭘 공부해야할까? 지금 내가 놓치는건 뭘까?
음성을 텍스트로 처리하는 STT 기술에 Whisper 모델이 사용되는데 이 STT기술은 실시간성을 고려하고 만들어진 기술이 아님.
그럼 데이터 관점에서 어떻게 실시간적인 STT 작업을 할 수 있음?

Speech to text는 오디오 데이터를 30초 분량을 하나의 chunk 단위로 입력받으면 인코더와 디코더를 지나 하나의 토큰을 생성하고, 이 과정을 무수히 많이 반복하는 로직을 갖는다.
ufal/whisper_streaming Github repository
'Turning Whisper into Real-Time Transcription System' 논문 링크
논문의 Abstract
Whisper is one of the recent state-of-the-art multilingual speech recognition and translation models, however, it is not designed for real time transcription. In this paper, we build on top of Whisper and create Whisper-Streaming, an implementation of real-time speech transcription and translation of Whisper-like models. Whisper-Streaming uses local agreement policy with self-adaptive latency to enable streaming transcription. We show that WhisperStreaming achieves high quality and 3.3 seconds latency on unsegmented long-form speech transcription test set, and we demonstrate its robustness and practical usability as a component in live transcription service at a multilingual conference.

=> Whisper는 문장단위로 훈련되었기때문에 당연히 시작과 끝이 완전한 문장이 입력되면 가장 최적의 결과를 제공함.
Local Agreement 알고리즘은 토큰이 확정되기 위해 두 개의 연속적인 오디오 버퍼에서 동일하게 생성되어야함.
LocalAgreement (Liu et al., 2020) is a streaming policy that outputs the longest common prefix
of the model on n consecutive source chunks, or an
empty segment when less than n chunks are available. Based on the IWSLT 2022 shared task on simultaneous translation, the CUNI-KIT system compared LocalAgreement to other policies (hold-n
and wait-k) with different chunk sizes. They found
that LocalAgreement with n = 2 was the most effective policy. Therefore, we use LocalAgreement2 for identifying stabilized target segments.


Joining for inter-sentence context
The Whisper transcribe function utilizes a “prompt” parameter to maintain consistency within a document (consistent style, terminology, and inter-sentence references). We extract the last 200 words from the
confirmed output of previous audio buffers as the
“prompt” parameter, as shown in Figure 1 (yellow
backgrounded text).
논문의 참고 이미지에 나와있듯이 생성된 토큰은 prompt으로 사용되기때문에, STT의 통일성이 유지될 수 있음.
쫌 치네요 진우님