ID:               21852
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         COM related
 Operating System: W2K
 PHP Version:      4.3.0
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

this is not a php issue.


Previous Comments:
------------------------------------------------------------------------

[2003-01-23 19:40:39] [EMAIL PROTECTED]

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 this bug report at http://bugs.php.net/?id=21852&edit=1

Reply via email to