A Wrap from this https://github.com/alshell7/VokaturiAndroid
Emotion recognition by speech in android.
vokaturi
Author: SMM
Version: 0.01
Sample :
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
or
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
Please note before your donation:
* You will get a wrapper for the current version with methods mentioned above , there is no promise of any kind that I will add a new feature in the future and updates will be only to fix bugs in my wrapper .
* You can ask any question here or by PM to prior to your donation to make sure this wrapper does what you need / want .
* A minimum of $5 (more is better ) is required to get this library .
 ) is required to get this library .
			
			Emotion recognition by speech in android.
vokaturi
Author: SMM
Version: 0.01
- emotionProbabilities
 Methods:- IsInitialized As Boolean
 - Anger As Double [read only]
- Fear As Double [read only]
- Happiness As Double [read only]
- Neutrality As Double [read only]
- Sadness As Double [read only]
- scaledValues As Int [write only]
 
- vokaturi
 Events:- _success (re As EmotionProbabilities)
- _error (err as string As )
 - AnalyzeForEmotionsAsync (folderName As String, fileName As String)
- Initialize (EventName As String)
- startListeningForSpeech
- stopListeningAndAnalyze As EmotionProbabilitiesWrapper
 - android.permission.RECORD_AUDIO
- android.permission.WRITE_EXTERNAL_STORAGE
 
Sample :
			
				B4X:
			
		
		
		Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    Dim vk As vokaturi
End Sub
Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")
    vk.Initialize("vk")
   
End Sub
Sub Activity_longclick
    Dim probs As emotionProbabilities
    probs=vk.stopListeningAndAnalyze
    If probs.IsInitialized Then
    probs.scaledValues=5
    Log("Anger "&probs.Anger)
    Log("Fear "&probs.Fear)
    Log("Happiness "&probs.Happiness)
    Log("Neutrality "&probs.Neutrality)
    Log("Sadness "&probs.Sadness)   
    Else
        Log("Not Initialized")   
    End If
   
End Sub
Sub Activity_click
    vk.startListeningForSpeech
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub vk_error(msg As String)
    Log(msg)
End Sub
			
				B4X:
			
		
		
		Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    Dim vk As vokaturi
End Sub
Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")
    vk.Initialize("vk")
   
End Sub
Sub Activity_click
    If File.Exists(File.DirRootExternal,"man1_nb.wav") = False Then
        File.Copy(File.DirAssets,"man1_nb.wav",File.DirRootExternal,"man1_nb.wav")
    End If
    vk.AnalyzeForEmotionsAsync(File.DirRootExternal,"man1_nb.wav")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub vk_success(re As emotionProbabilities)
    re.scaledValues=3
    Log(re)
End Sub
Sub vk_error(msg As String)
    Log(msg)
End Sub
			
				B4X:
			
		
		
		(EmotionProbabilities) Neutrality: 0.975, Happiness: 0.0, Sadness: 0.025, Anger: 0.0, Fear: 0.0Please note before your donation:
* You will get a wrapper for the current version with methods mentioned above , there is no promise of any kind that I will add a new feature in the future and updates will be only to fix bugs in my wrapper .
* You can ask any question here or by PM to prior to your donation to make sure this wrapper does what you need / want .
* A minimum of $5 (more is better
 
				 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		