Hi! I got the following code:
<?php
function SpeakText($text)
{
$VoiceObj = new COM("SAPI.SpVoice");
// Voice ID: 1, 4
$VoiceObj->Voice = $VoiceObj->GetVoices()->Item(4);
$VoiceObj->Rate = "0";
$VoiceObj->Speak($text);
unset($VoiceObj);
}
?>
And the following error:
Fatal error: Uncaught exception 'com_exception' with message 'Error
Member not found. ' in C:\Program Files\Apache
Group\Apache2\htdocs\speech.php:7 Stack trace: #0 C:\Program
Files\Apache Group\Apache2\htdocs\speech.php(7): SpeakText() #1
C:\Program Files\Apache Group\Apache2\htdocs\index.php(3):
SpeakText('Welcome!') #2 {main} thrown in C:\Program Files\Apache
Group\Apache2\htdocs\speech.php on line 7
Can anyone please help me? I don't understand why do I have this problem
when setting the voice.
Best regards,
Sabin Finateanu.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php