Updated example API code to support newest api
Now supports custom language recognition in GUI