470,848 Members | 1,447 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,848 developers. It's quick & easy.

Microsoft SAPI problem with PHP

Hi!

As I've found tons of VB and C# sample codes, I was trying to transform

it into PHP code, using the COM objects. My aim is to create a simple
html, that creates a wav from a text. Here's what I've tried -the php
script part-:
$Voice = new COM("SAPI.SpVoice");//works
//com_load_typelib("SAPI.SpVoice"); //This doesn't help...
$Voice->Speak("Hello!"); //works
$FileStream = new COM("SAPI.SpFileStream"); //works - I mean no error
$FileMode = SpeechStreamFileMode.SSFMCreateForWrite;// = 3 //works -
no error
$FileStream->Open("c:\a.wav", 3, false); //works - no error
$Voice->AllowAudioOutputFormatChangesOnNextSet = false; //works - no
error
$Voice->AudioOutputStream = $FileStream; //HERE'S THE PROBLEM
$Voice->Speak("Hello world",1);
$FileStream->Close();
Here's the error I get for that line:
Uncaught exception 'com_exception' with message 'Error [0x80020003]
Member not found
Can anyone please help?
Thanks, Peter

Mar 17 '06 #1
0 1893

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by AndyNY | last post: by
reply views Thread by Bob | last post: by
2 posts views Thread by Winston Wong | last post: by
1 post views Thread by New Devil | last post: by
1 post views Thread by weheh | last post: by
1 post views Thread by tomfox | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.