Monday, February 11, 2008

Choosing image format for PSP

If you are running any version of the firmware other than Version 2.0, keep in mind that all images must be in JPEG format and that the PSP is not capable of displaying particularly large JPEG files. Use an image program like Photoshop to save your images into compressed JPEG format. Most likely, your digital camera came with software capable of handling this basic compression of images.

If you are running Version 2.0 of the firmware, then your PSP can handle JPEG, GIF, PNG, TIFF, and BMP images, and you can also download images directly from the Internet using the PSP's Browser. To do this, select the image, then hit the Triangle button, navigate to the File menu, hit the X button, select Save Image, and hit the X button again. After it finishes downloading, you can immediately navigate to the image and view it on your PSP.

Regardless of which image format you use, you can conserve disk space by scaling your image down so that it's close to the PSP's 480 x 272 pixel screen resolution.

Storing Digital Photos on Your PSP

Using your PSP as a portable photo album is easy if you know how to fill the Memory Stick Duo card with images. If you know the different viewing options and controls on your PSP, you'll be showing off your photos in no time.

One of the PSP's most useful functions is also one of its most simple: the ability to display digital images. The majority of the tips covered in this chapter, and a few from other chapters, hinge on this simple ability. This tips walks you through the basics of managing digital images on your Sony PSP, different ways of getting the images onto the PSP, and navigating the images once they are on your PSP, and points you to some of the more useful ways digital images can be used to add functionality to your PSP.

Put Images in Your PSP
To place images in your PSP, you need to either mount your Memory Stick on your computer using a card reader, or connect your PSP to your computer using a USB mini to USB cable, select Settings >USB Connection from the PSP's Home menu, and hit the X button.

Once the Memory Stick shows up on your computer, you will find a folder called PSP in the card's root directory. Within the PSP folder are four other folders: GAMES, MUSIC, SAVEDATA, and PHOTO. You can simply copy any images that you want to carry around with you on your PSP into the PHOTO directory on the card.

You can also organize the photos on your PSP by grouping them in folders within the PHOTO folder.

Currently, none of the images on my PSP are larger than 250 KB in size, with the majority of the images falling in the 3264 KB range. You can view larger images on the PSP, but the larger the file size, the longer it will take the files to load, and you won't really see much improvement in image quality after a certain point because of the PSP's screen resolution.

PSP is only capable of reading one level deep into the PHOTO folder, so if you have another folder nested inside a folder inside your PHOTO folder, the PSP will either not see it, or it will show it as being corrupt data.

There are also a variety of programs available that automate organizing your pictures and moving them to your PSP. Two of them are iPSP (http://www.kaisakura.com/ipsp.php; $19.99 USD for both OS X and Windows) and PSPWare (http://www.nullriver.com/index/products/pspware; $15 USD for OS X and Windows). Both of these feature abilities beyond simply managing your pictures, and both programs have demo versions, so try before you buy. For example, after clicking on the Photos section of iPSP and choosing a photo album from iPhoto in OS X, iPSP begins automatically converting the images within the album into properly sized JPEGs and importing the images into their own directory within the PHOTO folder on the Memory Stick.

If you own a digital camera that works with a Memory Stick Duo card, then you can simply remove the card from your camera and put it in the PSP to view photos. When you choose Photo Memory Stick and hit the X button on your PSP, these images will appear in a directory called Digital Camera Images.

How to transfer iTunes songs to PSP?

Drag the "Get the Current Song" action from iTunes over to the workflow. This simple action grabs the track currently set to play in iTunes and passes it along to the next action.

Choose Finder in the Application pane of Automator and drag Move Finder Items over to the workflow. Set the To: option to the MUSIC folder located inside the PSP folder on your Memory Stick and leave the Replacing existing files box unchecked.

When you run this complete action, it will prompt you for a text file, which it will then launch in TextEdit and write to an AIFF file on your desktop. Once this file is fully created, iTunes will launch and import the file, converting it to MP3, and then it will pass the track along to the Finder, which will place the file on your Memory Stick. Enjoy.

Wednesday, February 6, 2008

Automate Audiobook2PSP

This will be a three-part workflow: it will first prompt the user to select a text file; it will then read the text file to AIFF and convert it to MP3; and it will finish by moving the created audiobook to the proper place on your PSP.

Choose a text file
Open Automator and select the Finder from the Applications pane. Drag the "Ask for Finder Items" action and the "Open Finder Items" action into your workflow. In the first action, set "Type:" to Files and "Start at:" to Desktop, then type Choose a text file to convert to MP3: in the "Prompt:" field. Leave the Allow Multiple Selection box unchecked. This part of the workflow will open up a dialog prompting the user to select a text file for conversion to MP3 and then pass that text file along to the next action.

In the second action, set "Open with:" to TextEdit. The text file selected in the first part of the action will open in TextEdit. That's it for the first section of this workflow.

Convert the text file to an MP3
Next, select TextEdit in the Automator Application pane. Drag the "Get Contents of TextEdit…" action into the workflow. This action simply scrapes the text from the front-most page (the page that the first part of this workflow just opened) in TextEdit and passes this text along to the next action.

Next, drag the "Text to Audio File" action over to the workflow. Here you can choose whichever System Voice you prefer; it will default to whatever voice you have set in System Preferences Speech Text to Speech. Whatever name you give the audio file under the Save As: field will be the same name (minus the .aiff) as the final track as it appears on your PSP. I went for the generic audiobook.aiff, but feel free to name your track whatever you like. Set Where: to the Desktop.

Select iTunes in the Application pane of Automator and drag the Import Audio File, Start iTunes Playing, and Pause iTunes actions into the workflow. Make sure you set the Import Audio File action to use MP3 Encoder and check the "Delete source files after encoding" box to neatly remove the audiobook.aiff file that was created on the desktop in the previous step. The next two actions simply ensure that the recently encoded audiobook.mp3 file is the file currently selected in iTunes before going on to the next section of the workflow.

Automate Movies2PSP

Now, the previous Automator workflow was dead-on simple. This one is about the same. This time, open up Automator and choose Spotlight from the Application pane. Drag the Find Finder Items action over to the workflow. Under Where, choose your Movies folder and under Whose, choose "Name" and "Ends With," and enter .MP4 in the field.

Choose Finder in the Application pane and drag the Move Finder Items action to the workflow. Set To: to the 101MNV01 folder inside the MP_ ROOT folder on your Memory Stick and check the Replacing Existing Files box.

That's it. Save as either a workflow or application and make sure you have your PSP connected and mounted before you run it.

Automate Mac OS X File Transfers to PSP

If you're running Mac OS X Tiger, then you can set up Automator to move all your media files onto your PSP.

I spent a little time in Automator (located in the Applications folder) and put together some basic applications to move my files from my Mac to my PSP. I'll walk you through each of them. Each of these can be saved as either an Automator action or a standalone application. Please excuse the cheesy names I've given to these little apps.

PSP Playlist2PSP
The first and easiest of these little apps is built with just a few actions, but you have to set it up first. Open iTunes and create a Playlist called "Transfer to PSP." On your PSP, create a folder inside the Music folder (located inside the PSP folder), and name this folder "from iTunes."

Open up Automator. Choose iTunes from the Application pane and drag the Find iTunes Items action over to the workflow. Under Find, choose Songs and under Whose, choose "Playlist," then "Is" and "Transfer to PSP." Now, choose Finder in the Application pane and drag the Move Finder Items over to the workflow. Under To: set the location to the "from iTunes" folder you created on your PSP and check the Replacing Existing Files box. Figure 3-16 shows the completed workflow.

That's it. Save as either a workflow or application. Make sure that your PSP is connected and mounted and that the songs in the "Transfer to PSP" playlist are in PSP-compatible formats before you run it.

Further Improvement for Text to Speech

Mac users can create an AppleScript droplet that takes any .txt file that you drop onto it, and uses do shell script to run the appropriate say command, then grab the resulting file, import it into iTunes, convert it to MP3, and move the resulting file to the Music folder on your PSP. Such a script is beyond my novice AppleScripting skills.

Of course, if you have Mac OS X 10.4 Tiger, you could easily do this with an Automator action.

Since LAME and text2wave are both command-line tools, it's easy to automate this process on Linux. For example, you can make your MP3 with one command line:

text2wave input.txt | lame - output.mp3

Saturday, February 2, 2008

Converting Your Speech File

Now all you have to do is take the resulting AIFF or WAV file and drop it into iTunes, then select the file and choose Advanced>Convert Selection to MP3 to let iTunes convert the file to an MP3.

Make sure that under Importing in iTunes' Preferences, you have the encoder set to MP3 Encoder. Since this is a very basic audio track, you may want to play around with the settings of the encoder to create a smaller file, making more space for other files on your Memory Stick.

If you don't have iTunes, then you can use a free program such as LAME (http://lame.sourceforge.net/) or Audacity (http://audacity.sourceforge.net, which uses LAME under the hood to perform the conversions) to convert the file to MP3.

After converting the file, select the freshly converted version of the file and select File >Show Song File to display the MP3 in the Finder. Simply drag the file over to your PSP's mounted Memory Stick and drop it into /PSP/MUSIC/, so that you can listen to it on the PSP.

PSP Text to Speech using Mac OS

Launch your Terminal (located in /Applications/Utilities/). Now, assuming the text file that you want to convert is called text.txt and is located on your Desktop, at the command line, type the following:

sayf ~/Desktop/text.txto ~/Desktop/text.aiff

This string will read the text.txt file on your Desktop to a new AIFF file on your Desktop called text.aiff, using the default System voice settings you have defined in the "Text to Speech" section of your Speech control panel (System>Preferences >Speech Text to Speech).

Unfortunately, when I say that the say command will read your text file to an AIFF file, I'm being literal. You won't hear it, but the process will happen in real time. If you are converting a long piece of text to audio, be ready to leave your computer running and do something else for a good half hour or more.

PSP Text to Speech using Linux

The open source Festival (http://www.festvox.org) includes an application called text2wave, which reads in a text file and outputs a .wav file. You may be able to find Festival in your Linux distribution's package repository, so check there before installing from the source.

Once you've got the .wav file out of text2wav, you can convert it and drop it into /PSP/MUSIC/ on your Memory Stick. By default, text2wave will read from standard input and dump its .wav to standard output. You can create a file with a command such as
text2wave input.txt -ooutput.wav.

You can change text2wave's settings by evaling a valid festival command. For example, to change the voice to voice_kal_diphone, you'd do this:

text2wave input.txt -o output.wav -eval "(voice_kal_diphone)"