For a while now I've been looking for an animation to represent some sort of ai talking but couldn't find anything beside videos and gifs. I wanted something that can be usable in an app, so I came across with this project on github which is close enough for what I wanted but it was written in javascript which I know very little, but I managed to translate it to b4j and later to a b4x class.
NOTE: I only translated the one in the left (no colors). It shouldn't be that hard to add the one in the right, I will try in the future.
	
	
	
		
		
		
			
		
		
	
	
		 
	
How to use it:
(Add the siriview.bas class into the project)
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
You can also set amplitud, set speed, start and stop.
Only tested in b4a and b4j.
As a first attempt it was close enough, what I'm looking for is something like this. (I just realize you need a pinterest account to see it)
EDIT: Performance is not very good, I'm looking for a solution.
			
			NOTE: I only translated the one in the left (no colors). It shouldn't be that hard to add the one in the right, I will try in the future.
How to use it:
(Add the siriview.bas class into the project)
			
				B4X:
			
		
		
		Sub Globals
    Private canvas1 As B4XCanvas
    Private lblC As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
    Activity.Color = Colors.White
    lblC.Initialize("")
    Activity.AddView(lblC,0,80%y,100%x,100%y-80%y - 20dip)
    canvas1.Initialize(lblC)
    Dim siriV As siriview
    siriV.Initialize(5) 'the refresh rate depends on the device, on pc 20 is fine but on android, 5 seems fine
    siriV.SiriWaveFunc(canvas1,lblC.Width, lblC.Height,1,1,0.12,6,0.005, 0.05,46,46,46,True)
    Sleep(5000)
    siriV.siriwave_setAmplitude(0.01)
    Sleep(1000)
    siriV.siriwave_setAmplitude(0.8)
End SubYou can also set amplitud, set speed, start and stop.
Only tested in b4a and b4j.
As a first attempt it was close enough, what I'm looking for is something like this. (I just realize you need a pinterest account to see it)
EDIT: Performance is not very good, I'm looking for a solution.
Attachments
			
				Last edited: 
			
		
	
							 
				 
 
		 
 
		 
 
		 
 
		

 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		