Trumps speech according to speech recognition

The following text is an automatic transcription of Donald Trump‘s inaugoration speech, made using the vanilla window.SpeechRecognition in javascript, code provided by the lovely Wes Bos with a few small additions by me.

I am pretty impressed with the accuracy of the transcription, considering it runs 100% in the browser, and using the built in speaker and microphone of my toy, a Lenovo Miix 300 (Ebay Link). Click play on the video and try to follow along with the text. You may also test the autotranscriber here.


Justice Roberts President Carter

President Bush

is there no balm fellow Americans and people of the world thank you

the Citizens of America Ireland

national effort to rebuild our country

First Promise for all of our people

agata we will determine the course of American and world for many many years to come

we will face challenges we will confront hardships but we

the job done

years we gather on the steps to carry out the orderly and peaceful transfer of power

create poll to President Obama

lady Michelle Obama for the equations


magnificent thank you

today’s ceremonial ever

very special meaning

yesterday we are not merely transferring power from one administration to another or from one party to another but we are transferring power from Washington DC and giving it back to you with other people

bridge of a small group for our Nations capital has reap the rewards of government by the people have Borne the cost

Washington tourist but the people did not share in his wealth

prospector jobs left and the factories close

the establishment protected itself but not the Citizens of our country

directories have not been Jorvik

fair trials have not been your trials and why are they celebrated in our Nations capital that was little to celebrate for struggling families All Across our land

metal changes

right here right now

damages your moment it belongs to you

set alarm for everyone gathered here today and everyone watching all across America this is your day this is your celebration and this the United States of America is your country

what time era is that which party controls the government but whether our government is controlled by the people

January 20th

2017 will be remembered as the day the people became the rulers of this nation again

the Forgotten men and women of our country will be forgotten no longer

everyone is listening to you now

by the tens of millions to become part of a historic movement the likes of which the world has never seen before

data centre this movement

show conviction that a nation exists to serve it services Americans one great schools to their children safe neighbourhoods for their families and good jobs for themselves

these are just

Hannibal demands of richest people in a righteous public Watford to many of our citizens a different reality exists

send children trapped in poverty in our inner cities without factories scattered like tombstones across the landscape of our nation and education system flush with cash but which leaves are young and Beautiful Susan’s

of all knowledge

endocrine MB games and the drugs that have stolen too many lives and robbed our country pub so much unrealised potential

American carnage starts right here and starts right now

we are one nation

your pain is our pain

dreams are our dreams and their success will be our success

one heart one hall and one glory destiny

the out of office I take today is an Oath of Allegiance do all Americans

for many decades with enriched foreign industry at the expense of American industry subsidised the armies of other countries while allowing for the very said depletion of our military

defended other nations borders will refusing

send around

best trillions and trillions of Dollars overseas while America’s infrastructure has fallen into disrepair and decay

we made other countries rich Wilder wealth

confidence of our country has dissipated Over the Horizon

one by one the factory shut up and lift our Shores

I thought about the millions and millions of American workers that we left behind

the wealth of our middle class has been ripped from their homes and then we distributed all across the world

but that is the past

we are looking for only to the Future

where we are today are issuing a new decree to be heard in every city in every foreign capital and in every hole of power

Dave forward a new vision will Govern our land

David is going to be only America first America first

on trade on taxes on immigration on foreign affairs will be made the benefit American workers and American families we must protect our borders from the ravages of other countries making up products stealing our companies and destroying our jobs

protection will lead to Great prosperity and strength

fight for you with every breath in my body

ever ever let you down

commercial start running again winning like never before

we will bring back Georgia

our borders

bring back channel will

bring back our dreams

new roads and highways and bridges and airports and Tunnels and railways All Across our wonderful nation

we will get our people off of welfare in back to work rebuilding our country’s with American and American labour

we will follow two Simple Rules by American and higher American

we will seek friendship ended well with the nations of the world but we do so with the understanding that it is the right of all Nations to put their own interests first

to impose our way of life on anyone

rather to let it shine as an example we will shine for everyone to follow

we will reinforced Auld Alliance influence and unite the civilised world against radical Islamic terrorism which we will eradicate completely from the face of the Earth

at the bedrock of our politics will be a total allegiance to the United States of America and through loyalty to our country we will rediscover our loyalty to each other

you open your heart to pictures

there is no room for prejudice

survival trousers how good and pleasant it is when God’s people live together in unity

customise openly

purchase agreement honestly but always pursue solidarity

when America is United America is totally unstoppable

there should be no fear

protected and we will always be protected

goodbye the great men and women of our military and law enforcement


we will be protected by God

finally we must think big and dream even bigger in America we understand that a nation is only living as long as it is striving

longer accepts politicians who are all talk and no action constantly complaining but never doing anything about it

the time for empty Talk is over now arrives the hour of action

do not allow anyone

is that it cannot be done no challenge can match the heart and fight and spirit of America we will not fail our country will strive and prosper again

Western at the birth of a

ready to unlock the mysteries of space to free the Earth from the movies of disease and a harness the energy Industries and technologies of tomorrow a new national pride will self lift our site and Heal our divisions it’s time to remember that old was Mr soldiers will never forget that whether we are black

or white

I bleed the same red blood of Patriots

we all enjoy the same glorious freedoms and we all salute the same grade American flags

and whether a child is born

beloved a try called a windswept Plains of Nebraska they

the same night sky they fill their heart with the same dreams and they are infused with the breath of Life by the same Almighty creator

Dr Martens in every city near and far small and large from mountain to mountain from ocean to Ocean here these words you will never be ignored again

your voice your hopes and your dreams will define our American destiny

origin good love will forever guide us along the way

we will make America strong again

make America wealthy again we will make America proud again we will make America safe again and yes together we will make America great again thank you

and god bless America

thank you

god bless America


Skulle egentlig ha dette prosjektet ferdig til Trondheim Maker Faire. Prototypen funker, og spiller av samples når man holder nede knappene, men rakk ikke gjøre orgelet helt ferdig.

Drivorgelet spiller av lyder fra havet, og knappene har LEDs som lyser opp gjennomsiktige mangefargede klinkekuler.

Logikken gjøres på pc (i nettleser) via web audio api, og knappene er koblet til en keyboardemulator.

Eta: Neste Maker Faire?


Code: Showing a list of youtube videos using gdata and xslt with php

Let’s start with a little demonstration. The section below is made by calling the php-script within an iframe:

Why iframe?
Just to make it easier to reuse and embed Youtube videos on different sites, and because it makes it easier to try out new ideas without adding messy bits to a larger project. Sort of like rapid prototyping/proof of concept before “committing” to a feature and spending alot of time integrating something you might end up throwing out.

This solution currently consists of these files:
youtube.php, takes s=whateveryouwanttofind and max=number of videos to return as GET parameters
youtube5.xsl, does all the transformation of the xml from youtube into lovely xhtml.
youtube.js, javascript file that handles clicking on the thumbnails to load a new video, using innerHtml
youtube.css, minimalist styling to keep things pretty.
swfobject.js, for embedding flash

The xslt:

<?xml version=”1.0″ encoding=”UTF-8″?> <xsl:stylesheet version=”1.0″ xmlns:xsl=”” xmlns:fn=”” xmlns:gd=”″ xmlns:media=”” xmlns:n1=”” xmlns:openSearch=”” xmlns:xdt=”” xmlns:xs=”” xmlns:xsi=”” xmlns:yt=”″ xmlns:altova=””> <xsl:output method=”html” encoding=”ISO-8859-1″ doctype-public=”-//W3C//DTD XHTML 1.0 Transitional//EN” doctype-system=””/> <xsl:param name=”SV_OutputFormat” select=”‘HTML'”/> <xsl:variable name=”XML” select=”/”/> <xsl:template match=”/”> <html> <head> <title> – Youtube playlist</title> <link rel=”stylesheet” href=”youtube.css” media=”screen” /> <script type=”text/javascript” src=”youtube.js”></script> <script type=”text/javascript” src=”swfobject.js”></script> </head> <body> <div id=”youtube”> <h1>YouTube Playlist</h1> <xsl:for-each select=”$XML”> <xsl:for-each select=”n1:feed”> <xsl:if test=”n1:entry[1]”> <div class=”youtubevideo”><div id=”cur_video”> <xsl:for-each select=”n1:entry[1]/media:group/media:content”> <xsl:if test=”@type = ‘application/x-shockwave-flash'”> <embed> <xsl:attribute name=”src”> <xsl:value-of select=”@url”/> </xsl:attribute> <xsl:attribute name=”width”>480</xsl:attribute> <xsl:attribute name=”height”>385</xsl:attribute> <xsl:attribute name=”quality”>high</xsl:attribute> <xsl:attribute name=”bgcolor”>#000</xsl:attribute> <xsl:attribute name=”id”>cur_video_swf</xsl:attribute> <xsl:attribute name=”name”>cur_video_swf</xsl:attribute> </embed> </xsl:if> </xsl:for-each> </div> <!– ends cur_video –> <div id=”cur_video_title”> <xsl:value-of select=”n1:entry[1]/n1:title”/> </div> </div>    <!– ends youtubevideo –> </xsl:if> <div class=”youtubethumbs”> <xsl:for-each select=”n1:entry”> <xsl:if test=”position() > 1″> <xsl:for-each select=”media:group”> <div class=”youtubethumb”> <xsl:for-each select=”media:content”> <xsl:if test=”@type = ‘application/x-shockwave-flash'”> <a> <xsl:attribute name=”href”>#</xsl:attribute> <xsl:attribute name=”onmousedown”>PlayVideo(‘<xsl:value-of select=”@url”/>’,’’, ‘Youtube’, true);</xsl:attribute> <xsl:attribute name=”onclick”>return false;</xsl:attribute> <xsl:for-each select=”../media:thumbnail[1]”> <xsl:element name=”img”> <xsl:attribute name=”src”><xsl:value-of select=”@url”/></xsl:attribute><xsl:attribute name=”lowsrc”>lowsrc.gif</xsl:attribute><xsl:attribute name=”width”>100</xsl:attribute><xsl:attribute name=”height”>60</xsl:attribute> </xsl:element> </xsl:for-each> <xsl:value-of select=”../media:title”/> </a> </xsl:if> </xsl:for-each> </div> <!– ends avslutter class youtubethumb –> </xsl:for-each> </xsl:if> <!– end if on position > 0 –> </xsl:for-each> </div><!– ends class youtubethumbnails –> </xsl:for-each> </xsl:for-each> <div class=”youtubefooter” style=”clear: both; color: #999999; font-size: 0.8em;”>Disclaimer: These videos are retrieved from Youtube through a simple search. Even though the search is done with a filter to remove “inappropriate material”, it may still contain videos deemed offensive by some. Videos may or may not be in violation of international copyright law.</div> </div> <!– avslutter id youtube –> </body> </html> </xsl:template> </xsl:stylesheet>


$searchterm = $_GET[“s”];
$maxresults = $_GET[“max”];

/* load the xml file and stylesheet as domdocuments */
$xsl = new DomDocument();
$inputdom = new DomDocument();


$inputdom->load(“” . $searchterm . “&max-results=” . $maxresults);

//if you want to test with a local file

/* create the processor and import the stylesheet */
$proc = new XsltProcessor();
$xsl = $proc->importStylesheet($xsl);
//$proc->setParameter(null, “titles”, “Titles”);
//not in use, but needed if you want to pass variables into the xslt from php

/* transform and output the xml document */
$newdom = $proc->transformToDoc($inputdom);
print $newdom->saveXML();

My wonderous Greasemonkey Idea

Adolf MacDonald
photo credit: Walt Jabsco

Greasemonkey (and other solutions for Opera and Windows) allows you to customize the way a webpage displays using small bits of JavaScript. Hundreds of scripts, for a wide variety of poular sites, are already available in the Greasemonkey script repository at

You can write your own scripts too. Mark Pilgrim’s definitive Greasemonkey guide, will show you how.

Greasemonkey Extension for Firefox

User Scripts

My new brilliant idea:
I haven’t used Greasemonkey that much yet but for years I’ve wanted a solution to get easy information about the ethical and environmental profile of a firm or product when I’m in a store. Unfortunatly this is not really feasible, but it could be done in the web using Greasemonkey (+ a wiki of conserned citizens, and perhaps import of existing data (?) by XML. And then the option to edit the wiki througt a greasemonkey script.)

I think I will check if there are any only databases with this kind of data, I know there used to be one in Norway. If you have any tips, just write a comment.

Supercool scripts:

Wikiproxy: Greasemonkey Edition
Inline Mp3 Player
Gmail: Random Signature.
Mailto Compose In GMail (with choice)
Jer’s Wonderful World of Internet

Another Cool Idea:
Replace banner-ads etc with artwork and poetry, or random naked chicks. I think the name should be Prettify-the-web! :) Amazon Sambok and BIBSYS ISBN Search

La caverne aux livres
photo credit: gadl

Hey, my first Greasemonkey userscript! Amazon Sambok ISBN Search:

This is just a fast remake of the Hight Library Linky script. Its my first script, just wanted to check out how hard it would be to rework. Luckily for me it was super easy. It inserts links to two norwegian bibliographical databases.

Bibsys, containing material from universities and colleges.
And Sambok, containing material from most Public Libraries in Norway.

Pretty useful, at least in theory, since ISBN search is quite limiting. But it will have to do for now.