Hello everyone,
This week I’ll post to the steps to build the Raspberry Pi as a perfect Karaoke Machine with voice commands based song selector.
Well as previously said in the enrollment application and my 1st post that I’ll build the voice command based song selector and player. So I am posting that which I’ve worked.
This is the block representation of my idea.
It has totally 4 different blocks or parts.
In todays post I just tell about the installation of the few software which is used in handling these blocks.
Let’s start with database section.
In the whole idea this is the longest part. Otherwise the idea is small.
For the database section I created a php script which helps in storing the karaoke file and provide response to requests.
So for that I created a independent web-server on the Raspberry Pi.
For this firstly I installed apache and PHP on Raspberry Pi.
But before proceeding don’t forgot to change you Raspberry Pi default password because no one can access your raspberry pi without your permission.
For that enter the following in terminal
passwd
To install enter the following in the terminal
sudo apt-get install apache2 php5 libapache2-mod-php5
This will install the apache PHP5 and other important thing on the Raspberry Pi
Enter the raspberry pi IP in the browser
You get the response like this.
Edit the index.html file to see whatever you want. The file is located in /var/www/
See what I have made changes to the file and the response I get.
In order to edit the file using terminal you have the permission to edit the files.
To take the ownership of the web root
Enter the following in terminal
sudo chown -R pi /var/www
You can also check wheter your php is working or not.
For that enter the following in terminal
cd /var/www/
go to the web root folder
rm index.html
this will remove the old index.html file.
nano index.php
In the file add the following line
<?php phpinfo(); ?>
Now save the changes to the file.
Now open the browser and open your raspberry pi IP.
Or you can open in Raspberry Pi’s browser using IP http://127.0.0.1
This is the response what I’ve get
<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>
Now the next step is to installing mysql server.
To install mysql server enter the following in terminal
sudo apt-get install mysql-server mysql-client php5-mysql
while in the installation it will ask you to create a password. Enter the password of your own choice.
And the next step is to install phpmyadmin.
To install phpmyadmin enter the following in the terminal.
sudo apt-get install phpmyadmin
This will also ask you to create a password. Enter the password of your own choice.
And to checking phpmyadmin whether it is working or not. Enter the following in the browser.
http://raspberrypi_ip/phpmyadmin here raspberrypi_ip is your Raspberry Pi’s IP and make sure while using it from other device that the device is connected to the same network.
Here is what I have got.
<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>
<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>
You can now also use your raspberry pi as your own webserver just a small more configuration in your modem.
For using your Raspberry Pi as webserver you need to port forward to the few ports to your raspberry pi local IP
This is all for now....
I will post the next step in my next post.
If you have any problem and query regarding this don’t hesitate to ask I’ll try my best to answer it. If you have any suggestion’ please comment below.
Continued on Raspberry Pi and Karaoke Machine (Implementation of Karaoke Part 2 of 2)
Regards,