Sign in to follow this  
Followers 0
Philip Bennefall

Speech recognition

10 posts in this topic

Hi everyone.

I'd like to add in simple speech recognition into my AutoIt program, using a dll directly or an Active X object doesn't matter. All I want to do is have some phrases that I can set, and have it activate a function once it finds one that it recognizes. This should be possible with the ObjectEvent function, I think...

Does anyone know of a sollution? I'd be greatful for some advice, or even better, sample code.

Thank's!

/Philip Bennefall

Share this post


Link to post
Share on other sites



Hi everyone.

I'd like to add in simple speech recognition into my AutoIt program, using a dll directly or an Active X object doesn't matter. All I want to do is have some phrases that I can set, and have it activate a function once it finds one that it recognizes. This should be possible with the ObjectEvent function, I think...

Does anyone know of a sollution? I'd be greatful for some advice, or even better, sample code.

Thank's!

/Philip Bennefall

<{POST_SNAPBACK}>

check the forums for a topic like 'i know this has been asked before' in the last week that post was on the same subject, and the person who started found a link to the Microsoft Speech Recognition SDK that would have example code and documentation as well as any dll's you'd need etc, because speech recognition is not something that would be included in the OS dll's. You could use the DLL's you already have to record a sound, but comparing a recorded sound to a saved sound is not the same as actual recognition software...

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

; AutoItCOM 3.1.1.x beta
;
; COM Test file
;
; Test usage of Events with SAPI
;
; NOTE: To be able to run this example, you must first
;      download and install the Microsoft SAPI SDK 5.1
;       http://www.microsoft.com/speech/download/sdk51/
;
; See also: http://www.microsoft.com/speech/techinfo/apioverview/
;
; And..READ the documentation carefully! Speech recognition is very complex stuff !

#include "GUIConstants.au3"

; Create a simple GUI for our output
GUICreate ( "Event Speech API Test", 640, 480 )
$GUIEdit=GUICtrlCreateEdit ( "Debug Log:" & @CRLF, 10, 10 , 600 , 400 )
GUISetState ()    ;Show GUI

$RecoContext=ObjCreate("SAPI.SpSharedRecoContext")
if @error then
    Msgbox(0,"","Error opening $RecoContext: " & @error)
    exit
endif



; Initialize our Event Handler
; Note: The default outgoing event interface will be: _ISpeechRecoContextEvents
$SinkObject=ObjEvent($RecoContext,"MYEvent_")
if @error then 
  GUICtrlSetData ( $GUIEdit, "ObjEvent error: " & @error & @CRLF  , "append" )
else
  GUICtrlSetData ( $GUIEdit, "ObjEvent created Successfully!" & @CRLF  , "append" )

 ;Imported from: SAPI.H
  $SPRS_INACTIVE    = 0
  $SPRS_ACTIVE  = 1
  $SGDSActive=$SPRS_ACTIVE
  $SGDSInactive=$SPRS_INACTIVE

  $Grammar = $RecoContext.CreateGrammar(1)
  $Grammar.Dictationload
  $Grammar.DictationSetState($SGDSActive)

 ; Dictation starts here...you may speak now ! 

  GUICtrlSetData ( $GUIEdit, "You have 10 seconds speaking time now...open your microphone and say something !" & @CRLF  , "append" )
  sleep(10000) 

 ; Stop dictation
  $Grammar.DictationSetState($SGDSInactive)

endif

  sleep (5000); Some events arrive late...

  GUICtrlSetData ( $GUIEdit, @CRLF & "End of dictation time." & @CRLF , "append" )
  GUICtrlSetData ( $GUIEdit, "You may close this window now !" & @CRLF , "append" )
  
 ; Waiting for user to close the window
  While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
  Wend

  GUIDelete ()

  exit




;--------------------
; SAPI Event functions

Func MYEvent_StartStream($StreamNumber, $StreamPosition)
;    StreamNumber As Long,
;    StreamPosition As Variant

 GUICtrlSetData ( $GUIEdit, "StartStream(): StreamNumber is:" & $StreamNumber & @CRLF  , "append" )

EndFunc


Func MYEvent_Hypothesis($StreamNumber,$StreamPosition,$Result )
;    StreamNumber As Long,
;    StreamPosition As Variant,
;    Result As ISpeechRecoResult

GUICtrlSetData ( $GUIEdit, "Hypothesis(): Hypothized text is: " & $Result.PhraseInfo.GetText & @CRLF  , "append" )

EndFunc


Func MYEvent_Interference($StreamNumber,$StreamPosition,$Interference)
;    StreamNumber As Long,
;    StreamPosition As Variant,
;    Interference As SpeechInterference

GUICtrlSetData ( $GUIEdit, "Interference(): StreamNumber is:" & $StreamNumber & @CRLF  , "append" )

EndFunc


Func MYEvent_Recognition($StreamNumber,$StreamPosition,$RecognitionType,$Result)
;   StreamNumber As Long,
;   StreamPosition As Variant,
;   RecognitionType As SpeechRecognitionType,
;   Result As ISpeechRecoResult

GUICtrlSetData ( $GUIEdit, "Recognition(): Recognized text is: " & $Result.PhraseInfo.GetText & @CRLF  , "append" )

EndFunc



; SAPI has MANY more Events, but we won't use these here

Func MYEvent_SoundEnd($StreamNumber,$StreamPosition)
;    StreamNumber As Long,
;    StreamPosition As Variant

;GUICtrlSetData ( $GUIEdit, "SoundEnd(): StreamNumber is:" & $StreamNumber & @CRLF  , "append" )

EndFunc

Func MYEvent_EndStream($StreamNumber,$StreamPosition,$StreamReleased)
;    StreamNumber As Long,
;    StreamPosition As Variant,
;    StreamReleased As Boolean

; GUICtrlSetData ( $GUIEdit, "EndStream(): StreamNumber is:" & $StreamNumber & @CRLF  , "append" )
; GUICtrlSetData ( $GUIEdit, "EndStream(): StreamReleased is:" & $StreamReleased & @CRLF  , "append" )

EndFunc


Func MYEvent_SoundStart($StreamNumber,$StreamPosition)
;    StreamNumber As Long,
;    StreamPosition As Variant

;GUICtrlSetData ( $GUIEdit, "SoundStart(), StreamNumber is: " & $StreamNumber & @CRLF  , "append" )
;GUICtrlSetData ( $GUIEdit, "SoundStart(): StreamPosition is:" & $StreamPosition & @CRLF  , "append" )

EndFunc


Func MYEvent_PhraseStart($StreamNumber,$StreamPosition)
;    StreamNumber As Long,
;    StreamPosition As Variant

;GUICtrlSetData ( $GUIEdit, "PhraseStart(): StreamNumber is:" & $StreamNumber & @CRLF  , "append" )

EndFunc

In the beta tests.

Share this post


Link to post
Share on other sites

; AutoItCOM 3.1.1.x beta
;
; COM Test file
;
; Test usage of Events with SAPI
;
; NOTE: To be able to run this example, you must first
;       download and install the Microsoft SAPI SDK 5.1
;        http://www.microsoft.com/speech/download/sdk51/
;
; See also: http://www.microsoft.com/speech/techinfo/apioverview/
;
; And..READ the documentation carefully! Speech recognition is very complex stuff !

#include "GUIConstants.au3"

; Create a simple GUI for our output
GUICreate ( "Event Speech API Test", 640, 480 )
$GUIEdit=GUICtrlCreateEdit ( "Debug Log:" & @CRLF, 10, 10 , 600 , 400 )
GUISetState ()      ;Show GUI

$RecoContext=ObjCreate("SAPI.SpSharedRecoContext")
if @error then
    Msgbox(0,"","Error opening $RecoContext: " & @error)
    exit
endif
; Initialize our Event Handler
; Note: The default outgoing event interface will be: _ISpeechRecoContextEvents
$SinkObject=ObjEvent($RecoContext,"MYEvent_")
if @error then 
  GUICtrlSetData ( $GUIEdit, "ObjEvent error: " & @error & @CRLF  , "append" )
else
  GUICtrlSetData ( $GUIEdit, "ObjEvent created Successfully!" & @CRLF  , "append" )

;Imported from: SAPI.H
  $SPRS_INACTIVE    = 0
  $SPRS_ACTIVE    = 1
  $SGDSActive=$SPRS_ACTIVE
  $SGDSInactive=$SPRS_INACTIVE

  $Grammar = $RecoContext.CreateGrammar(1)
  $Grammar.Dictationload
  $Grammar.DictationSetState($SGDSActive)

; Dictation starts here...you may speak now ! 

  GUICtrlSetData ( $GUIEdit, "You have 10 seconds speaking time now...open your microphone and say something !" & @CRLF  , "append" )
  sleep(10000) 

; Stop dictation
  $Grammar.DictationSetState($SGDSInactive)

endif

  sleep (5000); Some events arrive late...

  GUICtrlSetData ( $GUIEdit, @CRLF & "End of dictation time." & @CRLF , "append" )
  GUICtrlSetData ( $GUIEdit, "You may close this window now !" & @CRLF , "append" )
  
; Waiting for user to close the window
  While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
  Wend

  GUIDelete ()

  exit
;--------------------
; SAPI Event functions

Func MYEvent_StartStream($StreamNumber, $StreamPosition)
;     StreamNumber As Long,
;     StreamPosition As Variant

 GUICtrlSetData ( $GUIEdit, "StartStream(): StreamNumber is:" & $StreamNumber & @CRLF  , "append" )

EndFunc
Func MYEvent_Hypothesis($StreamNumber,$StreamPosition,$Result )
;     StreamNumber As Long,
;     StreamPosition As Variant,
;     Result As ISpeechRecoResult

GUICtrlSetData ( $GUIEdit, "Hypothesis(): Hypothized text is: " & $Result.PhraseInfo.GetText & @CRLF  , "append" )

EndFunc
Func MYEvent_Interference($StreamNumber,$StreamPosition,$Interference)
;     StreamNumber As Long,
;     StreamPosition As Variant,
;     Interference As SpeechInterference

GUICtrlSetData ( $GUIEdit, "Interference(): StreamNumber is:" & $StreamNumber & @CRLF  , "append" )

EndFunc
Func MYEvent_Recognition($StreamNumber,$StreamPosition,$RecognitionType,$Result)
;    StreamNumber As Long,
;    StreamPosition As Variant,
;    RecognitionType As SpeechRecognitionType,
;    Result As ISpeechRecoResult

GUICtrlSetData ( $GUIEdit, "Recognition(): Recognized text is: " & $Result.PhraseInfo.GetText & @CRLF  , "append" )

EndFunc
; SAPI has MANY more Events, but we won't use these here

Func MYEvent_SoundEnd($StreamNumber,$StreamPosition)
;     StreamNumber As Long,
;     StreamPosition As Variant

;GUICtrlSetData ( $GUIEdit, "SoundEnd(): StreamNumber is:" & $StreamNumber & @CRLF  , "append" )

EndFunc

Func MYEvent_EndStream($StreamNumber,$StreamPosition,$StreamReleased)
;     StreamNumber As Long,
;     StreamPosition As Variant,
;     StreamReleased As Boolean

; GUICtrlSetData ( $GUIEdit, "EndStream(): StreamNumber is:" & $StreamNumber & @CRLF  , "append" )
; GUICtrlSetData ( $GUIEdit, "EndStream(): StreamReleased is:" & $StreamReleased & @CRLF  , "append" )

EndFunc
Func MYEvent_SoundStart($StreamNumber,$StreamPosition)
;     StreamNumber As Long,
;     StreamPosition As Variant

;GUICtrlSetData ( $GUIEdit, "SoundStart(), StreamNumber is: " & $StreamNumber & @CRLF  , "append" )
;GUICtrlSetData ( $GUIEdit, "SoundStart(): StreamPosition is:" & $StreamPosition & @CRLF  , "append" )

EndFunc
Func MYEvent_PhraseStart($StreamNumber,$StreamPosition)
;     StreamNumber As Long,
;     StreamPosition As Variant

;GUICtrlSetData ( $GUIEdit, "PhraseStart(): StreamNumber is:" & $StreamNumber & @CRLF  , "append" )

EndFunc

In the beta tests.

<{POST_SNAPBACK}>

Thanks for the code man. hey, question for you, i went to your site and got that winpong you made, good stuff. Are you able to control the paddles? didn't look like it in the code but i kind of glanced over it... If no, do you mind if i modify it to make it a functioning game rather than a.... hm... screensaver?

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

Are you able to control the paddles?

You can go to the left or right settings menu and pick mouse.

Yes you can modify it if you want to.

Share this post


Link to post
Share on other sites

You can go to the left or right settings menu and pick mouse.

Yes you can modify it if you want to.

<{POST_SNAPBACK}>

i'm an idiot. i didn't even see the settings at the top... nice work man

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

i'm an idiot. i didn't even see the settings at the top... nice work man

<{POST_SNAPBACK}>

i think i found an issue...it looks to me like the right paddle moves same speed as ball, effectively making it impossible to win...

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

; AutoItCOM 3.1.1.x beta
;
; COM Test file
;
; Test usage of Events with SAPI
;
; NOTE: To be able to run this example, you must first
;      download and install the Microsoft SAPI SDK 5.1
;       http://www.microsoft.com/speech/download/sdk51/
;
; See also: http://www.microsoft.com/speech/techinfo/apioverview/
;
; And..READ the documentation carefully! Speech recognition is very complex stuff !

#include "GUIConstants.au3"

; Create a simple GUI for our output
GUICreate ( "Event Speech API Test", 640, 480 )
$GUIEdit=GUICtrlCreateEdit ( "Debug Log:" & @CRLF, 10, 10 , 600 , 400 )
GUISetState ()   ;Show GUI

$RecoContext=ObjCreate("SAPI.SpSharedRecoContext")
if @error then
    Msgbox(0,"","Error opening $RecoContext: " & @error)
    exit
endif
; Initialize our Event Handler
; Note: The default outgoing event interface will be: _ISpeechRecoContextEvents
$SinkObject=ObjEvent($RecoContext,"MYEvent_")
if @error then 
  GUICtrlSetData ( $GUIEdit, "ObjEvent error: " & @error & @CRLF  , "append" )
else
  GUICtrlSetData ( $GUIEdit, "ObjEvent created Successfully!" & @CRLF  , "append" )

;Imported from: SAPI.H
  $SPRS_INACTIVE    = 0
  $SPRS_ACTIVE  = 1
  $SGDSActive=$SPRS_ACTIVE
  $SGDSInactive=$SPRS_INACTIVE

  $Grammar = $RecoContext.CreateGrammar(1)
  $Grammar.Dictationload
  $Grammar.DictationSetState($SGDSActive)

; Dictation starts here...you may speak now ! 

  GUICtrlSetData ( $GUIEdit, "You have 10 seconds speaking time now...open your microphone and say something !" & @CRLF  , "append" )
  sleep(10000) 

; Stop dictation
  $Grammar.DictationSetState($SGDSInactive)

endif

  sleep (5000); Some events arrive late...

  GUICtrlSetData ( $GUIEdit, @CRLF & "End of dictation time." & @CRLF , "append" )
  GUICtrlSetData ( $GUIEdit, "You may close this window now !" & @CRLF , "append" )
  
; Waiting for user to close the window
  While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
  Wend

  GUIDelete ()

  exit
;--------------------
; SAPI Event functions

Func MYEvent_StartStream($StreamNumber, $StreamPosition)
;    StreamNumber As Long,
;    StreamPosition As Variant

 GUICtrlSetData ( $GUIEdit, "StartStream(): StreamNumber is:" & $StreamNumber & @CRLF  , "append" )

EndFunc
Func MYEvent_Hypothesis($StreamNumber,$StreamPosition,$Result )
;    StreamNumber As Long,
;    StreamPosition As Variant,
;    Result As ISpeechRecoResult

GUICtrlSetData ( $GUIEdit, "Hypothesis(): Hypothized text is: " & $Result.PhraseInfo.GetText & @CRLF  , "append" )

EndFunc
Func MYEvent_Interference($StreamNumber,$StreamPosition,$Interference)
;    StreamNumber As Long,
;    StreamPosition As Variant,
;    Interference As SpeechInterference

GUICtrlSetData ( $GUIEdit, "Interference(): StreamNumber is:" & $StreamNumber & @CRLF  , "append" )

EndFunc
Func MYEvent_Recognition($StreamNumber,$StreamPosition,$RecognitionType,$Result)
;   StreamNumber As Long,
;   StreamPosition As Variant,
;   RecognitionType As SpeechRecognitionType,
;   Result As ISpeechRecoResult

GUICtrlSetData ( $GUIEdit, "Recognition(): Recognized text is: " & $Result.PhraseInfo.GetText & @CRLF  , "append" )

EndFunc
; SAPI has MANY more Events, but we won't use these here

Func MYEvent_SoundEnd($StreamNumber,$StreamPosition)
;    StreamNumber As Long,
;    StreamPosition As Variant

;GUICtrlSetData ( $GUIEdit, "SoundEnd(): StreamNumber is:" & $StreamNumber & @CRLF  , "append" )

EndFunc

Func MYEvent_EndStream($StreamNumber,$StreamPosition,$StreamReleased)
;    StreamNumber As Long,
;    StreamPosition As Variant,
;    StreamReleased As Boolean

; GUICtrlSetData ( $GUIEdit, "EndStream(): StreamNumber is:" & $StreamNumber & @CRLF  , "append" )
; GUICtrlSetData ( $GUIEdit, "EndStream(): StreamReleased is:" & $StreamReleased & @CRLF  , "append" )

EndFunc
Func MYEvent_SoundStart($StreamNumber,$StreamPosition)
;    StreamNumber As Long,
;    StreamPosition As Variant

;GUICtrlSetData ( $GUIEdit, "SoundStart(), StreamNumber is: " & $StreamNumber & @CRLF  , "append" )
;GUICtrlSetData ( $GUIEdit, "SoundStart(): StreamPosition is:" & $StreamPosition & @CRLF  , "append" )

EndFunc
Func MYEvent_PhraseStart($StreamNumber,$StreamPosition)
;    StreamNumber As Long,
;    StreamPosition As Variant

;GUICtrlSetData ( $GUIEdit, "PhraseStart(): StreamNumber is:" & $StreamNumber & @CRLF  , "append" )

EndFunc

In the beta tests.

GREAT CODE, I just have one question is there any way to simplify this to just return what I said once to a msgbo or something???

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

I hate to resurrect such an old thread, but...

When I change the example code to translate speech to text until closed with a hotkey, instead of running only for 10 seconds, it works fine for several seconds, then stops working. Is there something that needs to be done to allow the speech recognition to continue? Is there some state that needs to be reset when a phrase is returned as "recognized" or something?

#include "GUIConstants.au3"

; Create a simple GUI for our output
GUICreate("Event Speech API Test", 640, 480)
$GUIEdit = GUICtrlCreateEdit("Debug Log: (ESC to quit)" & @CRLF, 10, 10, 600, 400)
GUISetState();Show GUI

$RecoContext = ObjCreate("SAPI.SpSharedRecoContext")
If @error Then
    MsgBox(0, "", "Error opening $RecoContext: " & @error)
    Exit
EndIf
; Initialize our Event Handler
; Note: The default outgoing event interface will be: _ISpeechRecoContextEvents
; http://msdn.microsoft.com/en-us/library/ms722022(VS.85).aspx
$SinkObject = ObjEvent($RecoContext, "MYEvent_")
If @error Then
    GUICtrlSetData($GUIEdit, "ObjEvent error: " & @error & @CRLF, "append")
    Exit
EndIf

GUICtrlSetData($GUIEdit, "ObjEvent created Successfully!" & @CRLF, "append")

;Imported from: SAPI.H
Const $SPRS_INACTIVE = 0
Const $SPRS_ACTIVE = 1
$SGDSActive = $SPRS_ACTIVE
$SGDSInactive = $SPRS_INACTIVE

$Grammar = $RecoContext.CreateGrammar(1)
$Grammar.Dictationload
$Grammar.DictationSetState($SGDSActive)

; Dictation starts here...you may speak now !
GUICtrlSetData($GUIEdit, "Speak now...open your microphone and say something !" & @CRLF, "append")
HotKeySet("{ESC}", "done")

While 1
    Sleep(500)
WEnd


Exit
;===============================================================================
; Description:
; Parameter(s):
; Requirement(s):   None
; Return Value(s):
; Note(s):
;===============================================================================
Func done()
    HotKeySet("{ESC}")
    
; Stop dictation
    $Grammar.DictationSetState($SGDSInactive)
    GUICtrlSetData($GUIEdit, @CRLF & "End of dictation...." & @CRLF, "append")
    Sleep(1000); Some events arrive late...

    GUICtrlSetData($GUIEdit, "You may close this window now !" & @CRLF, "append")

    GUIDelete()
    Exit
EndFunc

;===============================================================================
; SAPI Event functions
;===============================================================================
Func MYEvent_StartStream($StreamNumber, $StreamPosition)
;    StreamNumber As Long,
;    StreamPosition As Variant

    GUICtrlSetData($GUIEdit, "StartStream(): StreamNumber is:" & $StreamNumber & @CRLF, "append")

EndFunc
Func MYEvent_Hypothesis($StreamNumber, $StreamPosition, $Result)
;    StreamNumber As Long,
;    StreamPosition As Variant,
;    Result As ISpeechRecoResult

    GUICtrlSetData($GUIEdit, "Hypothesis(): Hypothized text is: " & $Result.PhraseInfo.GetText & @CRLF, "append")

EndFunc
Func MYEvent_Interference($StreamNumber, $StreamPosition, $Interference)
;    StreamNumber As Long,
;    StreamPosition As Variant,
;    Interference As SpeechInterference

    GUICtrlSetData($GUIEdit, "Interference(): StreamNumber is:" & $StreamNumber & @CRLF, "append")

EndFunc
Func MYEvent_Recognition($StreamNumber, $StreamPosition, $RecognitionType, $Result)
;   StreamNumber As Long,
;   StreamPosition As Variant,
;   RecognitionType As SpeechRecognitionType,
;   Result As ISpeechRecoResult

    GUICtrlSetData($GUIEdit, "Recognition(): Recognized text is: " & $Result.PhraseInfo.GetText & @CRLF)

EndFunc
; SAPI has MANY more Events, but we won't use these here

Func MYEvent_SoundEnd($StreamNumber, $StreamPosition)
;    StreamNumber As Long,
;    StreamPosition As Variant

    GUICtrlSetData($GUIEdit, "SoundEnd(): StreamNumber is:" & $StreamNumber & @CRLF, "append")

EndFunc

Func MYEvent_EndStream($StreamNumber, $StreamPosition, $StreamReleased)
;    StreamNumber As Long,
;    StreamPosition As Variant,
;    StreamReleased As Boolean

; GUICtrlSetData ( $GUIEdit, "EndStream(): StreamNumber is:" & $StreamNumber & @CRLF  , "append" )
; GUICtrlSetData ( $GUIEdit, "EndStream(): StreamReleased is:" & $StreamReleased & @CRLF  , "append" )

EndFunc
Func MYEvent_SoundStart($StreamNumber, $StreamPosition)
;    StreamNumber As Long,
;    StreamPosition As Variant

    GUICtrlSetData($GUIEdit, "SoundStart(), StreamNumber is: " & $StreamNumber & @CRLF, "append")
;GUICtrlSetData ( $GUIEdit, "SoundStart(): StreamPosition is:" & $StreamPosition & @CRLF  , "append" )

EndFunc
Func MYEvent_PhraseStart($StreamNumber, $StreamPosition)
;    StreamNumber As Long,
;    StreamPosition As Variant

    GUICtrlSetData($GUIEdit, "PhraseStart(): StreamNumber is:" & $StreamNumber & @CRLF, "append")

EndFunc
Edited by mlowery

Share this post


Link to post
Share on other sites

Here's a very very late reply :idea:

I've just created a SAPIListBox UDF that will allow an AutoIT script to respond to a spoken words / phrases from a predefined list of items. Click on this link to access the UDF.


Cheers, Sean.

See my other UDFs:

Chrome UDF - Automate Chrome | SAP UDF - Automate SAP | Java UDF - Automate Java Applications & Applets | Tesseract (OCR) UDF - Capture text from applications, controls and the desktop | Textract (OCR) UDF - Capture text from applications and controls | FileSystemMonitor UDF - File, Folder, Drive and Shell Monitoring | VLC (Media Player) UDF - Creating and controlling a VLC control in AutoIT | Google Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoIT | SAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBox | eBay UDF - Automate eBay using the eBay API | ChildProc (Parallel Processing) UDF - Parallel processing functions for AutoIT | HyperCam (Screen Recording) UDF - Automate the HyperCam screen recorder | Twitter UDF - Automate Twitter using OAuth and the Twitter API | cURL UDF - a UDF for transferring data with URL syntax

See my other Tools:

Rapid Menu Writer - Add menus to DVDs in seconds | TV Player - Automates the process of playing videos on an external TV / Monitor | Rapid Video Converter - A tool for resizing and reformatting videos | [topic130531]Rapid DVD Creator - Convert videos to DVD fast and for free | ZapPF - A tool for killing processes and recycling files | Sean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoIT | Sean's GUI Inspector - A scripting tool for querying GUIs | TransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey Planner | Automate Qt and QWidgets | Brisbane City Council Event Viewer - See what's going on in Brisbane, Australia

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0