Voice Recognition Help Please!

T8TRG8TR

New Member
I'm trying to use the voice recognition in B4A but I keep on getting the error message:

Compiling code. Error
Error parsing program.
Error description: Unknown type: voicerecognition
Are you missing a library reference?
Occurred on line: 5
Dim VR As VoiceRecognition

Here is my code:
B4X:
'Activity module
Sub Process_Globals
   'These global variables will be declared once when the application starts.
   'These variables can be accessed from all modules.
Dim VR As VoiceRecognition
End Sub

Sub Globals
   'These global variables will be redeclared each time the activity is created.
   'These variables can only be accessed from this module.
End Sub

Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("VR1")
VR.Initialize("VR")
VR.Listen
End Sub

Sub btnBegin_Click
VR.Listen
End Sub

Sub VR_Result (Success As Boolean, Texts As List)
   If Success = True Then
   For i = 0 To Texts.Size -1
   Log (Texts.Get(i))
   Next
   End If   
End Sub

Sub Activity_Resume

End Sub

Any suggestions?

PS: Can you test the VR in the emulator?
 

mistermentality

Active Member
Licensed User
Longtime User
I haven't really used voice recognition but if I recall correctly you need to have the Phone library ticked in the Library section of the ide (right hand side) hence your error message.

Dave
 
Upvote 0

Merlot2309

Active Member
Licensed User
Longtime User
Hello,

Just to be sure: did you just get an official version?
In the C:\Program Files\Anywhere Software\Basic4android dir there should be a Libraries dir with .jar and .xml files.

If not, I would suggest to de- and reinstall B4A.

Helen.
 
Upvote 0

T8TRG8TR

New Member
Hello,

Just to be sure: did you just get an official version?
In the C:\Program Files\Anywhere Software\Basic4android dir there should be a Libraries dir with .jar and .xml files.

If not, I would suggest to de- and reinstall B4A.

Helen.

I'm using the free trial right now. Is that why it won't work?
 
Upvote 0
Top