Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Speaking and audio
Message
 
To
21/12/2006 09:04:50
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01179442
Message ID:
01179591
Views:
8
Cetin,
Actually I made a mistake in my last post. It isn't the speaking that repeats, it
is the playing of the wave file that repeats. In this case the wave
file linked to beep. chr(7). And it only repeats if the BkSp key is pressed.
I would like to prevent that from happening.

This is what is getting repeated:
Set Bell to "c:\d\math\huki.wav"
?? Chr(7)
Here is the code:
PARAMETERS talkit
declare long ShellExecute in "shell32.dll" ;
	long hwnd, string lpszOp, ;
	string lpszFile, string lpszParams, ;
    string lpszDir, long nShowCmd
ShellExecute(0,'Open','c:\mp3\SomeSong.mp3','','',0)
*delay - song starts to play
Declare Sleep in win32API integer nMilli


	loSpeak = CREATEOBJECT("SAPI.SPVoice")
	IF mgender = 0 && try again
		Set Bell to "c:\d\math\piano.wav"
		?? Chr(7)
		Sleep(2000)

		loSpeak.Voice = loSpeak.GetVoices("gender=female").Item(0)
	endif
	IF mgender = 1
		Set Bell to "c:\d\math\huki.wav"
		?? Chr(7)
		Sleep(5500)
		loSpeak.Voice = loSpeak.GetVoices("gender=male").Item(0)
	endif
	loSpeak.SPEAK(talkit)
RETURN .t.
Previous
Reply
Map
View

Click here to load this message in the networking platform