Skip to content

Commit

Permalink
Update readme and remove some menu
Browse files Browse the repository at this point in the history
  • Loading branch information
tsengwoody committed May 8, 2024
1 parent d95f16a commit 1f40328
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 185 deletions.
8 changes: 1 addition & 7 deletions addon/globalPlugins/WorldVoice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from synthDrivers.WorldVoice import WVStart, WVEnd
from synthDrivers.WorldVoice.hook import Hook
from synthDrivers.WorldVoice.sayAll import patch, unpatch
from synthDrivers.WorldVoice.voiceManager import VEVoice, AisoundVoice
from synthDrivers.WorldVoice.voiceManager import AisoundVoice

addonHandler.initTranslation()
ADDON_SUMMARY = addonHandler.getCodeAddon().manifest["summary"]
Expand Down Expand Up @@ -64,9 +64,6 @@ def createMenu(self):
gui.mainFrame.sysTrayIcon.Bind(wx.EVT_MENU, self.popup_SpeechSymbolsDialog, item)
item = self.submenu_vocalizer.Append(wx.ID_ANY, _("&File Import"), _("Import File."))
gui.mainFrame.sysTrayIcon.Bind(wx.EVT_MENU, self.onFileImport, item)
if not VEVoice.install():
item = self.submenu_vocalizer.Append(wx.ID_ANY, _("VE Core Install"), _("Install VE Core."))
gui.mainFrame.sysTrayIcon.Bind(wx.EVT_MENU, self.onVECoreInstall, item)
if not AisoundVoice.install():
item = self.submenu_vocalizer.Append(wx.ID_ANY, _("&Aisound Core Install"), _("Install Aisound Core."))
gui.mainFrame.sysTrayIcon.Bind(wx.EVT_MENU, self.onAisoundCoreInstall, item)
Expand Down Expand Up @@ -109,9 +106,6 @@ def fileImport(self, import_path):
def onFileImport(self, event):
self.fileImport(workspace_path)

def onVECoreInstall(self, event):
self.fileImport(VEVoice.workspace)

def onAisoundCoreInstall(self, event):
self.fileImport(AisoundVoice.workspace)

Expand Down
2 changes: 1 addition & 1 deletion addon/synthDrivers/WorldVoice/voice/_onecore.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def _maybeInitPlayer(self, wav):
def terminate(self):
# prevent any pending callbacks from interacting further with the synth.
self._earlyExitCB = True
super().terminate()
# super().terminate()
# Terminate the synth, the callback function should no longer be called after this returns.
self._dll.ocSpeech_terminate(self._ocSpeechToken)
# Drop the ctypes function instance for the callback and handle,
Expand Down
2 changes: 1 addition & 1 deletion buildVars.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def _(arg):
# Translators: Long description to be shown for this add-on on add-on information from add-ons manager
"addon_description" : _("Multilingual synthesizers add-on: Automatically switch speech role according to text language; Integrated Aisound, OneCore, RHVoice, SAPI5, VE speech engine"),
# version
"addon_version" : "3.7",
"addon_version" : "3.8",
# Author(s)
"addon_author" : "Tseng Woody <[email protected]>",
# URL for the add-on documentation support
Expand Down
194 changes: 18 additions & 176 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
WorldVoice does not include those commercial TTS libraries (core dll). You must purchase a license from the original developer/company in order to use it, WorldVoice is just the driver for it.
We also cannot guarantee compatibility with the latest versions sold by the developer/company, so please consider carefully before making a purchase if you intend to use those commercial TTS with WorldVoice.
WorldVoice only focuses on TTS engines open source/free and does not prioritize maintaining compatibility with those commercial TTS engines.

# WorldVoice

In this highly interconnected and globalized era, language learning has become increasingly important. In language learning materials, native languages are often used to help explain foreign vocabulary and sentences, and multiple languages are often mixed together. In daily communication, we also often mix multiple languages and scripts. In books, newspapers, and online articles, multiple languages are often used to convey information, sometimes even within the same sentence, using Chinese and English or Chinese and Japanese.

The text composition, contextual meaning, and cross-lingual frequency of different digital content, such as language learning, mathematics, and literary works, may differ, and the corresponding speech reading method may also need to be adjusted accordingly to better meet the needs of different types of documents.

WorldVoice is a multi-language speech reading NVDA add-on, which supports five speech engines (VE, OneCore, Aisound, SAPI5, and RHVoice) and provides a variety of customization options. Users can adjust their settings for different contexts, maximizing the satisfaction of different user groups.
WorldVoice is a multi-language speech reading NVDA add-on, which supports five speech engines (Espeak, OneCore, RHVoice, SAPI5, Piper) and provides a variety of customization options. Users can adjust their settings for different contexts, maximizing the satisfaction of different user groups.

Its main features include:

Expand All @@ -16,17 +20,7 @@ Its main features include:

## install

In addition to the general NVDA addon installation steps, if you want to use the VE and aisound voices, you need to install the core packages. If you want to use the VE and RHVoice voices, you need to install the voice packages.

Here are the steps to install the core packages:

* Go to WorldVoice -> VE Core Installation, Aisound Core Installation, and import the corresponding core package zip files into the WorldVoice addon workspace.
* If you are using the VE core, you also need to install the x86 version of [VC++ Redistributable Packages 2012](https://www.microsoft.com/en-US/download/details.aspx?id=30679) in your operating system (VSU_4\vcredist_x86.exe). If you have already installed the core and voice packages but still cannot load the WorldVoice synthesizer, try installing this component.

Here are the steps to install the voice packages:

* If you want to use the RHVoice voice, please download the corresponding voice package addon from the official website. [Official download page](https://rhvoice.org/languages/).
* If you want to use the VE voice, you can directly copy the regional folders (such as en, mnc, mnt, etc.) from the VE voice package addon and compress them into a zip file. Then, import it into the WorldVoice workspace through the "File Import" function in the WorldVoice interface. Since the addon form may be incompatible due to the NVDA version, causing the VE voice package to fail to load normally after updating NVDA, it is recommended to install the voice package in this file import method. Alternatively, you can use the VE addon voice package form, and download the corresponding voice package from the official website compatible with Vocalizer for NVDA. [Official download page](https://vocalizer-nvda.com/downloads).
In addition to the general NVDA addon installation steps, if you want to use the aisound voices, you need to install the core packages. If you want to use the RHVoice voice, please download the corresponding voice package addon from the official website. [Official download page](https://rhvoice.org/languages/).

## Main Speech Role Settings

Expand Down Expand Up @@ -56,12 +50,14 @@ Language Switching:
* Ignore numbers when detecting language, ignore common punctuation when detecting language: When checked, numbers and common punctuation will be considered part of the main speech role's language.
* Enhance voice commands: This allows the program to automatically detect language and determine when to add pauses for voice commands before or after NVDA's symbol processing. Selecting "after symbol processing" can prevent conflicts with other voice module add-ons (e.g., Instant Translate).

Speech Engine: You can choose the voice engine you want to enable, with VE, OneCore, and aisound as the default options.
Speech Engine: You can choose the voice engine you want to enable.

Others:
# WorldVoice update log

* OneCore rate boost: When checked, OneCore's speech role will be faster.
* VE wait factor: Set the pause length for VE voice sessions to start and end (each session ends when encountering a period or switching speech roles, then starts a new session).
## v3.8

* Update readme
* Remove some menu

# WorldVoice

Expand All @@ -82,17 +78,7 @@ WorldVoice 是一款多國語音朗讀 NVDA 附加元件,支援 VE, OneCore, A

## 安裝

除了一般的 NVDA 附加元件安裝步驟之外,如果您想使用 VE 和 aisound 語音,您需要額外安裝核心包;如果您想使用 VE 和 RHVoice 語音,您需要安裝語音包。

安裝核心包的步驟如下:

* 前往 WorldVoice -> VE 核心安裝、Aisound 核心安裝,並將相應的核心包 zip 檔案匯入 WorldVoice 附加元件工作區。
* 如果您使用 VE 核心,還需要在作業系統中安裝 [VC++ Redistributable Packages 2012](https://www.microsoft.com/en-US/download/details.aspx?id=30679) 的 x86 版本(VSU_4\vcredist_x86.exe),如果您已安裝核心包和語音包,但仍無法載入 WorldVoice 合成器,請嘗試安裝此元件。

安裝語音包的步驟如下:

* 如果欲使用 RHVoice 的語音,請從官方網站下載相應的語音包附加元件。[官方下載點](https://rhvoice.org/languages/)
* 如果欲使用 VE 語音,您可以直接從 VE 語音包附加元件內複製地區資料夾(例如 en、mnc、mnt 等),將其壓縮成 zip 壓縮包後,透過 WorldVoice 介面的「檔案匯入」功能匯入 WorldVoice 工作區內。由於附加元件形式可能因 NVDA 身版導致不相容,造成更新 NVDA 後無法正常載入 VE 語音包,推薦使用此種檔案匯入語音包的方式安裝。或是您可以使用 VE 附加元件語音包形式,請從兼容於 Vocalizer for NVDA 的語音包附加元件官方網站下載相應的語音包。[官方下載點](https://vocalizer-nvda.com/downloads)
除了一般的 NVDA 附加元件安裝步驟之外,如果您想使用 RHVoice 語音,請從官方網站下載相應的語音包附加元件。[官方下載點](https://rhvoice.org/languages/)

## 主要語音角色設定

Expand Down Expand Up @@ -122,155 +108,11 @@ WorldVoice 是一款多國語音朗讀 NVDA 附加元件,支援 VE, OneCore, A
* 偵測語言時忽略數字、偵測語言時忽略常見標點符號勾選後,數字與標點符號會判定為主要語音的地區文字。
* 增強語音命令:文字自動偵測語言、停頓語音指令的判斷與加入時間點是在 NVDA 的符號處理前或符號處理後進行。當選擇「符號處理後」項目時,可防止與其他使用到語音模組附加元件(ex: Instant Translate)的衝突。

語音引擎:可選擇要啟用的語音引擎,預設為 VE, OneCore, aisound

其他:

* OneCore 提高語速:勾選後 OneCore 的語音角色速度會更快
* VE 停頓參數:設定 VE 語音 session 開始與結束的停頓長度。(遇到句號或語音角色切換時皆會結束當前這條語音 session 並重啟一條新的語音 session)

# 更新版本日誌

## v3.7

* 修正 NVDA+b 功能無法使用的問題
* 修正睡眠模式下按鍵盤任意鍵語音中斷問題(語音角色設定中有任意 SAPI5 語音則不適用)(Workaround Solution)
* 同步 OneCore 程式與 NVDA 內 OneCore 做法

## v3.6

* 新增讀出全部停頓功能,可在讀出全部時的片段間停頓
* 修正特定情境中無法保存設定的問題
* 加入烏克蘭語翻譯,感謝 VovaMobile 的貢獻

## v3.5

* 修正 aisound 音量回避 bug
* 修正 VE 遇 utf8 4bit 字元會讓後續文字不朗讀的問題
* 修正 VE 遇 unicode utf8 編碼錯誤時文字不朗讀的問題
* 在語音設定新增引擎分類,可選擇要啟用的語音引擎,預設為 VE, OneCore, aisound
* 相容於 NVDA 版本 2023.1

## v3.4

* 新增數字間停頓,提身數字內容聽讀判斷
* 新增項目間停頓功能,提身物件資訊聽讀判斷
* 修正 VE 數字模式為數值時會合併相鄰數字成為單一數值報讀
* 修正 OneCore 語速調整問題
* 修正 VE 開啟「游標移動時延遲讀出字元的字詞解釋」後遊標移動卡頓問題
* 修正 OneCore 與 RHVoice 「游標移動時延遲讀出字元的字詞解釋」無效的問題

## v3.3

* 支援 OneCore engine
* 地區與語音角色對應為 No Select 時使用主語音朗讀
* 修正符號轉中文報讀時會套用到中文空白停頓參數的問題
* 語音設定使用類別設定對話框,分為語音角色、語言切換、其他
* 在語音設定中的其他分類下加入 OneCore 加快語速開關
* 支援 RHVoice engine

## v3.2

* 修正在語音合成器非選擇 WorldVoice 時,語音設定問題,改以顯示提示文字
* 修正 aisound 音量調整問題
* 修正語音設定中偵測語言時間點的重啟條件
* 修正長按按鍵後語音無法中斷問題
* 修正多項語意問題(flake8)
* 相容於 NVDA 版本 2022.1

## v3.1

* 在網頁瀏覽中中斷無聲報讀
* shift 可暫停/繼續語音報讀
* 按加減音量鍵不會中斷報讀
* 保持主要語音引擎與地區語音引擎一致功能
* 修正 VE 停頓的方式

## v3.0

* 支援 SAPI5 語音引擎
* 支援 Aisound 語音引擎
* 語音設定內新增語音角色切換時停頓長度
* 語音設定內新增 unicode 正規化方式選項
* 語音角色排序方式調整依語音引擎、語音角色名稱排序

## v2.2

* 語音設定內新增變聲選項,需依序設定地區、語音、變聲選項
* 修政偵測語言時間點選「符號處理前」後無法再變更之問題
* 新增阿拉伯語系翻譯

## v2.1

* 相容於 NVDA 版本 2019.3~ 2021.1
* 可套用 NVDA 不同組態設定
* 移除輸入手勢的多餘項目
* 速度內部數值換算百分比改非線性計算
* 設定選單調整將「在符號處理後偵測文字語言」更改為「偵測語言時間點」
* 偵測語言時間點:字元自動偵測語言時間點在 NVDA 的符號處理前或後進行。當選擇「符號處理後」項目時,可防止與其他使用到語音模組附加元件(ex: Instant Translate)的衝突
* 保持主要語音參數與地區語音參數一致:將 NVDA 語音設定中的語音(主要語音)與 WorldVoice 語音設定中的地區對應語音(地區語音)參數(速度、音調、音量)一致,當主要語音或地區語音設定調整時,同步調整雙方的語音參數設定
* 保持主要語音角色與地區語音角色一致:將 NVDA 語音設定中的語音(主要語音)角色與 WorldVoice 語音設定中的地區對應語音(地區語音)角色一致,當主要語音或地區語音設定調整時,同步調整雙方的語音角色設定

## v2.0

* 相容 NVDA 2021.1

## v1.7

* 小數點不讀修正(三數字間皆有小數點情形)
* 相容 NVDA 2021.1 以前的最後一版

## v1.6
語音引擎:可選擇要啟用的語音引擎。

* 修正數字模式下小數點不朗讀問題
* 更新 VE 核心包工作目錄,未來更新時可無需重新匯入
* 將「使用 WorldVoice 設定規則針測語言」的開關與「自動切換語言」的開關分開,避免部份情境兩者不相容問題。
* 修正啟用 unicode 自動語言針測時,預設語音與 NVDA 語言地區不相同但同語系時無法切換的問題
* 修正自動切換語言無勾選時 WorldVoice 變更語音語言命令被濾掉的問題
# WorldVoice 更新日誌

## v1.5
## v3.8

* 數字讀法分為 2 個設定選項「數字語言」與「數字模式」,將選項分為 2 維度以利選擇
* 忽略數字間逗點選項使數值報讀更正確
* 自動偵測語言功能當信任語音語言勾選時才使用不同解釋檔
* 語音設定中的值調整按確認才生效按取消會回到設定前的值
* 修正語音設定中當語音與預設語音相同時調整設定值後重啟 NVDA 後回到設定前的值
* 將自動語言切換設定與語音設定視窗合併
* 地區與語音對應加入 no-select 用來取消對應
* 支援快速鍵彈出語音設定與 Unicode 設定

## v1.4

* 修正檢視報讀內容開啟時無語音
* 音調內部數值換算百分比改非線性計算,讓預設值為 50
* 修正 unicode rule 強制模式下後方文字偵測錯誤
* 修正初始值類型錯誤導致語音設定對話框無法顯示
* 初始語音改優先使用預設語言之語音

## v1.3

* 加入 unicode 設定功能
* 修正單數字不會自動切換的問題
* 修正數字模式在特定場景下失效問題
* 移除 v1.2 的第1驅動
* 調整程式結構並預支援更多 TTS

## v1.2

* 提供第 2 驅動核心,整體相比第 1 驅動核心順暢,無偶爾速度不一致與小爆音問題
* 第 2 驅動功能比照第 1 驅動包括數字模式、中文空白間隔、忽略文件中的語言資訊等選項
* 第 2 驅動提供各語音速度、音調、音量各別調整,但與第 1 驅動對應數值不同,亦即第 1 驅動的速度 50 與 第 2 驅動的速度 50 不會有相同的語音速度
* 修正數字模式在選擇各數值語音下時間與小數點無正確朗讀的問題
* 修正無定義字元地區資訊時不朗讀的問題
* 修正數字模式在選擇各數字語音下無正確使用選擇的語音的問題
* 調整數字模式與忽略文件中的語言資訊處理順序,更符合預期朗讀邏輯

## v1.1

* 新增數字模式的選項,可選擇有安裝的語言朗讀數字並可分為數值與數字兩種。
* 新增忽略文件中的語言資訊的選項,此主要是避免自動切換語言勾選且原始文件就有提供語言資訊但不正確時(例如中文文字確標示英文語言)可能導致無法正確朗讀;或是在 word 數字會被標示成英文語言導致自動改用英文語音朗讀的狀況。
* 優化中文空白間隔,使中文物件與中文屬性間亦可停頓
* 加入其他中文語系的介面翻譯
* 略過從設定檔載入變聲功能,因目前 VE driver 底層的變聲功能無法正常使用且換語音時容易因設定值不符載入失敗導致要刪整個設定檔才能解決
* 合併 VE driver 3.1.2 的更新
* 其他細部優化
* 更新說明文件
* 移除部份選單

0 comments on commit 1f40328

Please sign in to comment.