From: [EMAIL PROTECTED] Operating system: W2K PHP version: 4.3.0 PHP Bug Type: COM related Bug description: Propput() fail on COM object (MS SAPI 5.1 TTS Voice Property)
I am not sure if this is a PHP bug or my inexperience with MS SAPI 5.1, but I saw a similiar problem (ID 15205) that was not resolved. I am using PHP 4.3/Apache 2.0.43/W2K and I can not set the Voice property with an object variable. THE CODE: // This instantiates the object $VoiceObj = new COM("SAPI.SpVoice") or die("Unable to instantiate SAPI"); // Gets the available voices and prints them $VoicesToken=$VoiceObj->GetVoices(); $NumberofVoices=$VoicesToken->Count; For ($i=0;$i<$NumberofVoices;$i++) { $VoiceToken=$VoicesToken->Item($i); $VoiceName[$i]=$VoiceToken->GetDescription(); print "$VoiceName[$i]................Item Number: $i </br>"; } // Gets and prints the id of the specified voice $SelectedVoiceToken=$VoicesToken->Item(1); $SelectedVoiceTokenid=$SelectedVoiceToken->id; print "$SelectedVoiceTokenid</br>"; // Tries to SET the voice (but fails) $VoiceObj->Voice=$SelectedVoiceToken; $VoiceName=$VoiceObj->Voice->GetDescription(); print "$VoiceName</br>"; // This changes the rate of the selected voice $VoiceObj->Rate = "0"; $VoiceObj->Speak("Hello, welcome to my website"); unset($VoiceObj); THE RESULTS: Microsoft Mary................Item Number: 0 ATT DTNV 1.3 Crystal16................Item Number: 1 ATT DTNV 1.3 Mike................Item Number: 2 LH Michael................Item Number: 3 LH Michelle................Item Number: 4 ATT DTNV 1.3 Crystal................Item Number: 5 Microsoft Mike................Item Number: 6 Microsoft Sam................Item Number: 7 Sample TTS Voice................Item Number: 8 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\ATT-DT-13-Crystal16 Warning: main(): PropPut() failed: Member not found. in C:\talk.php on line59 Microsoft Mary Joe Londa -- Edit bug report at http://bugs.php.net/?id=21852&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=21852&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=21852&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=21852&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=21852&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=21852&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=21852&r=support Expected behavior: http://bugs.php.net/fix.php?id=21852&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=21852&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=21852&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=21852&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21852&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=21852&r=dst IIS Stability: http://bugs.php.net/fix.php?id=21852&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=21852&r=gnused