Reply to Microsoft SAPI problem with PHP

Your name:

Reply:


Posted by matetelki on 03/17/06 19:31

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация