【实例简介】
当系统没有语音功能,无法运行时,使用win7 TTS修复工具(微软tts语音引擎修复)
现有的语音不好时,可心安装第三方语音,如:捷通华声 XiaoKun 女声 中英文、女音库Hui、Lily
解压后,运行regsvr.bat即可!
【实例截图】
【核心代码】
@echo off
@setlocal enabledelayedexpansion
robocopy ".\Common Files" "%ProgramFiles%\Common Files" /s
regsvr32.exe /s "%ProgramFiles%\Common Files\SpeechEngines\Microsoft\spcommon.dll"
regsvr32.exe /s "%ProgramFiles%\Common Files\Microsoft Shared\Speech\sapi.dll"
regsvr32.exe /s "%ProgramFiles%\Common Files\SpeechEngines\Microsoft\TTS\1033\spttseng.dll"
regsvr32.exe /s "%ProgramFiles%\Common Files\SpeechEngines\Microsoft\TTS\2052\spttschs.dll"
wmic cpu get addresswidth|more 1|find/i "32"
IF !ERRORLEVEL!==0 (
copy sapi.cpl %windir%\System32
set reg_dir=HKEY_LOCAL_MACHINE\SOFTWARE
regedit /s "speech.reg"
)
IF !ERRORLEVEL!==1 (
copy sapi.cpl %windir%\SysWOW64
set reg_dir=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node
regedit /s "speech64.reg"
)
exit