A preliminary study on Hakka speech recognition by using the Branchformer
1084Authors
nan
Abstract
This paper is a preliminary study on Hakka speech recognition using the end-to-end Branchformer framework provided by the ESPnet. Two types of recognition targets were tested: character and Hakka pinyin. The experimental result showed that the Branchformer for the Hakka speech recog- nition pre-trained with the large Man- darin speech corpus Aishell-1 can improve the recognition performance by using the Branchformer trained by the Hakka speech corpus only. 關鍵字:客語辨識、語音辨識、漢語變體 Keywords: Hakka speech recognition, ASR, Varieties of Chinese 1
Keywords
Full Content
A preliminary study on Hakka speech recognition by using the Branchformer 使用 Branchformer 之端至端客語語音辨識初探 Jia-Jyu Su, Dong-Min Li, Chen-Yu Chiang National Taipei University, New Taipei City, Taiwan {s711181105, s410886005}@gm.ntpu.edu.tw, cychiang@mail.ntpu.edu.tw 摘要 本文為 2023 客語辨識挑戰對於端到端客 語語音辨識初探,使用 Branchformer 作 為模型並在 ESPnet 下執行,說明為何選 用 Branchformer 作為辨識模型與其特點, 並實驗字元和拼音兩個不同目標對於辨識 效果的好壞,並驗證中文語料是否對客語 的辨識有幫助。 Abstract This paper is a preliminary study on Hakka speech recognition using the end-to-end Branchformer framework provided by the ESPnet. Two types of recognition targets were tested: character and Hakka pinyin. The experimental result showed that the Branchformer for the Hakka speech recog- nition pre-trained with the large Man- darin speech corpus Aishell-1 can improve the recognition performance by using the Branchformer trained by the Hakka speech corpus only. 關鍵字:客語辨識、語音辨識、漢語變體 Keywords: Hakka speech recognition, ASR, Varieties of Chinese 1 Introduction 近幾年,中華民國政府為了對於母語進行保 存,特別制定了國家語言發展方向,因此對於 民眾常用的母語,都有讓國中小學安排母語課 程,這些母語課程包括閩南語、客語、原住民 語、以及其他東南亞新住民語言。在此時空環 境下,政府為了要能倡導母語的使用、教學、 保存以及再發展,舉辦了這次的客語語音辨識 大賽。 嚴格來講,客語是屬於漢語系的方言,漢語 最主要可以分為 7 大方言系,客語是屬於全球 漢語使用人口數的第 7 名 (Wikipedia, 2023)。 如同其他漢語方言,客語沒有特別的文字紀 錄方式,原因是長期的歷史以及政治因素,並 沒有任何系統性並且可大量被使用的文字紀錄 方法,加上目前年輕人口逐漸沒有使用方言的 場域,只剩下教育部使用政策方法來推行客語 等等的母語教育。 客語又可以分為許多次方言,比如海陸腔、 四縣腔、大埔腔、饒平腔、紹安腔和南四縣 腔,這些腔調的差異有出現在基礎音節的音素 組合上,也出現在聲調於音高以及音節長度上 的韻律差異。 以客語的使用價值來看,最重要是在於文化 資產的保留,客語就是最能夠表示客家文化的 知識體系以及語言系統空間。若要活化從文化 資產,便需要科技元素的融入,語音辨識的競 賽便是一種很直觀套入的形式。 以技術價值來討論,客語語音科技的發展於 產業的產值創造發揮有限,無法和主流社會經 濟生活需求的國語以及英語、日語一樣,但建 立客語語言學習所需要的輔助工具,比如利用 語音辨識技術來做為客語發音檢正確與否的鑑 測技術,是可以發展的方向。 本 論 文 介 紹 了 使 用 Branchformer (Peng et al.) 之端至端客語語音方法。使用 Branch- former 做為系統建立工具的原因是 Branch- former 做為編碼器將抽取全域和局部資訊的 部分分為兩個分支,以更好的提取資訊讓準確 度上升,除此之外 Branchformer 也有較好的 訓練穩定度。 本論的組織如下:首先介紹 banchformer 的 模型架構及其特點,接著實驗環境設定與實驗 方法,最後附上實驗討論與結語。 2 Branchformer 介紹 Branchformer 是對編碼器去設計,將提取全 域與局部資訊的模塊分開為兩個平行的分支 (branch),目的是讓模型可以提取更多範圍 (various ranged) 之間的相關性,分支的設計 讓 Branchformer 有以下優點:模型設計有彈 性、可根據目標客製分支、模型較好解釋。因 為雙分支的緣故,Branchformer 可以根據需 The 35th Conference on Computational Linguistics and Speech Processing (ROCLING 2023) Taipei City, Taiwan, October 20-21, 2023. The Association for Computational Linguistics and Chinese Language Processing 求更換個別分支所使用的架構,例如為降低複 雜度在注意力模塊使用 fastformer,雙分支的 設計讓兩個分支在合併的時候可以被可學習的 權重控制,讓模型學習到在不同的狀況下,哪 個分支的資訊較為重要,使模型更加彈性,另 外雙分支可以在推理階段時將注意力端關閉來 加速處理。 Figure 1: The architecture of Branchformer model 2.1 Attention Branch 注意力模塊透過注意力機制對整個序列提取資 訊,輸入 X ∈ RT×d,T 是序列長度,d 是特 徵維度,MHSA (Multi-headed Self Attention) 首先會將輸入轉換成 Q, K, V ∈ RT×d (query、 key、value) 三個矩陣,且投影內的參數為可 學習的,Q 與 K 會做內積並經過 softmax 得 到一組權重代表每個位置資訊的重要性,最後 跟 V 相乘得到輸出。 Attention(Q, K, V) = softmax(QKT √ d )V (1) 在 attention 的數學式中,softmax( QKT √ d ) 的 矩陣相乘,由於 d 是常數,而 T 則為輸入長 度,而複雜度與 T 承平方關係,當輸入越長, 輸出的速度越慢。 MHSA 實際上輸入會經過 h 次的投影,這 些投影是平行化的,因此在最後需要將每個 attention head 的輸出組合起來再投影成原本 的大小,才是 MHSA 最後的輸出。 MultiHead(Q, K, V ) = concat(head1...headh)WO0 (2) headi = Attention(QWQ i , KWK i , VWV i ) (3) 此處 WQ i , WK i , WV i ∈ Rd×d/h,為投影矩 陣, 將 Q, K, V 投 影 到 較 低 維 度;WO Rd×d,將各個 head 組合的結果投影轉換為∈ 最後的輸出。 2.2 Convolution Branch 捲 積 模 塊 透 過 帶 有 捲 積 閥 的 多 層 感 知 機 (MLP) 提取局部的上下文資訊,其藉由深度 方向的捲積和一個線性閥來實現,cgMLP 比 起 Conformer 的捲積模塊效能要好,其主要 組成是由 Gaussian error Linear Unit (GeLU)、 convolution spatial gating unit (CSGU) 與投 影轉換層所組成。 cgMLP 首先將輸入 X ∈ RT×d 通過 layer- norm,之後經過許多層到最後的輸出: Z = GeLU(XU) ∈ RT×dhidden (4) ~Z = CSGU(Z) ∈ RT×dhidden/2 (5) Y = ˜ZV ∈ RT×d (6) 其中 U ∈ Rd×dhidden,V ∈ Rdhidden/2×d,為 兩個通道投影,隱藏層的維度通常會大於輸 入的維度,這樣的設計相似於點對點的 feed- forward 層。 cgMLP 的另外一個要件為 CSGU,它包含 了一個線性閥並採用了深度方向的捲積來捕捉 局部關係,他的輸入 Z ∈ RT×dhidden 會在特徵 維度被均等分成 Z1, Z2 ∈ RT×dhidden/2,之後 只有 Z2 會沿著時間維度做深度方向的捲積: Z′ 2 = DWConv(LayerNorm(Z2)) (7) 最後的輸出是將 Z1, Z′ 2 做元素之間的相乘, 得到 ~Z = Z1 ⊗ Z′ 2,將自己相關的資訊跟自己 做內積,是一種 self-gating,透過自身資訊去 決定該位置的資訊是否向前傳遞,而這實際上 也是一種線性閥,因為在相乘之前不會經過非 線性激活層。 The 35th Conference on Computational Linguistics and Speech Processing (ROCLING 2023) Taipei City, Taiwan, October 20-21, 2023. …
Content truncated to 500 words
Labeled Text
This paper is a preliminary study on Hakka speech recognition using the end-to-end Branchformer framework provided by the ESPnet. Two types of recognition targets were tested: character and Hakka pinyin. The experimental result showed that the Branchformer for the Hakka speech recognition pre-trained with the large Mandarin speech corpus Aishell-1 can improve the recognition performance by using the Branchformer trained by the Hakka speech corpus only. 關鍵字:客語辨識、語音辨識、漢語變體 Keywords: Hakka speech recognition, ASR, Varieties of Chinese 1
Publication Details
- Paper ID:
- 1084
- Year:
- 2023
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan