音声の分析...– 音声信号処理 (speech signal processing) – 音巨信号処理 (acoustic...
TRANSCRIPT
音声の分析 Speech analysis
東京大学 大学院情報理工学系研究科 助教
高道 慎之介 (Shinnosuke Takamichi)
奈良先端大 音情報処理論第2回 (2018/11/06)
/58
自己紹介 Self-introduction
名前・所属 (name & affiliation)
– 高道 慎之介 (Shinnosuke Takamichi)
– 東京大学 大学院情報理工学系研究科 助教
NAISTとの関わり
– 2011/04: 知能コミュニケーション研究室 (中村 哲教授) 1期生
– 2016/03: 博士課程修了
研究分野 (research area)
– 音声信号処理 (speech signal processing)
– 音巨信号処理 (acoustic signal processing)
– 音声合成・変換 (speech synthesis, voice conversion)
– など
2
/58
本講義の目的 Purpose of this talk
デジタル信号処理の基礎 (Digital signal processing)
– 特徴抽出の前準備
音声とは (speech production and its parameters)
– 音声の生成過程,包絡成分,微細構造
音声の特徴抽出 (speech analysis)
– ケプストラム分析,LPC分析
3
音声の特徴とは何か,それをどう定量化するか What are the parameters for quantifying characteristics of speech?
/58
レポートについて Report
4
Python programming on Google Colab
Submit your codes and results to the submission page. (I will announce the details after this talk.)
デジタル信号処理の基礎 DIGITAL SIGNAL PROCESSING
5
/58
アナログ/デジタル変換による音声収録 Sound recording through analog/digital conversion
我々はどうやって音声コミュニケーションを行う?
– 口から発せられた原音声信号が,空気中を伝播して耳に到達
この一方をデジタル計算機に置き換えたら?
– 音声信号をデジタル信号に変えて処理 → アナログ/デジタル変換
6
音声 認識
音声 対話
Analog/digital conversion
/58
アナログ/デジタル変換(A/D変換) Analog/digital conversion (A/D conversion)
原音声信号 (アナログ) を,計算機で扱えるデジタル信号へ
7
Microphone A/D 変換
標本化: 時間の離散化 量子化:振幅の離散化
PC
時間
振幅
標本化 (Sampling) 量子
化 (
Qu
an
tiza
tio
n)
時間
振幅
★ ★
time
Amplitude
/58
標本化定理 Sampling theorem
8
原信号の最大周波数 (F[Hz]) の2倍以上のサンプリング周波数を用いれば
原信号を完全復元できる! The original signal (contains only freqs. below F [Hz]) is perfectly reconstructed
when sampling freq. higher than 2F [Hz] is used.
𝑥(𝑡)
𝑡
𝑥(𝑡)
𝑡 Sample at
2F [Hz]
1/2F [sec] Calculate sinc func.
𝑡
sinc(𝑡)
Add all values
𝑡
* sinc関数: sinc 𝑡 = sin 2𝜋𝐹𝑡 /2𝜋𝐹𝑡: デジタル→アナログ復元のための関数
/58
音声処理で用いられる標本化 Sampling used for speech processing
必要な情報に応じて標本化周波数を変化
– 標本化周波数 高 → 多くの情報を保存できるが,データサイズ 大
– 必要な帯域の2倍以上の標本化周波数を使用
例えば…
9
周波数 (frequency) [kHz] 0 2 4 6 8 10 12 14 16 18 20 22
音声のパワー 大 (dominant freq. band of speech)
人間の可聴帯域 (full band)
音韻性 (phonetics)
電話音声 (voice call)
音声合成 (speech synthesis)
音楽 (music)
/58
離散フーリエ変換・z変換 Discrete Fourier transform & z-transform
A/D変換した後の音声特徴量抽出
– 離散フーリエ変換: ケプストラム分析 (cepstrum analysis)
– z変換: LPC分析 (LPC analysis)
離散フーリエ変換 (Discrete Fourier Transform: DFT)
– デジタル信号を「時間とともに振動する波」の和で表現
– フーリエ変換の離散版 (discrete ver. of the Fourier transform)
z変換 (z-transform)
– デジタル信号を「時間とともに増加・減衰しながら振動する波」の和で表現
– ラプラス変換の離散版 (discrete ver. of the Laplace transform)
10
/58
離散フーリエ変換・z変換 Discrete Fourier transform & z-transform
A/D変換した後の音声特徴量抽出
– 離散フーリエ変換: ケプストラム分析 (cepstrum analysis)
– z変換: LPC分析 (LPC analysis)
離散フーリエ変換 (Discrete Fourier Transform: DFT)
– デジタル信号を「時間とともに振動する波」の和で表現
– フーリエ変換の離散版 (discrete ver. of the Fourier transform)
z変換 (z-transform)
– デジタル信号を「時間とともに増加・減衰しながら振動する波」の和で表現
– ラプラス変換の離散版 (discrete ver. of the Laplace transform)
11
/58
フーリエ変換 Fourier transform
12
波1 波2
𝑥 𝑡
連続時間の波を,振動する波 exp 𝑗𝜔𝑡 の要素で表現する方法 A method for decomposing a continuous-time signal to a sum of exp 𝑗𝜔𝑡 (vibration wave)
音波
波の大きさ
𝑆1 exp 𝑗𝜔1𝑡 − 𝜃1 𝑆2 exp 𝑗𝜔2𝑡 − 𝜃2
12
周波数 frequency
振幅 amplitude
位相 phase
波の大きさ Maximum extent
of a wave
振動の速さ #times it vibrates
within a period
時間遅れ Time delay
=
=
=
/58
離散フーリエ変換 Discrete Fourier transform
13
𝑥 𝑛 𝑆1 exp 𝑗𝑘1𝑛 − 𝜃1 𝑆2 exp 𝑗𝑘2𝑛 − 𝜃2
離散時間の波を,振動する波 exp 𝑗𝑘𝑛 の要素で表現する方法 A method for decomposing a discrete-time signal to a sum of exp 𝑗𝑘𝑛 (vibration wave)
周波数 frequency
振幅 amplitude
位相 phase
波の大きさ Maximum extent
of a wave
振動の速さ #times it vibrates
within a period
時間遅れ Time delay
=
=
=
波1 波2 音波
/58
離散フーリエ変換の定義 Definition of the discrete Fourier transform
変数定義 (variable definition)
– 時間信号 (time signal) 𝒙 = 𝑥 0 ,⋯ , 𝑥 𝑛 ,⋯ , 𝑥 𝑁 − 1 (𝑥 𝑛 ∈ ℛ)
– 周波数特性 (freq. characteristics) 𝑿 = 𝑋 0 ,⋯ , 𝑋 𝑘 ,⋯ , 𝑋 𝑁 − 1 (𝑋 𝑘 ∈ 𝒞)
• 𝑛, 𝑘: time and freq. indexes, respectively
時間領域から周波数領域へ (time -> freq. conversion)
周波数領域から時間領域へ (freq. -> time conversion)
14
𝑋 𝑘 = 𝑥 𝑛 𝑒−𝑗2𝜋𝑘𝑛𝑁
𝑁−1
𝑛=0
𝑥 𝑛 =1
𝑁 𝑋 𝑘 𝑒
𝑗2𝜋𝑘𝑛𝑁
𝑁−1
𝑘=0
𝑋 𝑘 = 𝑋 𝑘 exp 𝑗∠𝑋 𝑘
Phase Amplitude
/58
離散フーリエ変換の例 Example of DFT
15
Frequency k Log-s
cale
d p
ow
er log10𝑋𝑘2
/58
離散フーリエ変換・z変換 Discrete Fourier transform & z-transform
A/D変換した後の音声特徴量抽出
– 離散フーリエ変換: ケプストラム分析 (cepstrum analysis)
– z変換: LPC分析 (LPC analysis)
離散フーリエ変換 (Discrete Fourier Transform: DFT)
– デジタル信号を「時間とともに振動する波」の和で表現
– フーリエ変換の離散版 (discrete ver. of the Fourier transform)
z変換 (z-transform)
– デジタル信号を「時間とともに増加・減衰しながら振動する波」の和で表現
– ラプラス変換の離散版 (discrete ver. of the Laplace transform)
16
/58
ラプラス変換 Laplace transform
17
𝑥 𝑡 𝐴2 exp 𝜎2 + 𝑗𝜔2 𝑡 − 𝜃2
&
𝐴1 exp 𝜎1 + 𝑗𝜔1 𝑡 − 𝜃1
連続時間の波を,増加・減衰しながら振動する波exp 𝜎 + 𝑗𝜔 𝑡 の 要素で表現する方法
A method for representing a continuous-time signal by a sum of exp 𝜎 + 𝑗𝜔 𝑡 (exponentially increasing/decreasing vibration wave)
波1 波2 音波
周波数の虚部 Imaginary part of freq.
周波数の実部 Real part of freq.
位相 phase
波の大きさ Maximum extent of a wave
振動の速さ #times it vibrates
within a period
時間遅れ Time delay
=
=
=
/58
各変換法の関係性 Relation of transformation methods
18
振動する波 Vibration waveform
振動・増加/減衰する波 Increasing/decreasing vibration waveform
連続
時間
C
on
tin
uou
s-t
ime
離散
時間
D
iscre
te-t
ime
フーリエ変換 Fourier transform
ラプラス変換 Laplace transform
離散フーリエ変換 Discrete Fourier transform
z変換 z-transform
/58
z変換 z-transform
19
𝑥 𝑛
&
𝐴2 exp 𝜎2 + 𝑗𝑘2 𝑛 − 𝜃2 𝐴1 exp 𝜎1 + 𝑗𝑘1 𝑛 − 𝜃1
離散時間の波を,増加・減衰しながら振動する波exp 𝜎 + 𝑗𝑘 𝑛 の 要素で表現する方法
A method for representing a discrete-time signal by a sum of exp 𝜎 + 𝑗𝑘 𝑛 (exponentially increasing/decreasing vibration wave)
周波数の虚部 Imaginary part of freq.
周波数の実部 Real part of freq.
位相 phase
波の大きさ Maximum extent of a wave
振動の速さ #times it vibrates
within a period
時間遅れ Time delay
=
=
=
波1 波2 音波
/58
z変換の定義 Definition of z-transform
20
変数定義
– 時間信号 (time signal) 𝒙 = 𝑥 0 ,⋯ , 𝑥 𝑛 ,⋯ , 𝑥 𝑁 − 1 (𝑥 𝑛 ∈ ℛ)
– 周波数特性 (freq. characteristics) 𝑋 𝑧 (𝑋 𝑧 ∈ 𝒞)
• 𝑛: time index, 𝑧: freq. (complex value)
時間領域から周波数領域へ (time -> complex freq. conversion)
周波数領域から時間領域へ (complex freq. -> time conversion)
𝑋 𝑧 = 𝑥 𝑛 𝑧−𝑛∞
𝑛=−∞
𝑥 𝑛 =1
2𝜋𝑗 𝑋 𝑧 𝑧𝑛−1𝑑𝑧 𝑐
𝑋 𝑧 = 𝑋 𝑧 exp 𝑗∠𝑋 𝑧
Phase Amplitude
/58
伝達関数 Transfer function
z変換を使うと,経路の伝達関数が分かる!
経路の応答 ℎ 𝑛 のz変換 𝐻 𝑧 が,経路の伝達関数を表す!
– 𝑦 𝑛 = ℎ 𝑛 ∗ 𝑥 𝑛 (∗: convolution)
– 𝑌 𝑧 = 𝐻 𝑧 𝑋 𝑧
– 𝐻 𝑧 =𝑌 𝑧
𝑋 𝑧
21
振幅・周波数・位相はどう変化する? How do amp., freq., & phase change?
𝑥 𝑛 𝑦 𝑛
ℎ 𝑛 : transfer function
z変換で畳み込み演算は掛け算へ
Sound source
Microphone
z-transform converts convolution to multiplication operation.
/58
z変換を用いたシステム伝達特性 Calculating system’s transfer characteristics using z-transform
以下のような部屋(音響管)で音を鳴らす
次の音が得られた.音源からマイクロホンへの伝達特性は?
22
直接到達する音波
壁を反射して収音される音波
1 1/2 1/4 1/8 1/16 ・・・
0 1 2 3 4
𝑦 𝑛
𝑛
𝑥 𝑛 𝑦 𝑛
1 𝑥 𝑛
𝑛
時刻0で振幅1の信号.この時の 𝑦 𝑛 をインパルス応答と呼ぶ. A signal that is 1 at time 0. Its 𝑦 𝑛 is called an impulse response.
direct wave
Wave arriving by reflecting the wall
/58
音源からマイクロホンへの伝達特性 Transfer characteristics from sound source to microphone
𝑥 𝑛 と y 𝑛 を数式で表すと
– 𝑥 𝑛 = 𝛿 𝑛
– 𝑦 𝑛 = 𝛿 𝑛 +1
2𝛿 𝑛 − 1 +
1
4𝛿 𝑛 − 2 ⋯
z変換すると
– 𝑋 𝑧 = 1, 𝑌 𝑧 = 1 +1
2𝑧−1 +
1
4𝑧−2⋯ =
1
1−1
2𝑧−1
– 𝐻 𝑧 =𝑌 𝑧
𝑋 𝑧=
1
1−1
2𝑧−1
複数の共振特性を持った伝達特性も記述できる
23
𝛿 𝑛 = 1 𝑛 = 00 (𝑛 ≠ 0)
単一の共振周波数をもつ伝達特性 Transfer function that has one resonant frequency
𝑋 𝑧 𝑌 𝑧
𝐻 𝑧 =1
1 − 𝑎1𝑧−1⋅1
1 − 𝑎2𝑧−1⋯
1
1 − 𝑎𝑁𝑧−1
A transfer function that has multiple resonant freqs. is described in the same manner.
/58
システムの安定性 Stability of transfer systems
24
時間信号の挙動と伝達特性の関係を考える
時間信号をARモデルで表現する場合,安定性の補償が必要
– 安定性を保障できない → (例えば) ハウリングを起こす
– 安定性を保障した分析法 → LPC分析 (後述)
𝐻 𝑧 =1
1 −12 𝑧−1
× 1 2 × 1 2
𝑟 < 1だと時間とともに0に収束→安定 𝑟 > 1だと時間とともに無限大に発散→不安定
自己回帰 (AR) モデル Autoregressive (AR) model
𝑟
When 𝑟 < 1, 𝑦 𝑡 → ∞ = 0 … stable system When 𝑟 > 1, 𝑦 𝑡 → ∞ → ∞ … unstable system
Speech analysis that guarantees stability → LPC analysis
Unstable system → e.g., acoustic howling
When assuming the AR model, we need to pay attention to stability.
音声とは SPEECH PRODUCTION AND ITS PARAMETERS
25
/58
Voice
畳み込むと…
Time
音声の生成過程 Speech production
26
声帯を開閉させて, 空気を振動させる! Excite air-flowing from the lungs.
音高の生成
音色の付与 口や舌を動かして, 音色をつける! Filter the signal with time- varying vocal tract shapes.
Convolution
/58
音声のスペクトル構造 Structures of the spectrum of voice
27
Frequency
Frequency
Pow
er
基本周波数 (F0) Fundamental frequency
Frequency
Pow
er
音声の周波数特性 Freq. characteristics of voice
微細構造
包絡 パ
ワー
Envelope
Detailed structure
/58
音源生成と,音響管としての声道 Source excitation and vocal tract as acoustic tubes
28
音源信号はインパルス列 or 白色雑音,声道は音響管連接
声帯側 口唇側
声道
有声音
(パルス間隔がF0の逆数)
* http://ml.cs.yamanashi.ac.jp/media/20151114/1114slide.pptx から一部引用
無声音
音響管の形を変えて,声色を制御 音源信号で,音高を制御
Periodic voiced excitation
Aperiodic unvoiced excitation
Vocal tract
Vocal chord Lip
Control pitch by the excitation signals. Control tone by the shapes of the vocal tract.
/58
スペクトル構造の例 Example of spectrum
29 Frequency
Log p
ow
er
/a/ (lower F0) /i/ (lower F0)
/a/ (higher F0)
包絡は変わらない 微細構造は変わる
包絡は変わる 微細構造は変わらない
The envelope is unchanged. The detailed structure is changed.
The envelope is changed. The detailed structure is unchanged.
/58
スペクトログラム Spectrogram
短時間の波形に対するDFT
– 利点: 比較的定常な部分の静的特徴を見られる
– 欠点: 音声が定常とみなせるのは数十msec程度なので 音声波形全体がどう変化しているかを見られない
スペクトログラム (spectrogram)
– 離散フーリエ変換による分析を時間軸方向に連続して実行し,
– 時間ー周波数領域における2次元表示
30
Time
/58
スペクトログラムの例 (濃いほどパワー 大 ) Example of a spectrogram (darker point indicates bigger power)
31 Time
Fre
qu
en
cy
声道の共振 (フォルマント) Vocal track resonance (formant)
基本周波数の影響 Effects by F0
音声の特徴抽出 SPEECH ANALYSIS
32
/58
2つの音声分析法:ケプストラムとLPC Two types of speech analysis: cepstrum & LPC
ケプストラム分析 (Cepstrum analysis)
– ノンパラメトリックな分析法 (non-parametric analysis)
– 周波数特性をフーリエ基底で波と捉える
– 時間波形の対数パワースペクトルのフーリエ変換
LPC 分析 (Linear predicting coding analysis)
– パラメトリックな分析法 (parametric analysis)
– 声道を音響管連接と考え,自己回帰モデルのパラメータを推定
33
Fourier transform of log-scaled power of a signal
Estimation of parameters of an autoregressive model
/58
2つの音声分析法:ケプストラムとLPC Two types of speech analysis: cepstrum & LPC
ケプストラム分析 (Cepstrum analysis)
– ノンパラメトリックな分析法 (non-parametric analysis)
– 周波数特性をフーリエ基底で波と捉える
– 時間波形の対数パワースペクトルのフーリエ変換
LPC 分析 (Linear predicting coding analysis)
– パラメトリックな分析法 (parametric analysis)
– 声道を音響管連接と考え,自己回帰モデルのパラメータを推定
34
Fourier transform of log-scaled power of a signal
Estimation of parameters of an autoregressive model
/58
ケプストラム分析のモチベーション Motivation of cepstrum analysis
35
周波数
パワ
ー
音声から声道の特性と音源の特性を 抽出 (分離) できないかな?
(でも,混ざってるんだよな・・・)
声道の特性と音源の特性の形に違いはないかな・・・?
よく見ると,声道の特性は緩やかに変動して, 逆に, 音源の特性は激しく変動しているな.
じゃあ,上図の信号を緩やかに振動する低周波数成分と 激しく振動する高周波数成分に分ければいいんだ!
Let’s think how to separate vocal-tract features and vocal-chord features from a signal they are mixed.
Find differences of shapes of the features….
We can see that vocal tract features changes slowly and vocal chord features changes rapidly.
Then, we extract slowly changing and rapidly changing components from the signal!
/58
ケプストラム分析の計算手順 Calculation procedure of cepstrum analysis
36
時間 time
振幅
am
plitu
de
周波数 frequency パ
ワー
pow
er
周波数 frequency
対数
パワ
ー
音声波形 waveform
パワースペクトル Power spectrum
対数パワースペクトル Log-scaled power spectrum
離散フーリエ変換 Discrete Fourier transform (DFT)
対数の計算 Logarithm
対数パワースペクトルを時間波形だと思ってDFT => ケプストラムが計算される!
Take DFT of the log-scaled power spectrum -> It becomes the cepstrum.
声道特性(包絡)と音源特性(微細構造)が分離されて現れる(はず)! Vocal-track (spectral envelope) and vocal-chord (detailed structure) features will be separated!
/58
ケプストラムの例 Example of cepstral coefficients
37
ケフレンシー (Quefrency)
ケプ
スト
ラム
(C
ep
str
um
)
低次のケプストラムは 声道特性(スペクトル包絡)に対応 Lower-order cepstrum corresponds to spectral envelopes.
高次のケプストラムは音源特性(微細構造)に対応 Higher-order cepstrum corresponds to detailed structures.
リフタ:ケプストラムに対するフィルタ Lifter: filter for cepstrum
/58
次数を上げるとより複雑に表現可能 The use of higher-order cepstra can represent
more complicated structure.
ケプストラムの次数による変化 Effect of the number of liftered cepstrum
板橋 他, 音声工学,図4.5から引用
低次成分が包絡成分に対応 Lower-order components correspond to a spectral envelope.
高次のピークでF0を抽出 A peak of high-order components
corresponds to F0.
10次
20次
包絡抽出 Envelope extraction
/58
信号のケプストラムを計算してみよう! Calculate cepstrum of the given signal!
Q. 時間信号 (time signal) のスペクトル包絡を抽出せよ.
– 信号 (signal): 𝒙 = (2.5, 2.0, 1.0, 2.5, 2.0, 1.0, 2.5, 2.0, 1.0, 2.5, 2.0, 1.0, 2.5)
– 信号長 (signal length): 16
– ケプストラムの次数 (order of ceptrum): D=4
39
Time n
𝑥 𝑛
/58
周波数特性を計算 Calculate the frequency characteristics.
40
Frequency k Frequency k
Re{X(k)} (real part) Im{X(k)} (imaginary part)
𝑿 = DFT(𝒙)
𝑿 = 𝑋 0 ,⋯ , 𝑋 𝑘 ,⋯ , 𝑋 𝑁 − 1 (𝑋 𝑘 ∈ 𝒞)
線対称 Line symmetry
点対称 Point symmetry
/58
対数パワーを計算 Calculate the log power.
41 Frequency k
Log-s
cale
d p
ow
er
S(k
) 𝑆[𝑘] = log10( 𝑋 𝑘
2)
S 𝑘 : log-scaled power
線対称 Line symmetry
/58
ケプストラム (対数パワーのフーリエ変換) Calculate cepstrum (Fourier transform of log power).
42
𝑪 = DFT 𝑺
𝑺 = 𝑆 0 ,⋯ , 𝑆 𝑘 ,⋯ , 𝑆 𝑁 − 1 : Log-scaled power ∈ ℛ
𝑪 = 𝐶 0 ,⋯ , 𝐶 𝑘 ,⋯ , 𝐶 𝑁 − 1 : cepstrum ∈ ℛ
Quefrency n
Cep
str
um
C(n
) 線対称 Line symmetry
/58
リフタをかける Liftering
43
𝐶 𝑛 ′ = 𝐿 𝑛 𝐶[𝑛]
𝐿 𝑛 = 1 (𝑛 ≤ 3 𝑜𝑟 𝑛 ≥ 13)0 (otherwise)
: リフタ(線対称)
Quefrency n
Cep
str
um
𝐶 𝑛
𝐶′ 𝑛
𝐿 𝑛
Lifter (line symmetry)
D D-1
/58
リフタされたケプストラムを逆フーリエ変換 Take inverse DFT of the liftered cepstrum.
44
𝑺′ = IDFT 𝑪′
Frequency k
Log-s
cale
d p
ow
er
𝑺′: スペクトル包絡, 𝑪′: リフタリングされたケプストラム
Original spectrum 緩やかに変化する成分を抽出!
Slowly changing components can be extracted!
Spectral envelope
/58
ケプストラム分析の特徴 Pros. & Cons. of cepstrum analysis
長所 (Pros.)
– 単純な操作,少ない演算量でスペクトル包絡を抽出可能
– 高次ケプストラムの考慮により,F0も抽出可能
問題点 (Cons.)
– リフタリングのカットオフとデータ量のトレードオフ
– スペクトル包絡に,フォルマント共振があまり反映されない*
– →共振点に敏感な聴覚系を踏まえると,非効率なモデリング
45 *フォルマントを考慮したケプストラム分析もあるが,本講義では説明しない
Spectral envelopes can be extracted by simple and fast computation.
F0 is also extracted by the higher-order cepstrum.
Tradeoff between order of the lifter and data size
The formant structure tends to be ignored.
Inefficient modeling because the human auditory system is sensitive to resonance.
/58
2つの音声分析法:ケプストラムとLPC Two types of speech analysis: cepstrum & LPC
ケプストラム分析 (Cepstrum analysis)
– ノンパラメトリックな分析法 (non-parametric analysis)
– 周波数特性をフーリエ基底で波と捉える
– 時間波形の対数パワースペクトルのフーリエ変換
LPC 分析 (Linear predicting coding analysis)
– パラメトリックな分析法 (parametric analysis)
– 声道を音響管連接と考え,自己回帰モデルのパラメータを推定
46
Fourier transform of log-scaled power of a signal
Estimation of parameters of an autoregressive model
/58
線形予測の原理 Fundamentals of LPC analysis
音声信号 𝑥 𝑛 について,次式のAR過程が成り立つと仮定
𝑒 𝑛 を最小にするように 𝛼𝑖 を決める
上式のz変換は以下の通り与えられる
47
𝑥 𝑛 + 𝛼1𝑥 𝑛 − 1 +⋯+ 𝛼𝑝𝑥 𝑛 − 𝑝 = 𝑒 𝑛
𝑒 𝑛 : 𝑁 ⋅, 0, 𝜎2 に従う線形予測誤差 (residual error)
𝛼𝑖: 線形予測係数 (LPC coefficient)
𝑋 𝑧 + 𝛼1𝑋 𝑧 𝑧−1 +⋯+ 𝛼𝑝𝑋 𝑧 𝑧
−𝑝 = 𝐸 𝑧
𝑋 𝑧 =1
1 + 𝛼1𝑧−1 +⋯+ 𝛼𝑝𝑧
−𝑝𝐸 𝑧
Estimate 𝛼𝑖 by minimizing 𝑒 𝑛 .
The z-transformation is given as
/58
線形予測係数は何を表している? What do the LPC coefficient represent?
この式は何を表す?
因数分解してみる
48
𝑋 𝑧 =1
1 + 𝛼1𝑧−1 +⋯+ 𝛼𝑝𝑧
−𝑝𝐸 𝑧
𝑋 𝑧 =1
1 + 𝛽1𝑧−1
1
1 + 𝛽2𝑧−1…
1
1 + 𝛽𝑝𝑧−1𝐸 𝑧
𝐸 𝑧 𝑋 𝑧 声帯の音源信号
Excitation signal 音声信号
Speech signal
声道 Vocal tract
声道を音響管の連接と捉え,その特性を推定している! Assuming the vocal tract as all pole models, this analysis estimates its characteristics!
/58
線形予測係数の推定 (1) Estimation of the LPC coefficient (1)
LPC分析で推定される線形予測係数は,AR過程を仮定
– つまり「声帯信号のパワーを最小化するようにARモデルを推定」 しており,「声道特性を共振のみで表現」する分析法
どうやって,線形予測係数を推定する?
– 当該時間区間内の声帯信号のパワーを最小化する (次のページへ)
– → 𝜕
𝜕𝛼𝑖 𝑒 𝑛 2𝑛=𝑛1𝑛=𝑛0
= 0
49
i番目の予測係数 (i-th LPC coef.)
時間区間 (time interval)
残差 (residual signal)
LPC analysis estimates AR model parameters by minimizing residual signals and represents the vocal-tract characteristics by only resonance.
/58
線形予測係数の推定 (2) Estimation of the LPC coefficient (2)
予測残差を展開
上式の𝛼𝑖による微分を0とおく (すなわち,連立一次方程式) と𝛼𝑖が 求まるが,安定して解が求まる保証はない → 条件を導入
50
𝑒 𝑛 2𝑛1
𝑛=𝑛0
= 𝛼𝑖𝑥 𝑛 − 𝑖
𝑝
𝑖=0
2𝑛1
𝑛=𝑛0
= 𝛼𝑖𝛼𝑗𝑥 𝑛 − 𝑖 𝑥 𝑛 − 𝑗
𝑝
𝑗=0
𝑝
𝑖=0
𝑛1
𝑛=𝑛0
= 𝛼𝑖𝛼𝑗𝑣𝑖𝑗
𝑝
𝑗=0
𝑝
𝑖=0
和の二乗を展開
nに関する総和を 自己相関関数へ
𝑥 𝑛 − 𝑖 𝑥 𝑛 − 𝑗
𝑛1
𝑛=𝑛0
自己相関関数 Autocorrelation function
𝛼𝑖 can be estimated by solving the derivative by 𝛼𝑖 is equal to 0. However, it is not guaranteed to exist the solution. -> Introduce a new condition.
/58
線形予測係数の推定 (3) Estimation of the LPC coefficient (3)
条件 (conditions)
– 当該時間区間外では 𝑥 𝑛 = 0
– 無限長の信号を考える (𝑛0 = −∞, 𝑛1 = ∞)
この条件下で自己相関関数は次式のように変形できる
この変形により安定して解を推定できる(次ページ)
51
𝑣𝑖𝑗 = 𝑥 𝑛 − 𝑖 𝑥 𝑛 − 𝑗
𝑛1
𝑛=𝑛0
= 𝑥 𝑛 𝑥 𝑛 − 𝑖 − 𝑗
𝑛1
𝑛=𝑛0
= 𝑟 𝑖−𝑗
𝑖と𝑗の2変数に依存していた自己相関関数が |𝑖 − 𝑗|の1変数のみに依存
The autocorrelation function of two variables (𝑖, 𝑗) is transformed into a function of only one variable 𝑖 − 𝑗 .
This transformation makes it possible to stably solve. (next page)
/58
線形予測係数の推定 (4) Estimation of the LPC coefficient (4)
微分値を0とおいて𝛼𝑖を推定
行列で表現すると…
52
𝜕
𝜕𝛼𝑖 𝑒 𝑛 2∞
𝑛=−∞
=𝜕
𝜕𝛼𝑖 𝛼𝑖𝛼𝑗𝑣𝑖𝑗
𝑝
𝑗=0
𝑝
𝑖=0
= 2 𝛼𝑗𝑣𝑖𝑗 = 0
𝑝
𝑗=0
𝛼𝑗𝑣𝑖,𝑗 = 𝑣𝑖0
𝑝
𝑗=1
𝛼0 = 1
𝑣1,1
𝑣𝑖,1
𝑣𝑝,1
𝑣1,𝑗
𝑣𝑖,𝑗
𝑣𝑝,𝑗
𝑣1,𝑝
𝑣𝑖,𝑝
𝑣𝑝,𝑝
𝛼1
𝛼𝑗
𝛼𝑝
𝑣1,0
𝑣𝑖,0
𝑣𝑝,0
=
/58
線形予測係数の推定 (5) Estimation of the LPC coefficient (5)
安定化条件による導出 𝑣𝑖,𝑗 = 𝑟|𝑖−𝑗| を代入すると…
利点
– 線形予測係数が必ず求まる
– 高速解法(Durbinの再帰的解法)が利用可能
– 推定されたARモデルは絶対安定
53
𝑟0
𝑟2
𝑟𝑝−1
𝑟𝑝−1
𝑟0
𝛼1
𝛼𝑝
𝑟1
𝑟𝑝
=
𝑟1 𝑟2
𝑟0 𝑟1 𝑟1
𝑟0 𝑟1
𝑟1
𝑟1
テプリッツ型行列 → 正定値行列 → 逆行列が必ず存在
𝛼2 𝑟2
Toeplitz matrix Positive-definite matrix
Matrix inversion is guaranteed.
LPC coefficients are stably estimated.
The fast algorithm is available.
Estimated AR model is guaranteed to be stable.
/58
線形予測分析とケプストラム分析の比較 Comparison of LPC analysis & cepstrum analysis
54 * 板橋 他, 音声工学,図4.13より引用
ケプストラムよりフォルマント(ピーク)を重視→少ない次数で効率的に表現 LPCs fit formants (peaks) more than cepstrum. -> efficient modeling
/58
線形予測分析の次数による違い Effects of the order of LPC coefficients
55
2次
4次
10次
18次
ケプストラムと同様に次数が増えるほど細かくモデル化可能 The use of more number of LPC coefficients can model more detailed structure.
* 嵯峨山茂樹, “応用音響学 講義資料 2009”より引用
/58
線形予測分析の特徴 Pros. & Cons. of LPC analysis
長所 (Pros.)
– 高速解法により,単純な操作でスペクトル包絡を抽出可能
– フォルマントを強調した包絡を抽出
– 少量のパラメータ数で効率的に包絡を表現
問題点 (Cons.)
– 線形予測係数を量子化・伝送する場合,伝送誤差等により 不安定なフィルタになりやすい
– → PARCORやLSPによる改善 (本講義では省略)
56
Spectral envelopes can be extracted by fast computation.
Formant-emphasized extraction
Efficient modeling using small number of parameters
Transmission error or quantization make the AR model instability.
まとめ CONCLUSION
57
/58
本講義のまとめ Conclusion of this talk
デジタル信号処理の基礎 (Digital signal processing)
– 離散フーリエ変換 (DFT) … 振動する波で音波を表現
– z変換 (z-transform) …増減・振動する波で表現.安定性を図れる.
音声とは (speech production and its parameters)
– 音声の生成過程 … スペクトル包絡・基本周波数
音声の特徴抽出 (speech analysis)
– ケプストラム分析 … 対数パワースペクトルを時間波形と捉える
– LPC分析 … 声道を音響管連接と捉える 58
音声の特徴とは何か,それをどう定量化するか What are the parameters for quantifying characteristics of speech?