Compiling HTK 3.4 on Mac OS X

Sunday, 1st November, 2009

Download the HTK source tarball from the HTK website. Note you must register — and make sure you read the licence! — before you can download either the code or the documentation.

Then, …

$  cd /path/to/directory/containing/htk/tarball
$  tar zxf HTK-3.4.1.tar.gz 
$  cd htk
$  ./configure
$  make all
$  sudo make install

…, installs everything into /usr/local/bin/.

cf. Compiling HTK 3.4 on Windows XP.

Compiling HTK 3.4 on Windows XP

Wednesday, 14th October, 2009

[This post is from my old blog, originally posted Monday 30th July 2007. As it is still read, I have moved it here with no revisions]

Introduction

Here are some notes on my experiences of compiling HTK 3.4 on Windows XP. I compiled HTK successfully, but some research and experiment was necessary. In the end I tried and was successful with Cygwin and with Visual Studio Express. I hope you find these notes useful.

The issues addressed here will obtain whether you’re using the makefiles that come bundled in the htk3.4 zipfile or the winmakefiles makefiles refered to by Anna Langley in her 02/02/07 post to htk-users.

These notes do not cover getting HSLab to run on Windows. I recommend Praat for labelling, and Praat or SpeechRecorder for recording.

Read the rest of this entry »

Adding a Chat application to pinax

Tuesday, 13th October, 2009

How do you add a Django application to Pinax? Below is my experience with one Django app. For some related reading see Fernando Correia’s series on Exploring Pinax and Greg Allard’s How to Write Reusable Apps for Pinax and Django.

Here I want to separate the two issues of (a) developing a Django app and (b) integrating a Django app into Pinax. This post will look at Pinax integration only, the only Django app “development” will be making sure the app is ready for integration. I am using a third-party Django application, namely jchat by Federico Cáceres, covered in his blog posts on his Django powered AJAX Chat project.

Read the rest of this entry »

Smartphone market share by manufacturer

Tuesday, 29th September, 2009

[updated 061009]

A year or so ago, I quoted a chart from the FT showing smartphone market share by operating system. Here it is again:

Today’s FT has a similar piece with similar data, this time breaking down the market by manufacturer (nb: the article on the website doesn’t have the data). Here it is as a pie chart:

I know it’s not a direct comparison but, if we assume that Nokia produces Symbian phones, RIM produces RIM phones, and Apple produces iPhones, we can see a few things:

  • Nokia has lost a quarter of its market share, but it still owns more of the market than all of its rivals put together (apart from the “Others”).
  • RIM, which I think is often treated in these iPhone days as a tired old brand, has almost doubled its market share. Not bad.
  • Apple has of course made huge growth.

Where might we find Linux and Windows in this data, as neither are phone maufacturers? HTC, Fujitsu and the Others all make Android and Windows phones, and the Others will also include Palm; note that some of these bottom three make Symbian phones too, eg Samsung. For a quick calc, let’s divvy HTC and Fujitsu half-and-half between Windows and Linux (including Android), and the Others three ways between Windows Linux and Palm. That would put Windows and Linux both at around 9%. Neither is doing well at all.

The disappearance of Microsoft from the mobile space is no surprise, but Linux’s lack-lustre performance is: Android is a much-hyped newcomer, and Nokia and others have been making linux-based internet-enabled devices for a while. Perhaps what Linux needs is for smartphones to cease to be luxury products, with boutique operating systems, and to enter the rough-and-tumble of the mainstream — which is exactly what the FT article says could be happening.

update 061009: Yesterday’s FT had a report saying that Windows mobile had 9.3% of the market in Q2 2009, so the quick calc wasn’t so bad.

This worked for me, statically linking:

cd /tmp
wget http://codespeak.net/lxml/lxml-2.2.2.tgz
tar -xzvf lxml-2.2.2.tgz 
cd lxml-2.2.2
python setup.py build --static-deps --libxml2-version=2.7.3  --libxslt-version=1.1.24 
sudo python setup.py install

I found it at stack overflow.

IBM to buy SPSS

Thursday, 30th July, 2009

IBM is buying SPSS, for $1.2 billion. Here is IBM’s press release.

I smelt something fishy earlier this year when SPSS renamed their flagship stats package from SPSS Statistics to PASW Statistics. PASW stands for Predictive Analytics Soft Ware.

It seems like a strange acquisition to me. Maybe IBM want a high-street brand in their portfolio. What else do they hope to get out of the acquisition? Surely they don’t need the back-end statistics software?

Last in the (unplanned!) series on decorate-sort-undecorate in Haskell, this post reports on the Further Work necessary after the reponses to my initial query on haskell-beginners.

I received many helpful responses, many of which used Haskell language features which were new to me. Here I summarise them and then give a description of the new elements.

  1. Responses
    1. Quoted
    2. Standardised
  2. Discussion
    1. $
    2. (\x -> (f x))
    3. .
    4. &&& and id

  3. And the winner is, …

Read the rest of this entry »

This is not really a post, more like a braindump. I need somewhere to offload all this so I can go to bed. I apologise for lack of context.

OK some context: I’m looking for a chat application I can use within a django-based website (and if I can’t find one, girding my loins to write one). Irrelevantly (or so I’d thought until a few minutes ago) I’m learning Haskell, and finding out about functional programming.

Haskell:

Erlang:

Haskell: sort and sortBy

Friday, 3rd July, 2009

A comment in the discussion on decorate-sort-undecorate in Haskell pointed out to me that my naive and dsu versions of sort by length had different type signatures: the dsu version needlessly required elements of the list to be of type Ord:

sortByLength :: [[a]] -> [[a]]
sortByLength xs = sortBy (comparing length) xs

dsuSortByLength1 :: (Ord a) => [[a]] -> [[a]] 
dsuSortByLength1 xs = map snd (sort (zip (map length xs) xs))

My intention had been that the dsu version have the same requirements as the naive version. So where did this (Ord a) context come from, and how do we get rid of it?

The relevant difference between the functions is the different type signatures for sort and sortBy:

> :type sort
sort :: (Ord a) => [a] -> [a]
> :type sortBy
sortBy :: (a -> a -> Ordering) -> [a] -> [a]

sort requires list elements to be comparable (obviously); sortBy requires only a function that can generate an ordering from its input pair. In dsuSortByLength1 above, the elements of (zip (map length a) a) are required to be of type Ord. We could protest that just because (zip (map length a) a) has to be Ord doesn’t mean that a has to be Ord, but I suspect the compiler is playing on the safe side. [update: see first two comments.]

A function using sortBy instead of sort avoids this extra requirement in the type signature, and shows us a use case for comparing:

sortByLength :: [[a]] -> [[a]]
sortByLength xs = sortBy (comparing length) xs

dsuSortByLength2 :: [[a]] -> [[a]] 
dsuSortByLength2 xs = map snd (sortBy (comparing fst) (zip (map length xs) xs))

Using sortBy (comparing fst) rather than sort allows us to simplfy the type signature.

We can extract length to generalise the function:

sortByFunc :: (Ord a) => (a1 -> a) -> [a1] -> [a1]
sortByFunc f xs = sortBy (comparing f) xs

dsuByFunc  :: (Ord a) => (a1 -> a) -> [a1] -> [a1]
dsuByFunc  f xs = map snd (sortBy (comparing fst) (zip (map f xs) xs))

The (Ord a) context has returned! But here it is just a requirement on the output of the comparison function, which is fine.

Haskell resources page

Tuesday, 30th June, 2009

I’ve created a new Haskell resources page (see right) to help me keep track of the online resources I use while working through Real World Haskell.