问题描述
Windows Vista允许您通过控制面板更改提供的单个语音的音高。是否有可以在VBA代码中设置以改变音高的SAPI(语音应用程序编程接口)语音引擎属性?下面是一个VBA代码
我正在开发的MS Access文本到语音转换程序中使用SAPI的示例。
Windows Vista allows you to change the pitch of the single voice provided by going through the Control Panel. Is there a SAPI (Speech Application Programming Interface) speech engine property that can be set in VBA code to change pitch? Below is a VBA code example of how I am using SAPI in an MS Access text-to-speech program I am developing.
谢谢。
设置VObj = CreateObject(" SAPI.SpVoice")
Set VObj = CreateObject("SAPI.SpVoice")
VObj.Volume = CInt(volumeSetting)
VObj.Volume = CInt(volumeSetting)
VObj.Speak strText
VObj.Speak strText
推荐答案
我查看了VBA中VObj的属性(调试模式,本地窗口) - 看起来没有与音高相关的内容。您可以设置音量和速率,从控制面板 - 声音 - (设备)中执行的任何操作都可以选择其他设置。从
控制面板所做的更改对于VObj没有影响。
I looked at the properties of VObj in VBA (Debug mode, Locals window) - looks like there is none related to pitch. You can set Volume and Rate, other settings are picked up from whatever you do from Control Panel - Sound - (Device). Changes made from Control Panel for pitch have no effect on VObj.
Nadia
这篇关于VBA代码在Windows Vista下设置SAPI Voice Pitch的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!