<?xml-stylesheet type="text/xsl" href="http://coco-lab.org/Elgg/timo/weblog/rss/howto/rssstyles.xsl"?>

<rss version='2.0'   xmlns:dc='http://purl.org/dc/elements/1.1/'>        
    <channel xml:base='http://coco-lab.org/Elgg/timo/weblog/'>
        <title><![CDATA[Timo Baumann : Weblog items tagged with howto]]></title>
        <description><![CDATA[The weblog for Timo Baumann, hosted on Coco-Lab Weblog.]]></description>
        <link>http://coco-lab.org/Elgg/timo/weblog/</link>        
        <item>
            <title><![CDATA[Speed-Up Boot under Ubuntu with VMware]]></title>
            <link>http://coco-lab.org/Elgg/timo/weblog/78.html</link>
            <guid isPermaLink="true">http://coco-lab.org/Elgg/timo/weblog/78.html</guid>
            <pubDate>Fri, 30 Jan 2009 09:50:02 GMT</pubDate>
		<dc:subject><![CDATA[bootchart]]></dc:subject>
		<dc:subject><![CDATA[howto]]></dc:subject>
		<dc:subject><![CDATA[ubuntu]]></dc:subject>
		<dc:subject><![CDATA[vmware]]></dc:subject>
            <description><![CDATA[<p>I still need Windows for one piece of software that I use occasionally. So, since I&#39;ve moved to Ubuntu, I&#39;ve been using VMware for this (as it was the only solution at that time).</p><p>My VMware stopped working under Hardy. Luckily, I never needed my Windows-App for half a year. In Intrepid, I was able to just install vmware from their webpage and it restored my windows session from a year ago. Probably a record-breaking uptime for windows...</p><p>So, yesterday I played around with <a href="http://www.bootchart.org/">bootchart</a> and found out, that the VMware-services took 4 precious seconds of my (and my battery&#39;s) lifetime on every boot. Not really worth it, as I&#39;m unlikely to use my Windows-App anytime soon. So, here&#39;s what I did: </p><p>remove the links in /etc/rc*.d/*vmware </p><p>as the first command in /usr/bin/vmplayer add: </p><p>gksu -D &quot;Need root priviledges to start vmware services.&quot; /etc/init.d/vmware restart</p><p>Works like a charm. </p>]]></description>
        </item>
                
        <item>
            <title><![CDATA[no sound in praat with ubuntu (and USB sound)]]></title>
            <link>http://coco-lab.org/Elgg/timo/weblog/76.html</link>
            <guid isPermaLink="true">http://coco-lab.org/Elgg/timo/weblog/76.html</guid>
            <pubDate>Thu, 18 Dec 2008 11:11:04 GMT</pubDate>
		<dc:subject><![CDATA[howto]]></dc:subject>
		<dc:subject><![CDATA[ubuntu]]></dc:subject>
		<dc:subject><![CDATA[sound]]></dc:subject>
		<dc:subject><![CDATA[praat]]></dc:subject>
            <description><![CDATA[<p>If praat (on ubuntu) doesn&#39;t want to play any audio, it tells you to consult some Sound-HOWTO (which at least doesn&#39;t exist on ubuntu). Unfortunately, <a href="http://ubuntuforums.org/archive/index.php/t-64383.html">http://ubuntuforums.org/archive/index.php/t-64383.html</a> is of little help (and doesn&#39;t allow posting anymore as its active phase has expired).</p><p>The solution for us was easy: We use an external USB sound card and have deactivated the mainboard sound. For some reason, the sound device is now called &quot;/dev/dsp1&quot; (and &quot;/dev/audio1&quot;) and there is no &quot;/dev/dsp&quot; (nor &quot;/dev/audio&quot;). Adding symlinks from &quot;/dev/dsp&quot; to &quot;/dev/dsp1&quot; (and from &quot;/dev/audio&quot; to &quot;/dev/audio1&quot;) fixed the problem. Hope this helps. </p>]]></description>
        </item>
                
        <item>
            <title><![CDATA[sox in Ubuntu Hardy (8.04)]]></title>
            <link>http://coco-lab.org/Elgg/timo/weblog/70.html</link>
            <guid isPermaLink="true">http://coco-lab.org/Elgg/timo/weblog/70.html</guid>
            <pubDate>Fri, 25 Apr 2008 20:17:28 GMT</pubDate>
		<dc:subject><![CDATA[howto]]></dc:subject>
		<dc:subject><![CDATA[ubuntu]]></dc:subject>
		<dc:subject><![CDATA[sox]]></dc:subject>
            <description><![CDATA[<p>If you just upgraded your Ubuntu to 8.04 and use sox, then you may get the error &quot;sox soxio: Failed reading `some.file&#39;: unknown file type `auto&#39;&quot;</p><p>In Hardy, all audio formats for sox have been refactored in separate packages libsox-fmt-XYZ. So, either install just the base formats from libsox-fmt-base or get all possible formats with libsox-fmt-all.</p>]]></description>
        </item>
                
        <item>
            <title><![CDATA[maɪ̯ iːpaː tɛkstfiːld]]></title>
            <link>http://coco-lab.org/Elgg/timo/weblog/68.html</link>
            <guid isPermaLink="true">http://coco-lab.org/Elgg/timo/weblog/68.html</guid>
            <pubDate>Sat, 12 Apr 2008 00:39:29 GMT</pubDate>
		<dc:subject><![CDATA[howto]]></dc:subject>
		<dc:subject><![CDATA[java]]></dc:subject>
            <description><![CDATA[<p>This has been programmed before, but here it is for you to see (and use):</p><p>IPATextField, a simple descendant of JTextField that will only accept phonetic input (either SAMPA or IPA if you know your uni codes by heart) and show IPA symbols.</p><p>You can try it out directly, as a main routine is included. It&#39;s even useful as your tiny copy-and-paste-IPA-editor. </p> <div style="background-color: lightgray; font-family: monospace; line-height: 110%"> <p>/** Copyright (C) 2008 Timo Baumann<br />&nbsp;* This program is free software; you can redistribute it and/or modify it <br />&nbsp;* under the terms of the GNU General Public License as published by the <br />&nbsp;* Free Software Foundation; either version 2 of the License, <br />&nbsp;* or (at your option) any later version.<br />&nbsp;* <br />&nbsp;* This program is distributed in the hope that it will be useful, <br />&nbsp;* but WITHOUT ANY WARRANTY; without even the implied warranty of <br />&nbsp;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. <br />&nbsp;* See the GNU General Public License for more details.<br />&nbsp;* <br />&nbsp;* You should have received a copy of the GNU General Public License <br />&nbsp;* along with this program; if not, see &lt;<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>&gt;.<br />&nbsp;**/<br /><br />import java.awt.event.ActionEvent;<br />import java.awt.event.WindowAdapter;<br />import java.awt.event.WindowEvent;<br />import java.text.CharacterIterator;<br />import java.text.StringCharacterIterator;<br /><br />import javax.swing.AbstractAction;<br />import javax.swing.JFrame;<br />import javax.swing.JTextField;<br />import javax.swing.text.AttributeSet;<br />import javax.swing.text.BadLocationException;<br />import javax.swing.text.Document;<br />import javax.swing.text.PlainDocument;<br /><br />public class IPATextField extends JTextField {<br /><br />&nbsp;&nbsp;&nbsp; public IPATextField(int cols) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; super(cols);<br />&nbsp;&nbsp;&nbsp; }<br /><br />&nbsp;&nbsp;&nbsp; protected Document createDefaultModel() {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return new IPADocument();<br />&nbsp;&nbsp;&nbsp; }<br /><br />&nbsp;&nbsp;&nbsp; static class IPADocument extends PlainDocument {<br /><br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; String search&nbsp; = &quot;Q?ɡTDSZC&chi;ʁNR=&quot; + &quot;IEA{OUY29@6:_&quot;;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; char[] replace = &quot;ʔʔg&theta;&eth;ʃʒ&ccedil;xrŋʀu0329ɪɛɑ&aelig;ɔʊʏ&oslash;&oelig;əɐːu032F&quot;.toCharArray();<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; String pass = search + replace + &quot;pbtdkgfvszwjxhmnlrieaouy .&quot;;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void insertString(int offs, String str, AttributeSet a) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  throws BadLocationException<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  if (str == null) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; return;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  StringBuffer sb = new StringBuffer();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  CharacterIterator ci = new StringCharacterIterator(str);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  while (ci.getIndex() &lt; ci.getEndIndex()) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp; char[] c = new char[1];<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp; c[0] = ci.current();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp; String s = new String(c);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp; if (pass.contains(s)) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; int replaceIndex = search.indexOf(s);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (replaceIndex == -1) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sb.append(s);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } else {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sb.append(replace[replaceIndex]);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp; ci.next();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  super.insertString(offs, sb.toString(), a);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp; /**<br />&nbsp;&nbsp;&nbsp; &nbsp;* pretty much stolen from the Swing-Tutorial...<br />&nbsp;&nbsp;&nbsp; &nbsp;* @param args does not take any arguments<br />&nbsp;&nbsp;&nbsp; &nbsp;*/<br />&nbsp;&nbsp;&nbsp; public static void main(String[] args) {<br /><br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //Create the top-level container and add contents to it.<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; JFrame frame = new JFrame(&quot;VoxforgeDE Lexicon Tool&quot;);<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; final IPATextField tf = new IPATextField(10);<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; tf.addActionListener(new AbstractAction() {<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; public void actionPerformed(ActionEvent e) {<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println(tf.getText());<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; });<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; frame.add(tf);<br /><br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //Finish setting up the frame, and show it.<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; frame.addWindowListener(new WindowAdapter() {<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; public void windowClosing(WindowEvent e) {<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.exit(0);<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; });<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; frame.pack();<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; frame.setVisible(true);<br />&nbsp;&nbsp;&nbsp; }<br />}<br />&nbsp;</p></div>]]></description>
        </item>
                
        <item>
            <title><![CDATA[Trigger on data not working in OAA?]]></title>
            <link>http://coco-lab.org/Elgg/timo/weblog/65.html</link>
            <guid isPermaLink="true">http://coco-lab.org/Elgg/timo/weblog/65.html</guid>
            <pubDate>Mon, 11 Feb 2008 09:38:36 GMT</pubDate>
		<dc:subject><![CDATA[oaa]]></dc:subject>
		<dc:subject><![CDATA[howto]]></dc:subject>
            <description><![CDATA[<p>Continuing from the last post, assume you want your OAA-agent to react on certain data changes. You setup a trigger with something like this:</p><pre>oaaAddTrigger(data, otherSpeechEnd(_), oaaSolve(startTalking(), [reply(none)], [on(add), recurrence(whenever)])</pre><p>Right? No! Well, yes but that&#39;s not enough. You have to make sure, that the data (otherSpeechEnd(X)) is already known to the facilitator. </p><p>So, in order for the trigger to work, you need two lines:</p><pre>oaaAddData(otherSpeechEnd(_), []) <br />aaAddTrigger(data, otherSpeechEnd(_), oaaSolve(startTalking(), [reply(none)], [on(add), recurrence(whenever)])</pre><p>Very nasty behaviour, because the bug only occurs when you&#39;ve restarted the facilitator and the data type is still unknown. </p>]]></description>
        </item>
                
        <item>
            <title><![CDATA[Custom RTP payload not working in JMF?]]></title>
            <link>http://coco-lab.org/Elgg/timo/weblog/64.html</link>
            <guid isPermaLink="true">http://coco-lab.org/Elgg/timo/weblog/64.html</guid>
            <pubDate>Tue, 22 Jan 2008 11:17:15 GMT</pubDate>
		<dc:subject><![CDATA[howto]]></dc:subject>
		<dc:subject><![CDATA[jmf]]></dc:subject>
            <description><![CDATA[<p>Now, assume you have programmed your great custom RTP payload codec (for whatever reason) following this example (<a href="http://java.sun.com/products/java-media/jmf/2.1.1/solutions/CustomPayload.html">http://java.sun.com/products/java-media/jmf/2.1.1/solutions</a>) in the tutorial. </p><p>And it doesn&#39;t work. How would you fix it? Here&#39;s the answer:</p><p>rm ~/.jmf-resource</p><p>Everything should be back to normal now.&nbsp;</p>]]></description>
        </item>
                
        <item>
            <title><![CDATA[howto: SRILM and ubuntu]]></title>
            <link>http://coco-lab.org/Elgg/timo/weblog/59.html</link>
            <guid isPermaLink="true">http://coco-lab.org/Elgg/timo/weblog/59.html</guid>
            <pubDate>Tue, 13 Nov 2007 13:39:43 GMT</pubDate>
		<dc:subject><![CDATA[howto]]></dc:subject>
		<dc:subject><![CDATA[ubuntu]]></dc:subject>
		<dc:subject><![CDATA[srilm]]></dc:subject>
            <description><![CDATA[<p>There is just one problem with the <a href="http://www.speech.sri.com/projects/srilm/">SRI language modeling toolkit</a>: It doesn&#39;t come with a configure-scipt and the makefiles don&#39;t work out of the box. After an hour of searching through make output, we found out, that ubuntu does not use gawk but mawk as its standard awk implementation. Later on in the build process, this leads to weird errors. </p><p>I&#39;ll attach the changed common/Makefile.machine.i686 , so you (and I) don&#39;t have to redo the work later.</p><p><a href="http://coco-lab.org/Elgg/timo/files/-1/11/Makefile.machine.i686">SRILM-Makefile for Ubuntu</a> [document/unknown] </p>]]></description>
        </item>
        
    </channel>
</rss>
