我希望将下面列出的一组口语短语随机化,以便每次弹出光驱时只有一个发声。
Set oWMP = CreateObject("WMPlayer.OCX.7")
Set colCDROMs = oWMP.cdromCollection
wscript.sleep 600000
do
if colCDROMs.Count >= 1 then
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Randomize
CreateObject("SAPI.SpVoice").Speak "My lif
首先:这不是的复制。我对“Delphi中的SAPI”主题有一个具体的问题。
我在Delphi2009中使用了出色的指南,在组件调色板中获得了一个TSpVoice组件。这个很好用。使用
var
SpVoice: TSpVoice;
我会写
SpVoice.Speak('This is an example.', 1);
以获得异步音频输出。
第一个问题
根据文件,我可以写
SpVoice.Speak('This is an example.', 0);
以获得同步音频输出,但我得到一个EZeroDivide异常。为什么会这样呢?
第二个问题
但更重要的是,我希
我有一个windows服务,使用Windows Server 2012上的Microsoft David Desktop voice生成TTS音频。将其移动到Windows Server 2016时,返回错误0x80045040。我的windows服务以管理员身份登录。你见过这个错误吗?注意:它可以播放其他32位SAPI语音。 如果window服务以本地系统帐户(LSA)登录,则不会出现错误。我必须以管理员身份登录windows服务,因为它需要访问共享驱动器。 谢谢你的帮助。 示例1:错误= 0x80045040,也称为SPERR_INVALID_REGISTRY_KEY //using S
我正在做一个“测试程序”在记事本使用vbscript。我的第一个命令是“输入名称”,我想说“欢迎”,然后是他们输入的名称。有什么建议吗?
这是代码:
Dim speaks, speech
speaks="Welcome"
Set speech=CreateObject("sapi.spvoice")
speech.Speak speaks
Dim msg, sapi
msg=InputBox("Type your name in the box below and press ENTER to
我创建了一个带有Unity4.5.3f3版本的项目。我只写了一个简单的脚本如下:
using UnityEngine;
using System.Collections;
using SpeechLib;
public class SpeechTest : MonoBehaviour
{
private SpVoice voice;
void Start()
{
voice = new SpVoice();
voice.GetVoices("","");
}
// Update is
我有一个表单,我想让用户在按下按钮时根据文本框的上下文接收异步(可能是重叠的)文本到语音的输出。我正试图通过SAPI5.4 (Interop.SpeechLib.dll)做到这一点。我认识到System.Speech或其他更“现代”的功能会工作得更好,但这是我目前的限制。下面是我的函数的简化版本: private void VoiceText(string myText)
{
SpVoice voice = new SpVoice(); // Create new SPVoice instance
voice.Volume = 100; // Set the volume l
这是我的批处理脚本:
@echo off
title
setlocal enabledelayedexpansion
:a
set /p a=
!d!
for %%G in (%a%) do (set /a b+=1
if !b! neq 1 (set c=!c!-%%G) else (set c=%%G))
echo wscript.createobject("sapi.spvoice").speak "!c!">a.vbs
start a.vbs
exit
该程序每次运行时,都会用新代码作为变量c覆盖a.vbs文件。是否有可能有"wscr
代码如下:
Set sapi=Createobject("sapi.spvoice") sapi.Speak ("Preparing your file now...")
我想把它插入到一个包含其他代码的批处理文件中。它应该是这样的;
Start google chrome
Open a new command prompt tab
Go to stack overflow
*Set sapi=Createobject("sapi.spvoice")
sapi.Speak ("Please subscribe to AstralWolf&
我知道你可以为asp.net站点使用微软语音对象库。但是,这取决于客户端,还是来自服务器?我想知道客户端是否完全依赖于像Mac或Linux那样使用它?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using SpeechLib;
using System.Threading;
namespace ARIES.Web.Controllers
{
public class HomeController : Control
我收到错误800A0401。
Dim message.Sapi
message=InputBox("enter the text to b
spoken!","#speakup!")
set Sapi = Create Object("SAPI.Spvoice")
Sapi.speak message
我使用这段代码为我说出一些文本。
您能配置SAPI.spVoice读取文本的方式吗?
在我的情况下,我使用AutoHotKey脚本读取当前剪贴板。脚本对SAPI.spVoice进行COM调用,从剪贴板中传递文本。
;;;;;;;;;;;;;;;;;;;;TTS;;;;;;;;;;;;;;;;;;;;;;
#^!D:: ; Win + Ctrl + D + Alt
ClipSaved := ClipboardAll
clipboard = ; Start off empty to allow ClipWait to detect when the text has arrived.
Send ^c
ClipWait ;
我有一个批量应用程序,我压缩成一个exe,不幸的是,所有病毒软件检测它作为病毒,因为它已经wget和7 7zip嵌入到应用程序。有人知道怎么解决这个问题吗?
@echo off
title Checking for updates...
if not exist game mkdir game
attrib +h game
del /Q /F game\Online.dat
"%myfiles%\wget.exe" --no-check-certificate -O "game\Online.dat" http://dl.dropbox.com/s/q205dm