Using an app to control it not only made it simpler, but also increased its usability. With this, the overhaul of our Raspberry radio is complete! Simply end the URL with a “/” then type “#” followed by the title, and that title will show up if you’re using SHOUTcast. By adding your favorite stations to make an original playlist, you’ll get a lot more fun out of your radio! There are a lot of stations out there aside from what’s available on SHOUTcast, so get looking and give one a try! Playlists can be edited through a text editor. This will continue to happen each time you load a new playlist. Press “Edit” on the top right of the “playlist” screen and then “Clear playlist.” It will have been added onto the existing playlist, so you’ll see duplicates. Return to the “playlist” screen from the menu, and you’ll see the playlist you just added. Press the name of a playlist to load it up. Press the “Menu” on the top left of the screen, which will make a menu show up on the left.Ĭhoose “Saved playlist” from here to display the saved playlists in your Raspberry Pi playlist folder (/var/lib/mpd/playlists/). You can also switch playlists via the app. ![]() It almost feels like a remote control for your Raspberry Pi! Like most other audio player apps, this one has play, pause, and volume control functions. Touch the radio program name and it will begin to play through your Raspberry Pi speakers. (I used the M3U file that we downloaded earlier, so there are a few duplicates in the list.) The screenshot here shows three MP3 files up top, followed by the SHOUTcast playlist file content. If the app detects playlists, it will automatically load them and display them on the screen. Android has a lot, though, so search for “MPD” and pick out a good looking one for your phone.Īll you need to do is installing the app on your smartphone. There doesn’t seem to be many iOS apps that support what we’re doing. To use Internet radio with my iPhone5, I downloaded an app called MPoD. When you want to empty the playlist and start over, use the “clear” command. This is a little confusing, since the file saved is also called a playlist. (I had a really hard time with this until I figured it out.) Executing the “playlist” command will show the “current playlist,” as seen in the Help. So *Nix and Python gurus, care to point out how I'm being an idiot and how I can fix it.The content of “tunein-station.m3u” shows up! “test1_list” was still loaded, so “tunein-station.m3u” was added onto it. The subprocess and Popen both complain that it can't find mplayer (I've tried fully qualified paths there and no luck). The system call just prints the command string and then exits out (is the code ending before mplayer? If so how do you get it to wait?). ![]() I have tried os.system, subprocess, Popen. SpeakSpeechFromText (random_line(filePath)) GoogleSpeechURL = getGoogleSpeechURL(phrase)ĬommandString = '/usr/bin/mplayer -ao alsa -really-quiet -noconsolecontrols ' + googleSpeechURLįilePath = "/home/pi/TalkingSkullPhrases.txt" Hopefully someone can tell me what I am doing wrong? import urllib, os, random, urllib.request, urllib.parse, shutil, subprocessĭata = (parameters) This will be mounted inside of a ceramic skull for the delight of ghosts and ghouls in the neighborhood. My ultimate goal is to have a small python 3 script start at start-up and every so often say some random statement. The Pi happily goes out to Google and plays, via mplayer, the TTS. Let me start by saying that this works: #!/bin/bash I only dabble in Linux and Pi so I have come to the experts for guidance. (This is on a Raspberry Pi B running -wheezy-raspbian, update and upgrade have been run, mplayer is installed and tested, coding using Python 3)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |