Sunday, June 17, 2018

Hiking the E5

Next week we are going for a hike, a hike across the alps.


Sunday, November 26, 2017

Geogian diaspora

This month a friend and I looked into the results of Recognizing Speech on Android.

In 2014 we created open source libraries and tools to facilitate usage of the Georgian language by Georgian speakers. One of these tools was Gismet, an Android application which can be used by Georgian speakers to train their Android smartphones to recognize their speech using PocketSphinx. The software was made freely available to the public and also open source on GitHub.


Since 2014 over 1,000 users have used the application to train the default language model to their voices. The location of the recordings is determined via GPS technology, and informed consent for the anonymous analysis of their voices is required as part of the software installation process.



Georgian diaspora
  • Red: Android location with < 100 accuracy range
  • Blue: IP geolocation



georgia
Georgian Diaspora, shown by GPS location of anonymous recordings.


The resulting datasets of anonymous elicited training recordings is similar to datasets obtained in an experimental setting. Below are a couple of spectrograms from the anonymous training recordings.


georgia

Specrogram of "რა ტემპერატურაა დღეს?" with careful yet natural prosody.

georgia
Specrogram of "რა ტემპერატურაა დღეს?" with audience-less prosody.

Tuesday, July 19, 2016

Hiking in Chiang Mai

It turns out that there are plenty of trails around Chiang Mai which you can take to get to the summit of any mountain. The only challenge is finding them. We used GPS traces of other foreigners which we found after a fair bit of Googling.

One of our our recorded GPS trace

Elevation/Speed plot recoded by My Tracks
Trail info along the river.
The trails we found were mostly used by locals for pilgrimage to shrines, most mountains in that region have a shrine on top, so there is almost always a trail.

One of the trails was mostly a dried riverbed.
Hiking in March this year turned out to be a very hot endeavour. March is the dry season, and most of the mountains are control burned so that the land is black and the leaves shrivel and fall off. This makes very little cover from the sun.

The burning also makes the air have a high pollution index, and you can't see very far in the distance.

Saturday, July 9, 2016

Authenticated Systems

This week I will be giving a talk at NY JavaScript on how to build authenticated systems which have multiple services and multiple clients.

In this talk we will look at a sample auth service which lets users login via numerous OAuth2 providers (Google, Facebook, Twitter etc) or using username and password.



The auth service uses a bower component to present a static HTML 5 UI, instead of using  server side templating.

The auth service also shows how to use JWT instead of sessions to identify and enforce the user's permissions for the requested resource.
The auth service shows how you can persist users using sequelize (which lets you learn with sqlite and use postgres later).
The auth ui uses a simple form submit to hit the auth service (it also shows an example of an Ajax request using fetch).

There is a sample client which is an HTML5 bower component in vanilla JavaScript. The client uses JWT to detect if you are logged in and have permissions to view resources.

There is a library that contains the the system's public key and JWT options which can be used both client and server side to verify tokens.

Github codebase:


Tuesday, March 31, 2015

Running Mac as a production server

For one of my open source projects we were given a server, a mini mac to be precise. Sure, we could have put linux on it, but because all the stack we are using runs on Mac so we decided we could probably use this server, why not. We sent it to a mac mini server farm to host it.

Image result for mac mini server 2013

There were a few wrinkles.

Sleep.
We delegated the server setup to an intern so they could learn how to set up the machine, they forgot to turn off sleep so the server was oddly unresponsive for the first week or so of testing.

Updates.
Macs like updating, and they seem to use RAM to do so. If you don't update the server you can have a significant chunk of your RAM hanging out waiting for you to do the update. We haven't figured out how to accept XCode downloads from the apple store, so this means we had to learn how to turn on VNC.

Turning on VNC
sudo  /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw mypasswd -restart -agent -privs -all

Turning off VNC

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off


Using pm2 vs forever
At the same time we did the upgrade, we decided wouldn't it be nice to have a new node process manager? So we switched our webservices to use pm2. After a month of sleep like behavior, after we had solved the sleep like behavior, we decided maybe switching process managers at the same time as switching OS was a bad idea. We switched back to forever and now the server is almost normal.

These were a few reasons why we regret using the Mac server instead of formatting it with Linux, although now that its sort of stable with ~97% uptime we aren't planning formatting it just yet.

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