공부 정리 블로그
[음성신호처리13]-vocoders;voice coding 본문
Vocoders
신경망 coding 전 신호처리 위주의 방식들을 살펴봄
neural coding 전까지 신호처리 기반의 coding 방식을 이해함
Vocoder systems
▫ Analysis-synthesis systems(이용) of speech
▫ Primary application
- Source coding to reduce the required rate of transmission
source coding(source 자체의 데이터를 줄임, 요구되는 coding rate을 줄임)
channel coding(channel의 특성을 살림, 여기서는 다루지 않음)
source -> channel -> Receiver -> 해독
source를 그대로 보내면 데이터량이 많기 때문에 channel 정보 전달량이 많아짐(에너지 많이 소모) source data 량 최소로 줄이기 위해
Purpose of source coding
▫ Devise methods of lowering the required coding rates while maintaining the quality and robustness of the transmitted or stored speech.
음질이 저하되는 문제가 있음 => 품질은 유지하면서 데이터는 줄이는 방법을 고려해보자
▫ Standardized bandwidths and coding rates
telephone : 200~3.3k 는 날려버리고 (4kHz 까지만) 신호 전달 , 저주파/고주파를 날림(band width가 넓어야 음질 좋음)
AM radio : ~7kHz
compact disk : 44.1kHz 음질이 가장 좋음, 주파수 신호를 손실없이 복원해낼 수 있음
가청 주파수 22.05 kHz
Channel Vocoder Filter Banks
입력을 여러개의 주파수 band 로 쪼갠 band filter -> magnitude 추정 -> envelop(vocal tract) : 발음을 만들어내는 과정,전달돼야하는 메시지 정보를 가지고 있음, low path filter로 저주파 신호가 복원되므로 -> 필요하면 decimate 로 sampling rate 낮춤 -> encoding -> 이 신호를 channel을 통해서 전달 -> 신호를 받아서 복원
low-pass filter -vocal track(envelop)
decimate - sampling rate 더 낮춤
받고- (receiver) - 복원
곱한다는 의미 (주파수 대역에서 정보가 곱해짐)
주파수 domain 에서 곱하는 것이니 time domain에서는 convolution
receiver는 pitch 주기에 맞게 purse generate, unvoiced(random generate) 를 switch로 무엇을 출력할지
가장 쉽게 생각해볼 수 있는 vocal의 coding 형태
Design parameters must be a compromise.
• Bandwidth design
▫ Filters can have an increased width with center freq.
▫ Equal bandwidth: Simple filter design
bandpass filter들을 똑같은 impulse 신호를 가지고 주파수 대역으로 sfit할 수 있으므로 design 방법이 simple 해짐
Energy Measurements in a Channel Vocoder
Energy measurement with a half-wave rectifier
Hilbert transform techniques
입력 신호에 대해서 두 개의 term을 쪼개고 square sum해서 출력을 real/image 인지 phase sift를 막을 수 있음
phase 없애고 envelop위주로 뽑을 수 있게 도와줌
Bit Saving in Channel Vocoders (1)
source coding은 음질을 저하시키지 않으면서 필요로 하는 bit수 할당을 최소로 함
이걸 하기 위한 방법으로는
Efficient quantization
▫ Logarithmic scale on sound intensities
왜? amplitude 가 작은 영역에서는 차이를 민감하게 느끼지만, amplitude가 매우 커지면 차이는 민감하지 않게됨
그러므로, 특정 waveform에 대해서 정교하게 만드려면, amplitude가 작은 영역에 bit수를 많이 할당, 크면 작게 할당 -> 사람이 들었을 때, 그 오차에 대해서 크게 인지하지 못하고 원래의 신호에서 손실이 거의 없음
▫ μ-law quantizer
wave form(amplitude)이 낮은 부분 많이(세밀) 할당, 높은 부분은 적게 할당
하면 사람이 들을 때 자연스럽게 들을 수 있다.
이 출력 신호를 uniform sampling 하면
위는 bit수 적게 할당, 아래는 bit 수 많이 할당하는 결과가 된다
efficient quantization 기본 ideat
Max’s method
Quantizing steps correspond to equal probabilities of signal magnitudes occurring within that quantization interval.
quantization interval 정할 때, 신호 크기를 같게 만듦
음성은 보통 amplitue가 적은 영역에 대부분 집중 돼있음(자주 나타나는 신호에 대해서는 세밀하게 quantization=> error를 적게 만들어보자)
큰 신호는 드물다(error가 어느정도 발생해도 치명적이지 않음)
각 구간별 너비가 차이가 난다. 양 끝으로 갈 수록 넓어짐
amplitude 작은 부분은 bit 많이 할당
Efficient quantization과 결과는 비슷하지만
기준은 다름
Efficient quantization : amplitude에 따른 사람 귀의 민감도
Max’s method : 빈도수를 가지고(probability를 동일하게 맞춰줌)
Bit Saving in Channel Vocoders (2)(어렵)
chnnel vocoding 할 때, magnitude signal을 보면
음성은 저주파의 신호가 집중되고, 고주파는 별로 없는 주파수 분포를 가지고 있음
저주파 신호에 집중 돼 있음-> magnitude가 저주파에서 corr이 세다
Linear transformations of spectral data
▫ The magnitude signals from a channel vocoder are correlated(저주파에 대해서 세다) over both time and frequency.
-> 이웃한 sample간 amplitude들이 비슷하다.
비슷하면, 첫 번째도 5, 두 번째도 5면 각각 5,5로 샘플링하는 게 맞냐?
두 개의 차이는 0이다 5,0 을 주는 것이 맞나?
혹은 10-0으로 차이가 확연하게 크니 차이를 세밀하게 보는 것도 방법
이웃한 샘플들 간의 차이를 활용할 수 있게 해주는 방법이 소모되는 데이터량을 줄이는 데 도음을 줄 수 있음(bit 수 적게 활용)
For each frame, a specific linear transformation is invoked that tends to order the results proportional to their significance. Linear transformation
Walsh-Hadamard transform
If ,
이런 개념들을 사용해서 PCA를 사용해 볼 수 있음
▪ Principle component analysis (PCA) – the optimal trans.(가장 큰 eigenvalues를 갖고 있는 component 선택)
입력 신호 1차원 벡터를 corr matrix를 만들어 봄,
고유값 분해 -> eigen vector, eigen value 나옴
신호 크기, 방향을 나타내는 요소들이 나옴
PCA의 문제점
▫ Select the components with the largest eigenvalues
이론적으로는 매우 많은 데이터를 가져야 하는데...
그래야만 실제와 비슷한 결과를 낼 수 있음
특정 장소에 있는 것을 찾을 때, 데이터가 많아야 찾는 것이 가능함
그렇기 때문에 PCA 대신 고정된 transform을 많이 씀
▪ Discrete cosine transform (DCT)
고정된 방법론 중, DFT를 많이 쓰지만, complex number이므로,
여기에 대해서는 출력 신호가 real , imagine 있으니 복잡 => cos() + jsin()이므로 real (cos)만 씀
▫ Similar to PCA for many speech applications
PCA와 유사하지만 Rx를 쓰는 것이 아닌 고정된 transform (음성에서 많이 씀)
(와.. 여기도 어려움)
실제로,
MFCC(CC : cepstrum, coefficient)를 뽑을 때,
log spectrum 만든다음, IFTF 하는 것이 정석이지만, complex num 나오므로,
F^(-1){log|x(w)|}
F^(-1) : complex 나와서 DCT 활용
imaginary 날려서 간단히 할 수 있음
simple한 cos transform을 도출 할 수 있음 = > data efficient
Excitation for a Channel Vocoder
• Dudley channel vocoder(vocal code 정보를 만들어 냄)
▫ A pulse generator(voiced sound), a noise generator(pricative), and a buzz(voiced sound 에서 -z)-hiss switch( pulse generator(voiced sound), a noise generator 둘 중 무엇을 할 건지 선택)
실제로는 두 개가 동시에 active 되는 경우도 있을 수 있음
▫ Produced speech that was quite intelligible(intelligible 음질 x, 메세지의 정확성)
음성과 같은 자연스러움은 충분하지 않을 수 있음
▫ Fallacies(문제)
Voiced fricative sounds(두 개의 성질을 동시에 나타날 수 있는 sound 가 있는 경우 )
Plosive followed by a transition sound such as “r” or “l” (transition sound)
이런 단순한 선택으로 신호를 모델링하기는 쉽지 않음
LPC Vocoders
입력 source에 대해 convolution 해주면, 여기에 대해서 결과 신호가 speech 처럼 나오게 됨
실제로는 z transform에서 아래 수식을 넣는 것으로 됨
위의 수식은 과거 n개의 sample을 가지고 결과를 추정하게 됨을 보여줌
syntesis - ptich 주파수 찾기
pitch and voiced - 둘 중 하나를 골라
Synthesizer for LPC
All pole filter 디자인 방법들
계속적으로 N개의 weighted sample이 다음을 추정하게 됨
Standard direct-form digital filter
feed back 된 신호들이 다시 들어오면서 출력으로 나가면서 음성이 generate
Lattice synthesizer
인수분해된 각각은 first order filter 고 각각을 n 번 cascade로 연결
Cepstral Vocoders
Cepstralvocoderanalysis and synthesis
입력-> DFT -> log -> IDFT - > cepstrum 얻어지고 low 큐프런시, 하이 큐프런시 (pitch 정보)
합성은 역순을 진행(음성 생성)
low= vocal track
high-pitch
• Excitation generator
▫ Produces pulses at the measured fundamental period or, for voiceless sounds, closely spaced pulses of random polarity.
신호의 특성에 따라 다르게 generate
Vocoder Standardization
Vocoder transmitters and receivers must be compatible.
전송, 받는 측 모두 compactable 해야 함 (받은 걸 다시 복원해야함)
데이터를 줄이는 과정, 전송, 받아야 함
transmitter - receiver는 짝꿍
• The International Telecommunications Union
▫ Sets global telecommunications standards.(표준화 만드는 기관)
• Almost all standards in the bit rate range of 2.4 kbps through 8 kbps
퀄 좋게하려면 16KHz는 해야하는데.. (초당 16K) bit 수를 따질 때는 각 샘플당 16bit => 따지고 보면 매우 큼 16^2
많이 줄였지만 크게 거슬리지 않는 정도를 만들어 낼 수 있음
▫ Variations on the CELP algorithms(효율 , 음질 괜찮아서 사용)
Extensions of the basic LPC approach(이건 기본) with a more elaborate excitation model(이걸 얼마나 정교하게 할거냐에 따라 다양한 방법론 파생됨)
• Two standards operating at different bit rates(표준안이 서로 다르면, 인터페이스가 적절히 디자인 되지 않으면 compatible 하지 않음)
▫ Not compatible without a carefully designed interface
다음 시간은 몇가지 코딩
살펴볼 예쩡 ㅠ
'대학원 수업 > 음성신호' 카테고리의 다른 글
[신호처리-15]-TTS (음성 합성) (0) | 2023.05.31 |
---|---|
[음성신호처리14] - CELP coding 여러 기법들 (0) | 2023.05.31 |
[음성신호처리12]-pitch (0) | 2023.05.17 |
[음성신호처리11] - Linear Prediction (0) | 2023.05.10 |
[음성신호9.5] - STFT, Filter bank (0) | 2023.05.10 |