HOWTO: PyKaraoke

From Sabayon Wiki
Jump to: navigation, search
This article uses Portage. Do not proceed if you have no idea what Portage is.

How to install the PyKaraoke application for playing karaoke files under Sabayon Linux

The two alternatives for playing karaoke files in Linux are KMid and PyKaraoke. Earlier versions of KMid did not support international characters or diacritics (accents), but the latest versions do. PyKaraoke also supports international characters and diacritics.

PyKaraoke can play CDG (.mp3+.cdg, .ogg+.cdg, .wav+.cdg), MIDI (.mid/.kar) and MPEG (.mpg) karaoke files. You can read about PyKaraoke (Python Powered Karaoke) on its home page

Open a Terminal window, log-in as the root user and follow the steps below.

1. Install the Timidity MIDI player if it is not already installed:

emerge -1v timidity++

2. Install the Timidity patches required by PyKaraoke:

emerge -1v timidity-eawpatches

3. Install sdl-mixer with the timidity USE flag (and mp3 USE flag if you will want to play mp3 files using PyKaraoke):

USE="mp3 timidity" emerge -1v sdl-mixer

The package sdl-mixer was already installed when I installed Sabayon Linux, but I was getting the message "Error opening file. <class 'pygame.error'> Module format not recognized" from PyKaraoke when I tried to play a .mid or .kar file. It was because sdl-mixer had been compiled without the timidity USE flag, hence the recompile of sdl-mixer shown above.

4. Use your favourite text editor and add the following line to /etc/make.conf if it's not there already:

File: /etc/make.conf
PORTDIR_OVERLAY="${PORTDIR_OVERLAY} /usr/local/portage/"

5. Create a directory to store a local ebuild for PyKaraoke:

mkdir -p /usr/local/portage/media-sound/pykaraoke

6. Download the ebuild file pykaraoke-0.7.1.ebuild from Gentoo Bugzilla Report No. 137415 and copy it to /usr/local/portage/media-sound/pykaraoke/pykaraoke-0.7.3.ebuild (notice that it is renamed).

7. Download the file from the Download page of the above-mentioned PyKaraoke Web site and copy it to the directory /usr/portage/distfiles/

8. Install the PyKaraoke package:

emerge -1v pykaraoke

If an error message is displayed stating that the pakage is masked by missing keyword, edit as root user the file /etc/portage/package.keyword and add the following line:

File: /etc/portage/package.keyword
~media-sound/pykaraoke-0.7.3 **

A PyKaraoke icon will automatically be added to Kickoff > Applications > Multimedia, so you can launch PyKaraoke using that, or just enter the command pykaraoke at the command line if you prefer.

Article created by Fitzcarraldo on 10 April 2009.