以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 XML在语音技术中的应用 』   (http://bbs.xml.org.cn/list.asp?boardid=47)
----  关于VXI的编译问题  (http://bbs.xml.org.cn/dispbbs.asp?boardid=47&rootid=&id=50782)


--  作者:yuyuanb7
--  发布时间:7/31/2007 5:01:00 PM

--  关于VXI的编译问题
当我编译过STLport-5.1.3后,在STLport-5.1.3\lib目录下产生了一系列的LIB文件,其中stlport.5.1.lib,stlportd.5.1.lib,但当我编译VXI时候,在编译VXI目录下的Makefile.nt文件时候,发现了问题:!error "Unable to find 'stlport_vc6_stldebug.lib' library file."
可以打开Makefile.nt文件,其中有这么一句:
     !include "..\make\i386-win32\make.defs"
     表明要包含make\i386-win32\make.defs ,我找到该文件,打开,发现存在这么一个判断:
    !if "$(CFG)" == "debug"
   !if exist ("$(STLPORTDIR)\lib\stlport_vc6_stldebug.lib")
   STL_LIBRARY_LIBS = "$(STLPORTDIR)\lib\stlport_vc6_stldebug.lib"
   CFLAGS_DEBUG = $(CFLAGS_DEBUG) -D_STLP_DEBUG -D_STLP_USE_DEBUG_LIB -   D_STLP_USE_EXCEPTIONS
   !else
   !error "Unable to find 'stlport_vc6_stldebug.lib' library file."
  !endif
   $(CFLAGS_DEBUG) 是指STLport-5.1.3的安装目录 ,可以看出是需要lib目录下的stlport_vc6_stldebug.lib文件,但我的lib下的文件却是stlport.5.1.lib,stlportd.5.1.lib,并没有发现stlport_vc6_stldebug.lib文件
    请高手解决下????是不是与STL版本有关系??
--  作者:yuyuanb7
--  发布时间:7/31/2007 5:06:00 PM

--  
我修改了make.defs 文件的这个判断:
   !if "$(CFG)" == "debug"
   !if exist ("$(STLPORTDIR)\lib\stlport_vc6_stldebug.lib")
   STL_LIBRARY_LIBS = "$(STLPORTDIR)\lib\stlport_vc6_stldebug.lib"
   CFLAGS_DEBUG = $(CFLAGS_DEBUG) -D_STLP_DEBUG -D_STLP_USE_DEBUG_LIB -   D_STLP_USE_EXCEPTIONS
   !else
   !error "Unable to find 'stlport_vc6_stldebug.lib' library file."
   !endif

   !if "$(CFG)" == "debug"
   !if exist ("$(STLPORTDIR)\lib\stlportd.5.1.lib")
   STL_LIBRARY_LIBS = "$(STLPORTDIR)\lib\stlportd.5.1.lib"
   CFLAGS_DEBUG = $(CFLAGS_DEBUG) -D_STLP_DEBUG -D_STLP_USE_DEBUG_LIB -   D_STLP_USE_EXCEPTIONS
   !else
   !error "Unable to find 'stlportd.5.1.lib' library file."
  !endif

却发现了其他问题!郁闷至极!!


--  作者:zhu_ruixian
--  发布时间:8/1/2007 10:08:00 AM

--  
OpenVXI和版本时有关系的,下面是OpenVXI的编译说明里面的内容:
MSVC++ 6.0 or later - OpenVXI has been tested with Visual Studio .NET and does not require STLPort.  However, it should still be possible to use it (the makefiles will have to be modified to account for a different lib name).
[URL=http://xml.apache.org/xerces-c/index.html]Xerces Version 2.6.0[/URL]
[URL=http://www.mozilla.org/js/spidermonkey/]SpiderMonkey 1.5rc6a[/URL]
[URL=http://www.openssl.org/]OpenSSL 0.9.7e[/URL]
Perl 5.6 or later
[URL=http://www.stlport.org/]STLPort[/URL] 4.6 or later (4.6.1 is not recommended since we have heard reports of runtime problems with OpenVXI and 4.6.1). As of this version of OpenVXI, the 5.0 RC version of STLPort has not been tested, and in fact creates a different lib name.  Alternatively any third party STL library (MSVC 6's STL has known robustness and threading problems, we do not recommend using that STL library). The makefile.rules will need to be modified for other 3rd party STL libraries.

既然脚本提示说  !error "Unable to find 'stlport_vc6_stldebug.lib' library file.",脚本的应该是为Visual C++6.0 写的,不知道你的编译器是什么版本? 还有就是如果用的是Visual Studio .NET
可以不使用STLPort(MSVC++ 6.0 or later - OpenVXI has been tested with Visual Studio .NET and does not require STLPort.  However, it should still be possible to use it (the makefiles will have to be modified to account for a different lib name). )。


--  作者:yuyuanb7
--  发布时间:8/9/2007 10:27:00 AM

--  
isual Studio .NET
可以不使用STLPort(MSVC++ 6.0 or later - OpenVXI has been tested with Visual Studio .NET and does not require STLPort.  However, it should still be possible to use it (the makefiles will have to be modified to account for a different lib name). )。
我用VC。NET2003时候出了点问题:
F:\study\papers\openvxi-3.4.1\src\swichar>nmake -f Makefile.nt CFG=debug

Microsoft (R) 程序维护实用工具 7.10.3077 版
版权所有 (C) Microsoft Corporation。保留所有权利。

PRODUCT_LIB_PREFIX not defined. Defaulting to SB
PRODUCT_LIB_PREFIX not defined. Defaulting to SB
        link -nologo -machine:I386 -incremental:no -fixed:no -MAP  kernel32.lib
user32.lib advapi32.lib  -out:build\i386-win32\debug\SBcharD.dll  -debug -pdb:bu
ild\i386-win32\debug\SBcharD.pdb  -release  -libpath:"F:\study\papers\openvxi-3.
4.1\lib"     -dll  -implib:build\i386-win32\debug\SBcharD.lib  -def:SWIchar.def
  @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nm1E2.tmp
LINK : fatal error LNK1104: 无法打开文件“stlport_vc7_stldebug.lib”
NMAKE : fatal error U1077: “link” : 返回代码“0x450”
Stop.
NMAKE : fatal error U1077: “"C:\Program Files\Microsoft Visual Studio .NET 2003
\VC7\BIN\nmake.exe"” : 返回代码“0x2”
Stop.

怎么会提示:无法打开文件“stlport_vc7_stldebug.lib”
上面说过:
However, it should still be possible to use it (the makefiles will have to be modified to account for a different lib name). )。
难道MAKEFILE文件要修改连接的LIB名字


--  作者:zhu_ruixian
--  发布时间:8/10/2007 10:20:00 PM

--  
无法打开文件“stlport_vc7_stldebug.lib”


如果文件存在,可能编译的时候文件被程序占用了。


--  作者:zhu_ruixian
--  发布时间:8/10/2007 10:34:00 PM

--  
http://bbs.xml.org.cn/dispbbs.asp?boardID=47&ID=38526    如果你想往上加功能,扩展就行了。
--  作者:yuyuanb7
--  发布时间:8/13/2007 11:27:00 AM

--  
我用VC6。0编译好了!
编译成功以后!生成了VXIclient.exe,不知道运行后的情况是怎么样?我的如下

Command-line arguments :
[-v ] [-version] [-url vxmlDocURL] [-channels nbChannels] [-config configFile]
[-calls maxCalls] [-delay nbSeconds] [-sbinet]
To show version specifiy either -v or -version
To run multiple channels, set nbChannels to desired number
To take unlimited calls, set maxCalls to -1
To simulate delay between call, set nbSeconds to desired seconds
-sbinet used by Vocalocity only to indicate sbinet is passed to OSR


===========================================================
vxmlDocURL: test\test.vxml
configFile: F:\study\papers\openvxi-3.4\config\SBclient.cfg (default)
nbChannels: 1, maxCalls: 1, nbSeconds: 0
===========================================================

Channel 0: Waiting for Call 1
Aug 13 11:24:39.12|176|0|60001|testClient::ChannelThread|About to call VXIplatfo
rmWaitForCall
Aug 13 11:24:39.12|176|0|60001|testClient::ChannelThread|In a Call
Channel 0: In a Call
Aug 13 11:24:39.40|176|0|60001|testClient::ChannelThread|NULL result
Aug 13 11:24:39.40|176|0|60001|testClient::ChannelThread|Call Terminated
Channel 0: Call Terminated
Successfully exiting
Press any key to continue

这个是不是正常运行后的结果?
感觉怎么没有解析test.vxml啊,用的是版主的例子中的那个test.vxml


--  作者:zhu_ruixian
--  发布时间:8/14/2007 11:16:00 PM

--  
不知道 你说的test.vxml 是不是这个:

<?xml version="1.0" encoding ="UTF-8"?>
<!DOCTYPE vxml PUBLIC "-//W3C//DTD VOICEXML 2.1//EN" "http://www.w3.org/TR/voicexml21/vxml.dtd">

<vxml version="2.1" xmlns:xsi="http://www/w3/org/2001/vxml"
xsi:schemaLocation="http://www.w3.org/TR/voicexml21/vxml.xsd">
   <meta name="Generator" content="Eclipse"/>
   <!-- Place Content Here -->
<form>
<block>
<prompt>I am a Chinese</prompt>
</block>
</form>

</vxml>


在VXIprompt.cpp中的VXIpromptPlay函数中加一句  printf("Verify Execute of VXI");再执行就可以验证了。


--  作者:yuyuanb7
--  发布时间:8/29/2007 10:06:00 AM

--  
在VXIprompt.cpp中的VXIpromptPlay函数中加一句  printf("Verify Execute of VXI");再执行就可以验证了。

我验证了下没有打印出这个结果。
不知道在什么地方调用了这个函数,是不是在这个函数中实现播放提示音


--  作者:zhu_ruixian
--  发布时间:8/29/2007 7:55:00 PM

--  
<?xml version="1.0" encoding ="UTF-8"?>
<!DOCTYPE vxml PUBLIC "-//W3C//DTD VOICEXML 2.1//EN" "http://www.w3.org/TR/voicexml21/vxml.dtd">

<vxml version="2.1" xmlns:xsi="http://www/w3/org/2001/vxml"
xsi:schemaLocation="http://www.w3.org/TR/voicexml21/vxml.xsd">
   <meta name="Generator" content="Eclipse"/>
   <!-- Place Content Here -->
<form>
<block>
<prompt>I am a Chinese</prompt>
</block>
</form>
</vxml>


static VXIpromptResult VXIpromptPlay(VXIpromptInterface * vxip)
{
  VXIpromptImpl *impl = ToVXIpromptImpl(vxip);
  Diag(impl, DIAG_TAG_PROMPTING, NULL, L"Playing queued prompts");
  //cout<<"The Count of :"<<(impl->TTSText.size())<<endl;
  vxistring tmp=impl->TTSText.front();
  impl->TTSText.pop();
  string tmp2;
  for(int index=0;index<tmp.size();index++){
  tmp2+=W2C(tmp[index]);
  }
  //cout<<"SSML Content:\n"<<tmp2.c_str()<<endl;
  SSMLParse parse(tmp2);
  string content;
  SSMLContentType type=parse.GetContentText(content);
  switch(type){
 case SSML_TTS_TEXT:
    cout<<"播放TTS:"<<content<<endl;
    {
     TTSPlayer ttsplay(content);
     ttsplay.Run();
    }
  break;
 case SSML_WAV_FILE:
  cout<<"播放语音文件:"<<content<<endl;
  {
   AudioPlayer audioplay(content);
   audioplay.Run();
  }
  break;
 default:
  cout<<"ERROR Type";
  }

  return VXIprompt_RESULT_SUCCESS;
}

执行结果:


D:\OpenVXI\bin>VXIclient.exe -config SBclient.cfg -url 3.vxml  -calls 1

Command-line arguments :
[-v ] [-version] [-url vxmlDocURL] [-channels nbChannels] [-config configFile]
[-calls maxCalls] [-delay nbSeconds] [-sbinet]
To show version specifiy either -v or -version
To run multiple channels, set nbChannels to desired number
To take unlimited calls, set maxCalls to -1
To simulate delay between call, set nbSeconds to desired seconds
-sbinet used by Vocalocity only to indicate sbinet is passed to OSR


===========================================================
vxmlDocURL: 3.vxml
configFile: SBclient.cfg
nbChannels: 1, maxCalls: 1, nbSeconds: 0
===========================================================

Channel 0: Waiting for Call 1
Aug 29 19:53:05.45|3164|0|60001|testClient::ChannelThread|About to call VXIplatformWaitForCall

=====================VXItelWaitForCall===========================
Aug 29 19:53:05.45|3164|0|60001|testClient::ChannelThread|In a Call
Channel 0: In a Call
播放TTS:I am a Chinese
Aug 29 19:53:07.25|3164|0|60001|testClient::ChannelThread|NULL result
Aug 29 19:53:07.25|3164|0|60001|testClient::ChannelThread|Call Terminated
Channel 0: Call Terminated
Successfully exiting

D:\VoiceXML\OpenVXI\bin>pause
请按任意键继续. . .


--  作者:zhu_ruixian
--  发布时间:8/29/2007 7:57:00 PM

--  
dll 文件比较多的时候  有时候代码添上去了  但是程序使用的仍然是原来的二进制文件  你应该确认一下是不是新的链接库文件。
--  作者:yuyuanb7
--  发布时间:8/30/2007 10:57:00 AM

--  
struct VXIpromptImpl {
  // Base interface, must be first
  VXIpromptInterfaceEx intf;

  // Log interface for this resource
  VXIlogInterface *log;

  // Internet fetch interface for this resource
  VXIinetInterface *inet;
};
里面并没有这个TTSText成员变量。
TTSText,SSMLParse,SSMLContentType,TTSPlayer,AudioPlayer是不是你自己封装的类啊?能否贴上!!


--  作者:zhu_ruixian
--  发布时间:8/30/2007 3:01:00 PM

--  
我以前贴过,在以前的帖子。不过这和你的问题本身没有关系。
--  作者:zhu_ruixian
--  发布时间:8/30/2007 10:29:00 PM

--  
见  http://bbs.xml.org.cn/dispbbs.asp?boardID=47&ID=41315
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
93.994ms