Wednesday, August 20, 2014

Recognizing Speech on Android

Tonight I'll be giving a talk at Android Montreal. In this talk I’ll show you how to use speech recognition in your own Android apps.

The talk will have something for both beginner and advanced Android devs, namely I will show two ways to do speech recognition: the easy way (using the built-in RecognizerIntent for the user’s language) and the hard way (building a recognizer which wraps existing open source libraries if the built-in RecognizerIntent can’t handle the user’s language).


While I was in Batumi my friends and I built an app so that Kartuli users (code) (slides) (installer) could train their Androids to recognize SMS messages and web searches.



Recognizing Kartuli is one of the cases where you can’t use the built-in recognizer. Kartuli spoken by only 4 million people in the country of Georgia: that is roughly the population of Montreal and surrounding areas.

CaucasusLayout_rev.png

The talk will start with a demo of our Kartuli trainer app to set the context for the talk, and then dig into the code and Android concepts under the demo.
  • * How to use the default system recognizer’s results in your own Android projects,
  • * How to use the NDK in your projects,
  • * How to use PocketSphinx (a lightweight recognizer library written in C) on Android

Live broadcast on YouTube:

http://youtu.be/XNIS0hTzGIA

Friday, March 28, 2014

SMILE is patent pending

This morning Google now let me know that something new had been posted on the Sphinx site.

Google Now has started letting me know if websites I visit often have posted new content,
pretty awesome...


It was an Android app that lets users embed voice data in pictures (along with sharing pictures and doing speech recognition). I went to the play store, the app looked medium unprofessional so I visited their website. They were "seasoned" machine learning experts, but their mobile site had no indication of who they were.

"Seasoned entrepreneurs ... with deep experience in AI and machine learning"

So I said, I like Sphinx, let's see how they used it. I installed their app and giggled out loud at the "patent pending" splash screen. What are they patenting, certainly not Sphinx, certainly not speech recognition, certainly not the ability to take a picture on a smartphone and share it. It must be the embedded voice metadata, which I assume is why they aren't using the built in speech recognition which is far more accurate than Sphinx.
"Patent Pending" technology by seasoned technologists...
It even comes with a splash screen :)
I sent them a few bug reports, it looks as though their app was built maybe a year ago, or at least by someone with limited Android experience and wasn't tested using the camera on Android 4.3...

"Unfortunately Smile has stopped..."

Tuesday, March 25, 2014

Day 11 - The fish market

Tonight we walked through the port to the north side to get to the fish market (1.5 kilometers) to buy fish, and have it cooked next door.

We expected it would be closed but we caught them just as they were closing.
Fish range from 3 lari to 25 lari a kilo


Grilled/fried next door for 3 lari a kilo (beer was also 3 lari a pint).

Monday, March 24, 2014

Day 10 - Working on the beach and Georgian red beans

I went over the university in the morning to help debug an SDK manager that kept closing on Windows. Not knowing Windows, we just gave up and just reinstalled the ADT bundle. 

Then spent some hours with my notes from the day before doing data entry and cleaning on the beach.
My new "office" an excellent place to enter data...


At night I met some cyclists who were biking from England and Italy to Australia and China respectively, and we went for wine and food at Keti's restaurant ;)
Georgian red beans (3 lari) were delicious, with fresh onion and cilantro :)

Sunday, March 23, 2014

Day 9 - The speed of the internet

In the morning Nato taught me how to say my age and other things that you might find in a beginner class. It was cute. Meanwhile, I was talking about grape vines using Google translate offline on my Android. Her vines were just budding, about two months before Montreal ;) I also learned the word for good, /kargi/ I had been hearing it all over the place but didn't know what it meant until I said 'good' and decided to elicit it in case it could be used as a discourse particle, sure enough, it is a very very popular particle ;)

Other translations on Google Translate were just transliterations, and rather comical :)

In the afternoon I bought a WiFi router and set it up at Natalya's house. I forgot to ask the speed there before I decided to rent the room. I found out it was only 500kb down and 10kb up.  Almost a dial up connection from the 90's...

DSL in Batumi can be very very slow, in this case 500kb down and 100kb up.
At that rate it would take 2 hours to deploy...



I had to choose between Georgian immersion, or productivity. It was a very difficult decision and very hard to explain in Georgian to my would-be host family,  but after investigating apartments with Ia, I decided to rent an attic room at a hostel where there was a strong connection and always people around.

There is a window and a table, and by adding my new wifi router, guests will be able to use the internet even out in the back dorm. Tamilla, Esma, Nino and the director are super sweet and are keen to speak to me in Georgian and of course practice English with me ;)

Saturday, March 22, 2014

Day 8 - Sunset on the Black Sea

Today I moved to my new place and met new friends at the sunset on Pier Batumi.


We also went to the dancing fountains (it was Saturday night).


Friday, March 21, 2014

Day 7 - Field App published


Today I collected some seed data to put into our app so I could submit it to Google Play I also worked on our conference submission.

The app uses our code from "Anomia for me" which lets patients and their family members build practice exercises for vocabulary they want (i.e. knitting needles and garden hoes) rather text book vocabulary which may or may not be relevant for their lives (ie bus and apple). 


After talking with members of the TLG volunteers (Teach Learn Georgia) when they come down from the mountains for the weekend, it looks like older volunteers (August 2013) could share what they have learned in the field with newer volunteers (March 2014) using our open source code base called "Learn X" which makes it possible to create an Android App that one or many users can use to create their own language learning lessons together using their Androids to take video, picture or record audio, backed by the LingSync infrastructure for offline sync. Like heritage learners, TLG volunteers spend their time surrounded with the language and can understand more than they can speak, and what they speak about is highly dependant on their families and what their family speaks about most.


Create your own language learning lessons with friends or other users using your Android to take videos, pictures or record audio.
A lot of things can happen when you're in Georgia. Phrases like how to politely refuse refugee kids and other social phenomena that differ depending on your speaker population and village/town where you are staying can be a very important part of the language in use. In fact, there are many other contexts which won't be acknowledged or printed in any online grammar or second language materials, contexts which users can elect to hide from other users, or share with certain users depending on their comfort level.

Phrases like how to politely refuse refugee kids, and other social phenomena which would differ depending on your speaker population and village/town where you are staying can be a very important part of the language in use, contexts which won't be acknowledged or printed in any official sort of materials...

Thursday, March 20, 2014

Day 6 - Riding a marshutka

It was raining and I had to go to hang out with my friends at the University, so I took my first trip on a Marshutka (#31). First I took the Marshutka going north, expecting it would circle around Rutstaveli, but no it went to the other side of the port. Luckily, I had been there on Day 2 so I knew where I was, and so I waved at the driver so that I could just get off at the gas station/fish market and and catch another back. It was 40 tetri for the first ride, and 60 for the second ride (payable when you get out). The fares are 40, 50, 60 tetri depending on how far you are going.

Naturally I used MyTracks to find out where we were going and to get off at the right street since the streets are not really obvious in the rain. I also found it rather funny to see the speed and zigzag pattern. 

View the Marshutka's path on map



 Created by Google My Tracks on Android Name: My First Trip On A Marshutka 

Activity type: driving 
Description: - Total distance: 1.18 km (0.7 mi) 
Total time: 06:13 
Moving time: 02:22 
Average speed: 11.40 km/h (7.1 mi/h) 
Average moving speed: 29.84 km/h (18.5 mi/h) 
Max speed: 29.84 km/h (18.5 mi/h) 
Average pace: 5:16 min/km (8:28 min/mi) 
Average moving pace: 2:01 min/km (3:14 min/mi) 
Fastest pace: 2:01 min/km (3:14 min/mi) 
Max elevation: 34 m (111 ft) 
Min elevation: 17 m (57 ft) 
Elevation gain: 59 m (194 ft) 
Max grade: 40 % 
Min grade: -14 % 
Recorded: 3/20/2014 18:54

Wednesday, March 19, 2014

Day 5 - A sim card

I got a sim card from Geocell today for 2 lari. It came with 100 local minutes, 500 sms and 100MB of data. I  decided I could make an application for the TLG friends I've been meeting in Batumi,  screenshots to come  ;)

I also found a Georgian OCR site and installed a Georgian keyboard on my Android. Of course I also went for a 1.5hr bike ride along the sea.
Another attempt to do the mountains and sea justice.

Tuesday, March 18, 2014

Day 4 - Batumi University

Today I went to the Batumi University to find the computer science department, and of course, for a ride on the bike path.
The Batumi Velo and bike path.

I also met a photographer from poland who was doing a series on the black sea, and had also met the gypsy kids. 

Monday, March 17, 2014

Day 3 - The Batumi Library and my new favorite restaurant

Today I went to the Batumi library, and out for St Patrick's day.
The Batumi Library
Doesn't seem to have books, but rather nice tables, and a heat. Perfect conditions for quite work ;)
The mountains seen from the bike path are amazing.
We went for dinner and homemade wine at Keti's restaurant.

Sunday, March 16, 2014

Day 2 - "The other side of the port"

Today I explored the town on other side of the port. It was about a two hour walk round trip. 

View Map


I found some ruins behind an active chapel on a hill (it was Sunday).


I also found out that the beach originally had black sand which probably had river stones added to prevent erosion. 

When I got back to old Batumi I bought some lunch (at the same place I got khachapuri the day before, but they charged me 2 lari for bulgar wheat, twice the price of a kebab oddly..) and went for a picnic on the beach to work on a conference submission for one of our apps. It was 17 degrees and I forgot my hat, so I got a bit burned. 
I found that the Batumi Velo stands further along the coast were off, so I wasn't able to park here where I wanted to try the concrete sculpted seating areas.

Saturday, March 15, 2014

Day 1 - A bike ride along the coast

I found a website with Georgian phrases. I spidered it and its audio using Httrack and put the results on my Android.
 I went for a bike ride along the coast for about an hour. View Map





I had khadjapuri and pear soda "limonade" in a cafe by the port.
At the cafe, I started putting the alphabet into an IPA table. Very little information is in Cyrillic or roman characters so I will need to read Georgian letters if I want to get anything done. After I came back I imported the data into our app by scraping it from the spidered page using Chrome Dev Tools and outputting it into CSV.

Friday, March 14, 2014

Thursday, March 13, 2014

Day -1 - Istanbul

I flew to Istanbul, and saw the word "Anatolian" for the first time outside of my Ancient Hittite course.


Sunday, March 9, 2014

D3 & FRB: A case study in binding and editable DataViz

We wanted something that could handle a connected graph of thousands of objects in the DOM and not explode with extra calculations. Our solution was to use D3, combined with Montage Collections and  FRB. In this talk I'll demo the results of our investigation (an editable interactive visualization of  nodes in a connected graph).




Code on GitHub


`

Saturday, March 8, 2014

Day -6

I decided to search for kartveli rather than Georgian on YouTube, found a behind the scenes video for a boy named Georgi auditioning for Georgia Talent, which lead me to a talk show. I watched it a few times, it had a singer who sang in Russian and whose music I had already heard (we often listen to Russian pop music in the office). After about 4 repititions I found some discourse particles for backchanneling, correcting another person's question and clarifying one's previous utterance. It seemed promising so i used keepvid to download it, and ffmpeg to extract the audio and import it into Praat. Which lead me to a YouTube channel full of reasonably natural Georgian, profiling famous Georgians so the vocabulary will be reasonably similar. https://www.youtube.com/user/ProfiliR2

Wednesday, February 19, 2014

Day -24

I found some more natural videos in Turkish, and moved my stuff into the basement between  a few more layers of plaster.

Tuesday, February 18, 2014

Day -25

I bought my ticket and started plastering the cieling to with the sound of Piece Corps Georgia introduction to Geogian, playing in the background.


Thursday, February 13, 2014

Cycling in Tbilisi

I'll have my citizenship soon, which means I've been researching where to go for field work next. At the moment the contenders are Turkey, Georgia, and Korea (agglutinative languages).

Naturally biking in Turkey is pretty much not in my plans, and in Korea there are usually pretty good paths but most people wear masks to prevent breathing in the pollution. The unknown is Georgia. A quick google result for Tblisi cycling safety confirms my expectation, it would be roughly equivalent to biking in a Romanian city. I also ran across this video of two dudes on a cycling demonstration of how to freak out cars in Tblisi. Not exactly my style...





I also found Derek's post about commuting in Tblisi, which was far more informative.

... drivers in Tbilisi are widely acknowledged to be crazy--Georgian machismo combined with lax traffic enforcement leads to dangerous speeding, aggressive tailing, games of Chicken, and lots of accidents. In six months in Georgia, I've personally witnessed two rear-end collisions, had the city bus I was riding in scrape the side of a taxi, and driven or walked past three multi-vehicle high-speed accidents. Not the biggest sample size, of course, but I'm pretty sure the statistics support me on this one.

Despite this, I actually feel pretty safe riding my bike around Tbilisi, for a few reasons.

The first reason is simply experience: I've ridden thousands of total miles on dense, high-traffic streets in Chicago, and while Chicago is a very bike-friendly city by American standards, it has its fair share of crazy drivers. Knowing how traffic flows, and how to position yourself in the road is a key part of safe city cycling ...Pursued by a Bear: Bicycle commuting in Georgia

As for biking outside the city, it looks like a pretty intense version of my trip in the mountains around Lake Champlain, with some crazy views and hikes thrown in, and maybe not solo with full camping equipment. My cassette was pretty much scrap after climbing 22,000 feet with 15kg of camping gear. I bet a 6 day trip in the Caucuses would be far more than triple that.


Of course, I've never seen a bike rental shop which had any bikes that were actually big enough for me. In Germany I bought a bike, and sold it once I got to the Czech Republic at no loss.  So, do I bring my bike, or do I play it by ear when I get to my destination...