Hack for Mashed - Kamaelia Speak And Learn

June 22, 2008 at 06:10 AM | categories: python, oldblog | View Comments

This hack is a "toy" for a small child to assist them to learn to read and write. They are asked to write specific words - both textually and also using speech synthesis. What they write is then read out to them. This version is by no means "complete", but it works. It currently allows a child to learn to write the word cat :-)

Where to Get it:

First initial version here:

Installing:

~/incoming/> tar zxvf Kamaelia\ Speak\ N\ Learn-1.0.0.tar.gz

Where's the Source?

Running:

~> SpeakNLearn.py

Dependencies:

  • You need to have espeak installed
  • You need to have aplay installed
  • You need to have pygame installed
Michael, June 2008
Read and Post Comments

Mashed Hack - IRC Speaker Bot

June 21, 2008 at 10:52 PM | categories: python, oldblog | View Comments

Since I wanted to "sit" on  some IRC channels here at Mashed and rather than flit channels or waste screen estate I decided to do a short hack to listen to the channel. As a hack for mashed, it does the following things:
  • It's IRC bot
  • It joins 3 channels - #kamtest, #kamaelia & #mashed
  • It listens to the channel

Anything that anyone says is then spoken (via espeak) by the bot. ie speech synth.

You can find the code here:
Read and Post Comments

Kamaelia Mashed Release Candidate

June 21, 2008 at 08:12 PM | categories: python, oldblog | View Comments

As per my previous post, the Kamaelia 0.6.0 release candidate #6 is available and can be downloaded from http://edit.kamaelia.org/release/

Read and Post Comments

Kamaelia at BBC MASHED

June 20, 2008 at 07:53 PM | categories: python, oldblog | View Comments

Going to BBC Mashed? Want to go? (a few are tickets left) Interested in one of these : {Kamaelia, Python, Concurrency, Multicore, DVB, Building network systems, Pygame Based Systems, Audio/video based} ? If so, please come along to the talk! If there's a clash, don't worry, I'm starting a page called GetMashed which will contain at least some starting points which I'll cover. (It's not the same as seeing it for yourself though :)

The talk is at the start of the weekend intended to get you started with all of those things. As well as the session itself, a new release of Kamaelia is in the works with the first Beta/Release Candidate made available to an unsuspected world. What's going in the release?
  • Well, the usual slew of extra components and bug fixes
  • A variety of new tools - from video shot change detection, through to SMTP greylisting
  • Multiprocess & hence multicore support (experimental at this stage, but so far so good :) )
And a large number of extra components - this is actually a lot more than I originally expected/anticipated. However they're divided into two halves - new components and components from applications merged into the repository. (the latter means that you can take parts of random Kamaelia applications and embed them in other random Kamaelia applications. As a result: New Components:
  • Kamaelia.
    • Chassis
      • Seq
    • Codec
      • WAV, YUV4MPEG
    • Device
      • DVB
        • SoftDemux
        • Parse
          • ParseEventInformationTable, ParseNetworkInformationTable, ParseProgramAssociationTable, ParseProgramMapTable, ParseServiceDescriptionTable, ParseTimeAndDateTable, ParseTimeOffsetTable, PrettifyTables, ReassemblePSITables
    • Experimental
      • Chassis, ERParsing
    • File
      • MaxSpeedFileReader, UnixProcess2
    • Internet
      • TimeOutCSA
    • Protocol
      • MimeRequestComponent, RecoverOrder, SDP
      • AIM
        • AIMHarness, ChatManager, LoginHandler, OSCARClient
      • HTTP
        • Handlers
          • Minimal, Handlers/SessionExample, UploadTorrents
      • IRC
        • IRCClient
      • RTP
        • NullPayloadPreFramer, NullPayloadRTP, RTCPHeader, RTPHeader, RtpPacker, RTP
      • Util
        • Tokenisation
          • Simple
        • Collate, FirstOnly, Max, OneShot, PromptedTurnstile, RangeFilter, RateChunker, SequentialTransformer, Sync, TagWithSequenceNumber, TwoWaySplitter
      • UI
        • Pygame
          • Text, VideoSurface
      • Video
        • CropAndScale, DetectShotChanges, PixFormatConversion
      • Visualisation
        • ER
          • ERLaws, ERVisualiserServer, ExtraWindowFurniture, PAttribute, PEntity, PISA, PRelation
      • XML
        • SimpleXMLParser
Components merged in from Apps:
  • Kamaelia
    • Apps
      • Compose
        • BuildViewer, CodeGen, PipeBuild, PipelineWriter, GUI
        • GUI
          • ArgumentsPanel, BuilderControlsGUI, TextOutputGUI
      • IRCLogger
        • Support
      • Show
        • GraphSlides
      • Whiteboard
        • Audio, Canvas, CheckpointSequencer, CommandConsole, Entuple, Options, Painter, Palette, Router, Routers, SingleShot, TagFiltering, Tokenisation, TwoWaySplitter, UI
All of this also totally ignores the new examples & new Kamaelia based apps.
Also a new website is coming soon, but time ran out :-)

So given all that, session details:
What: How to get started hacking with Kamaelia  - making concurrency fun, easy & useful
When: 12:15 - 12:45, 21 June 2008
Where: Garden Table area at Top West Hall, Alexandra Palace, London
Who: Me - Michael Sparks :-)
Why: To help people get started with hacking Kamaelie
How: One part presentation, two parts tutorial, lightning talk style and a note of "this is what I look like, come find me!"
More detail:

How to get started hacking with Kamaelia - making concurrency fun, easy & useful with Michael Sparks

Kamaelia is an open source project from BBC R&D. It makes prototyping new and interesting systems simple. Kamaelia systems are naturally concurrent and transform easily into production quality, maintainable systems.

It is useful for things from 3D systems through building PVRs through video playback, through shot change detection, through P2P distribution (live and bit torrent), through whiteboards, handwriting/gesture recognition, speech generation, and games systems, and back through DVB on both the reception side and broadcast side, and lots more not mentioned...

This talk will introduce Kamaelia, helping you get started - complete with a new release to boot!

Discussion Thread in the forum

(12:15 - 12:45) - 21 Jun 08
Garden Table area at Top West Hall

Download iCalendar: How to get started hacking with Kamaelia

GET MASHED (Link Kamaelia site)


Read and Post Comments

Powering a home server using solar power?

May 31, 2008 at 04:07 PM | categories: python, oldblog | View Comments

I'm considering looking at how to do this, since it looks doable, but wonder if anyone has any experience of actually doing this, even partially. It's a very similar problem, it seems, to running a TV using solar power when camping, so it's not that strange a scenario. I've come to the conclusion that one way of doing this is as follows:
  • Use a cheap/old/low power laptop
  • Buy a car battery - or perhaps a 12V 100Ah battery
  • Use a 60W solar panel (or similar) to charge the 100Ah battery
  • Use a car cigarette light connector based power adapter to connect laptop to battery
The issue there is the 60W solar panel is expensive right now, and I'm wondering if there's a way of reducing this figure down lower - if anyone has experience of doing this. I'm also not sure it's sufficient - I suspect it has to be higher rated than that.

I'd be interested in hearing from anyone who's tried doing this.

Read and Post Comments

How will you be celebrating the 60th Anniversary of the Computer?

May 30, 2008 at 06:31 PM | categories: python, oldblog | View Comments

The Small-Scale Experimental Machine, known as SSEM, or the "Baby", was designed and built at The University of Manchester, and made its first successful run of a program on June 21st 1948. It was the first machine that had all the components now classically regarded as characteristic of the basic computer. Most importantly it was the first computer that could store not only data but any (short!) user program in electronic memory and process it at electronic speed. -- http://www.computer50.org/

We're planning a new release of Kamaelia for that day, which also co-incides with BBC Mashed (aka BBC hackday 2). The new release should include, among other things, our multicore support, basic software transactional memory, generator, thread, process based components, a variety of example applications, a revamped website (yes, it needs a lick of paint) as well as a large number of new components from improved DVB support, better pygame tools, etc.

How are you planning on celebrating the 60th anniversary ?

:-)

Read and Post Comments

Where to put our Multicore support in the Kamaelia tree?

April 28, 2008 at 09:11 PM | categories: python, oldblog | View Comments

As discussed before, Kamaelia now has multicore support in subversion in the form of ProcessPipeline and ProcessGraphlines, meaning taking any Kamaelia system and making it multicore is a matter of simply pre-pending "Process" to the pipeline set up. That's pretty cool - especially if you're aware of what our normal cookbook code looks like. The question I've really got is where to merge this on the mainline. Given how useful this would be, it strikes me that like ThreadedComponent & LikeFile and Introspection, this ought to live in Axon. However, like Introspection, it probably also ought to be used from inside the Kamaelia Namespace.

As a result, it seems to make sense to do this - Put the core code in:
Axon.Processes
But put the ProcessPipeline & ProcessGraphline component in:
Kamaelia.Chassis.Process
So that you would use them as:
from Kamaelia.Chassis.Process import ProcessPipeline, ProcessGraphline
I'm pretty sure that's a pretty good idea - since it allows updates to the implementation that these use without affecting the interface.
That said, people will probably search for Multicore as well, so is it worth the naming actually being this:
from Kamaelia.Chassis.Multicore import ProcessPipeline, ProcessGraphline
... or simply having that available as an alias ?

Fundamentally this would still be used in the same way as previously described:
from Kamaelia.Chassis.Multicore import ProcessPipeline # this or
from Kamaelia.Chassis.Process import ProcessPipeline   # this?

ProcessPipeline(
                Textbox(position=(20, 340), # Open first pygame window
                                 text_height=36,
                                 screen_width=900,
                                 screen_height=400,
                                 background_color=(130,0,70),
                                 text_color=(255,255,255)),
                TextDisplayer(position=(20, 90), # Open second pygame window
                                        text_height=36,
                                        screen_width=400,
                                        screen_height=540,
                                        background_color=(130,0,70),
                                        text_color=(255,255,255))
                )

But the naming affects where you go hunting for the functionality.

My personal preference is for the former (Kamaelia.Chassis.Process), though I can see user friendliness in naming something based on what people are likely to hunt for being attractive.
Used without care, multiprocess usage would probably hurt performance - since messages between components in separate processes are pickled objects, but generally speaking, we all know you'd take that into account, wouldn't you...?

Thoughts?
Read and Post Comments

Interesting thing new faces....

April 27, 2008 at 11:29 PM | categories: python, oldblog | View Comments

New faces bring new ideas. As part of Google Summer of Code this year I asked upfront our students why they didn't want to use the mailing lists the project uses on sourceforge (since it was clear they didn't) - preferring private mails and IRC (as a project we tend to prefer IRC generally nyway). The response we got was unaminous around the fact they didn't want to subscribe due to SF lists being highly spammy, and requested we move over to google groups - so they could also gain better web access and RSS feeds. It was the one answer I hadn't thought of or expected :-)

So I chatted with the other members of the community and they all pretty much agreed, but they hadn't thought of saying anything (which strikes me as a bizarre version of the Bystander Effect :-).

Anyhow, as a result, I've shifted our list over and the new faces on the block are running rampant there, which is really cool. Not only that but it's encouraging students from previous years to start popping their heads back up (so far only on private mail, but I think they can be teased out further), which is really neat :)

Sometimes it's the little details you take for granted that you completely miss...

I just thought it worth sharing in case other people think it's worth asking their new colleagues for any suggestions for making their communities more accessible :-)

Read and Post Comments

Recent requests/Q and A

April 27, 2008 at 11:22 PM | categories: python, oldblog | View Comments

People have used the comment or new post feature of my blog recently to leave some useful comments. Rather than have them as top level posts though, I'll drop them as replies to this post. In summary though:
  • I had a complaint/bug report from Steve (no surname) about the dates in my RSS feed (which should now be fixed), about double escaping of entities (which is also hopefully fixes). Steve also made a comment saying that he wished he didn't have to enter HTML manually. This strikes me as odd, because I'm typing this using Dojo's editor widget, so I guess that failed disgracefully on his machine. I've seen that on a few machines, but Dojo's generally got the most browser friendly wysiwyg editor, so I'm not sure what's up there.
  • I had a request whether Kamaelia's latest release is available for windows as a special bundle. The answer to that really is "it's python, so it should work, but we tend to develop under linux & Mac OS X so you may find some niggles". I certainly haven't created an installer for windows. All that said, we are overdue doing a new release, and /trunk is far and away recommended. Even so, that needs updating as well with recent developments... :-)
  • Finally, another anonymous poster made the following comment:

Read and Post Comments

Python Bindings for AR Toolkit

March 28, 2008 at 04:56 PM | categories: python, oldblog | View Comments

Not tested this, but this looks really interesting/promising. The AR Toolkit is really cool, and this appears to be linux & mac os x bindings for it. (Means that using this people should be able to access a webcam easily from both of those OSs using python...)

Read and Post Comments

« Previous Page -- Next Page »