473,396 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 2070

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: AndyNY | last post by:
I am trying to write a dll in C# using SAPI 5.1 SDK. The DLL is supposed to take in a prerecorded WAV file and provide both the recognized text and a wav file created from Text to speech on the...
0
by: Bob | last post by:
I have a C# windows application that uses SAPI 5.1 speech recognition. I would like to use dynamic grammars but am having trouble finding the right command syntax and method parameters to use for...
2
by: Winston Wong | last post by:
Dear All, I am using MFC and SAPI 5.1. I want to get the pronunciation of a word. For example, give L"thank" and then get its pronunciation. Which function/class should I use? Many thanks!...
1
by: New Devil | last post by:
hi how can i use SAPI with TAPI in C# ... give me any idea how to make a simple program to use SAPI with TAPI in C# ........... Best Regards ibrahim@islamabad.net Ibrahim Zaman Posted Via...
17
by: MLH | last post by:
From time to time, I find myself cross checking one block of code against another. Usually older stuff in which I've made modifications that don't work. I don't remember what all the changes were...
0
by: Theo Kanter | last post by:
Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Lines: 22 Message-ID: <Ca52h.21400$E02.8869@newsb.telia.net> Date: Wed, 01 Nov 2006 17:53:38 GMT...
4
by: siggi | last post by:
Hi all, newbie question: I'd like to try speech synthesis with PythonWin 2.5. Problem ****** according to several instructions, such as found on...
1
by: weheh | last post by:
I'm running Python 2.3 and calling pyTTS. I've had it working forever. Today, I ran out of disk space. After deleting some of my personal files, for no apparent reason, pyTTS no longer runs. ...
1
by: tomfox | last post by:
Hi there, is there any tutorial on voice recognition in C# that explains the basic steps to create a simple VR application MSDN has some good tutorials unfortunately in C++. The only sample I...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.