Jump to content

Recommended Posts

Posted
  On 8/24/2015 at 7:36 AM, Surya said:

I have already included an example in the udf if you want another one i will update it no worries 

If you think about:

----------Examples-----------
 (Transcription Audio)
$hm = _Utter_Voice_StartEngine()
_Utter_Voice_Transcribe($hm,@ScriptDir &"\intro.mp3","This is an example for transcription of audio",0,@ScriptDir &"\lame.exe")
_Utter_Voice_Shutdown()
SoundPlay (@ScriptDir &"\intro.mp3",1)

 (Grammar Example)
Local $handl = _Utter_Speech_StartEngine()
Local $txt1 = "Red is my favourite|Yellow is fine|blue colour reveals excitement|black is for speed|Green Colour"
Local $txt2 = "Colors|Animals are good|Regions|Country"
_Utter_Speech_CreateGrammar($handl,$txt1,$txt2)
_Utter_Speech_CreateTokens($handl)
_Utter_Speech_GrammarRecognize($handl,"Red",0)
While 1
Sleep (50)
ConsoleWrite (@CRLF &"Recognised=" &$UTTER_SPEECH_RECOGNIZE)
WEnd
_Utter_Speech_ShutdownEngine()
-------------Examples--------------------

 

Then I can tell you the better way is to make separate au3 file and zip it together with UDF and then put the ZIP file to the desired download "FILE"

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

Its ok, if you include an example in udf, the it will be ok.

Edit. Yes. mLipok is right. That is conventional method of submitting an UDF

Edited by kcvinu
  Reveal hidden contents

 

Posted

Any idea for this error?  In examples.

Include\Utter.au3"(712,74) : warning: $oMyError: possibly used before declaration.
             "err.description is: "    & @TAB & $oMyError.description    &

  • 3 weeks later...
Posted

@Surya, what happened ?

  Reveal hidden contents

 

  • 1 year later...
Posted (edited)

Please also udpate first post by adding download URL:

Regards,
mLipok

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

Link in opening post is still send you to the same thread instead to download section.
Please try to fix this again.

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

I am having difficulties on line 21 (Inside the switch) with the conditional AND. I want the case to execute when the user says both the words "minimize" and "windows" in a sentence. However, as I talk, the speech recognizer only checks word for word rather than an entire sentence. This causes the conditional not to work, because $cmd can never be "minimize windows" apparently. It can be either "minimize" or "windows", and that's the problem I am facing. 

#include "./Include/Utter.au3"

Global $sAssistanceName = "Jarvis"
Local $voc_1[] = [$sAssistanceName, "minimize", "everything", "windows"] ;Creates an array for recognition

$speechEngine = _Utter_Speech_StartEngine()
_Utter_Speech_CreateGrammar($speechEngine, $voc_1) ;Creates a grammar with the words
_Utter_Speech_CreateTokens($speechEngine) ;Creates a token for registering speech recognition
_Utter_Speech_GrammarRecognize($speechEngine, "", 0, "recognizeCommand") ;Starts the recognition and calls the word recognized

While 1
    Sleep (400)
    ConsoleWrite('$UTTER_SPEECH_RECOGNIZE: ' & $UTTER_SPEECH_RECOGNIZE & @CRLF)
WEnd

_Utter_Speech_ShutdownEngine() ;shutdowns the function

Func recognizeCommand($cmd)
    ConsoleWrite($cmd)
    Switch $cmd
        Case StringInStr($cmd,'minimize') AND StringInStr($cmd,'windows')
            WinMinimizeAll()
    EndSwitch
EndFunc

Here's the output from that loop. This is just for the sake of debugging. Notice how $UTTER_SPEECH_RECOGNIZE is not picking up both words as a single string, but instead two separate strings, no matter how fast you say the two words into the microphone.

$UTTER_SPEECH_RECOGNIZE: 
$UTTER_SPEECH_RECOGNIZE: 
$UTTER_SPEECH_RECOGNIZE: 
$UTTER_SPEECH_RECOGNIZE: 
$UTTER_SPEECH_RECOGNIZE: 
$UTTER_SPEECH_RECOGNIZE: 
minimize$UTTER_SPEECH_RECOGNIZE: minimize
$UTTER_SPEECH_RECOGNIZE: minimize
$UTTER_SPEECH_RECOGNIZE: minimize
$UTTER_SPEECH_RECOGNIZE: minimize
$UTTER_SPEECH_RECOGNIZE: minimize
$UTTER_SPEECH_RECOGNIZE: minimize
$UTTER_SPEECH_RECOGNIZE: minimize
$UTTER_SPEECH_RECOGNIZE: minimize
minimize$UTTER_SPEECH_RECOGNIZE: minimize
$UTTER_SPEECH_RECOGNIZE: minimize
windows$UTTER_SPEECH_RECOGNIZE: windows
$UTTER_SPEECH_RECOGNIZE: windows
$UTTER_SPEECH_RECOGNIZE: windows
$UTTER_SPEECH_RECOGNIZE: windows
$UTTER_SPEECH_RECOGNIZE: windows
$UTTER_SPEECH_RECOGNIZE: windows
$UTTER_SPEECH_RECOGNIZE: windows

>Process failed to respond; forcing abrupt termination...
>Exit code: 1    Time: 10.42

 

  • 10 months later...
Posted

Hello, thanks for the great tool. I cannot run examples in zip, i receive the error below. I can only run Example 1 (Voice).au3 which is text to speech example.

 

>Running:(3.3.14.4):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\umit\Downloads\Utter 3.0.0.1\Utter\Example 4 (Free Word Recognition).au3"    
--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
"C:\Users\umit\Downloads\Utter 3.0.0.1\Utter\Include\Utter.au3" (357) : ==> Variable must be of type "Object".:
$h_Recognizerm = $h_Contextm.Recognizer
$h_Recognizerm = $h_Contextm^ ERROR
->02:55:40 AutoIt3.exe ended.rc:1
+>02:55:40 AutoIt3Wrapper Finished.

 

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
×
×
  • Create New...