Festival works a treat! 

You can pull this from cydia

Here ya go! 

You will also need Erica's play audio from here

Then these two simple commands:

(1)    iPhone:~ root# flite "Yes it is true that. Da. I Phone.  Can speak" -o tmp.wav

(2)    iPhone:~ root# ./bin/playaudio tmp.wav 

here is the wav file pulled from the iphone of a real speaking iphone!!

Very cool!

New !NATIVE! converter for images

# ./bin/snap test
About to capture screen

# file test.png 
test.png: PNG image data, 320 x 480, 8-bit/color RGB, non-interlaced

Convert time:

# ./convert test.png test.jpg
# ./convert test.jpg test.tif

# file test* 
test.jpg: JPEG image data, JFIF standard 1.01
test.png: PNG image data, 320 x 480, 8-bit/color RGB, non-interlaced
test.tif: TIFF image data, little-endian

(test images are above for reference of fidelity)

New  !NATIVE!  gnupod on the iphone with perl mod ports

(I came out of retirement for this one as Benanzo has been asking for 
this for a long time)

"Warnings" have been removed from these vt100 grabs, all of this is to 
be executed on the iphone with the perl and gnupodprogs from above:

# gnupod_INIT.pl -m /var/root/Media
gnupod_INIT.pl 0.99.5 (C) Adrian Ulrich

Your iPod is mounted at /var/root/Media, ok ?
*********************************************************
This tool creates the default directory tree on your iPod
and creates an *empty* GNUtunesDB (..or convert your old
iTunesDB to a new GNUtunesDB).

You only have to use this command if
    -> You never used GNUpod with this iPod
 or -> You did an 'rm -rf' on your iPod

btw: use 'gnupod_addsong -m /var/root/Media --restore'
     if you lost your songs on the iPod after using
     gnupod_INIT.pl (..but this won't happen, because
     this tool has no bugs ;) )
*********************************************************

Hit ENTER to continue or CTRL+C to abort


Creating directory structure on /var/root/Media

> AppFolders:
+/var/root/Media/iTunes_Control/.gnupod
> Music folders:
> No 'Limit' file created or deleted..
> Creating dummy files
Found *existing* iTunesDB, running tunes2pod.pl
tunes2pod.pl Version 0.99.5 (C) Adrian Ulrich
> 1361 of 1361 files found, searching playlists
>> Playlist 'Mobile iPhone' with 1375 songs

 Done
   Your iPod is now ready for GNUpod :)


Ok time to get some mp3 action (again, why not keep it native :)):


# curl http://wickedpsyched.com/iphone/media/streamripper.gz | 
gzip -dc > streamrip ; chmod +x streamrip


# ./streamrip http://ct5.fast-serv.com:9104/ --quiet -a test.mp3
prefs_fn = /var/root/.config/streamripper/streamripper.ini
^C

Now to add it to the library:

# gnupod_addsong.pl -m /var/root/Media test.mp3
gnupod_addsong.pl Version 0.99.5 (C) Adrian Ulrich

not well-formed (invalid token) at line 1337, column 8, byte 1121620 
at /opt/iphone/lib/perl5/site_perl/5.8.8/arm-apple-darwin-2level/XML/Parser.pm line 187

Opps!

Line: 1337!!!  classic error!  Not quite 1337 as it turns out!

Turns out that the videos break gnupod right now on the iphone

21:46 < core> ah line 1337 is a HOMER SIMPSON video!
21:46 < core> ROFFFFEEEELLLLS
21:46 < core> that is just so funny
21:46 < core> it's barphing on GNUtunesDB.xml
21:46 < core> parsing this is hella slow though
21:47 < core> let's see if it gets past line 1337
21:47 < core> "GNUtunesDB.xml" 2743 lines, 1174718 characters written
21:47 < core> if it does I will LAUGH my arse off :)

(quick delete of line 1337 and the video from GNUtunesDB.xml and we are off again:


# gnupod_addsong.pl -m /var/root/Media --playlist "Benanzo PlayList" --playlist-is-podcast test.mp3

gnupod_addsong.pl Version 0.99.5 (C) Adrian Ulrich
> Adding songs to Playlist 'Benanzo PlayList'
+ [MP3 ][  1] test.mp3                         | Unknown Album                    | Unknown Artist
> Writing new XML File, added 1 file(s)


Now rebuid the tunes db:

# mktunes.pl -m /var/root/Media

mktunes.pl 0.99.5 (C) Adrian Ulrich
> Loading ArtworkDB...done
> Parsing XML document...
> 1362 files parsed, assembling iTunesDB...
> Creating iPod playlists...
>> Created Playlist 'Mobile iPhone' with 1375 files
>> Created Podcast-Playlist 'Benanzo PlayList' with 1 files
> iPod-GUID not detected. You can force the GUID using --fwguid
> Writing new iTunesShuffle DB
> Updating Sync-Status

You can now umount your iPod. [Files: 1362]
 - May the iPod be with you!


Done:





And better still it is "smart"

# gnupod_addsong.pl -m /var/root/Media --playlist "Benanzo PlayList" --playlist-is-podcast test.mp3

> Adding songs to Playlist 'Benanzo PlayList'
XMLhelper.pm: No need to create 'Benanzo PlayList', playlist exists already!
! [!!!!] 'test.mp3' is a duplicate of song 2, skipping file
> Writing new XML File, added 0 file(s)


Native streamripper

# ./streamripper http://ct5.fast-serv.com:9104/ --quiet -a test.mp3 &                   

makes a viable test.mp3 file on the phone.  It also uses hardly any (0%) CPU to manage this which is great!

Erica's playaudio works fine and dandy with these files, but alas this 
idea of using a relay server currently fails:

# ./streamripper http://ct5.fast-serv.com:9104/ --quiet -a /dev/null -r 8080
prefs_fn = /var/root/.config/streamripper/streamripper.ini


# ./playaudio http://localhost:8080/
----
AVController_CurrentItemWillChange
----
AVController_CurrentItemDidChange
2007-11-12 18:41:54.239 playaudio[318:d03] -[AVController failPlayback:reason:notifyClient:]: item with path [omitted] 
failed to open with err -12873
----
AVController_ItemFailedToPlay

we need to edit playaudio so that it keeps running...

Playing code via Celestial works just fine I've been using code that looks like this:

        avc = [[AVController alloc] init];
        avq = [[AVQueue alloc] init];
        avi = [[AVItem alloc] initWithPath:[NSMutableStringstringWithFormat:@"test.mp3"] error:&error];
        [avq appendItem:avi error:&error];
        [avc setQueue:avq];
        [avc play:nil];  

It works, but stops playback for sizeof() that is called at the start of the playback.

We need to use AVByteStream, but at the moment I've no idea how to...


LAME front end

-bash-3.2# ./lame --help
LAME 32bits version 3.97 (http://www.mp3dev.org/)

usage: ./lame [options]  [outfile]

     and/or  can be "-", which means stdin/stdout.

RECOMMENDED:
    lame -V2 input.wav output.mp3

OPTIONS:
    -b bitrate      set the bitrate, default 128 kbps
    -h              higher quality, but a little slower.  Recommended.
    -f              fast mode (lower quality)
    -V n            quality setting for VBR.  default n=4
                    0=high quality,bigger files. 9=smaller files
    --preset type   type must be "medium", "standard", "extreme", "insane",
                    or a value for an average desired bitrate and depending
                    on the value specified, appropriate quality settings will
                    be used.
                    "--preset help" gives more info on these

    --longhelp      full list of options