Welcome to the MP3Car.com forums.
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact contact us.
|
08-01-2001, 02:36 PM
|
#1
|
|
Variable Bitrate
Join Date: Nov 2004
Posts: 239
|
Quote: Originally Posted by jeffw 
I couldn't quite figure out how Sonic did it, but I just finished something a little more limited but works well for my needs. I can say "play <artist>", as well as "play <playlist>". The main inconvenience is that I have to rerun my script that generates the command.xml file each time a new artist is added. For me this isn't too bad. Note, that new songs added to an existing artist don't require any extra work. Also when I generate a new commands.xml, I have to shut down and restart RR to pick up the changes.
I wrote an AutoIt script that just grabs the name of each artist directory in my music folder and adds an appropriate play line in the commands.xml. I keep any playlists (.m3u) at the same level as the artist folders, so it grabs those too.
Here's the script:
Code:
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.2.2.0
Author: Jeff Wilder
Script Function:
Reads artist directory names in music folder and creates play commands For
them in commands.xml. When compiled, you will be able to say, for example,
"play The Rolling Stones".
Note:
This script assumes music folder directory structure of <artist>/<album>/<song>,
or just <artist>/<song>.
Note:
commands_in.xml contains other voice commands for other features. I made
it by copying the original commands.xml and deleting the last 4 lines
(they are added back in at the end of this code). This script basically
reads in every line of commands_in.xml and writes them to commands.xml,
then writes the artist commands, then the last 4 lines to terminate the XML
tags.
Note:
The voice tag will be identical to the directory name. You may want to tweak
the artist directory names to make this more convenient, or you can make custom
exceptions in the code, like I did for "Beethoven".
Note:
There are some characters in artist names that cause the Grammar compiler To
fail. The most common is "&". Just manually replaces these with "and" in
you artist directory names.
#ce ----------------------------------------------------------------------------
; Shows the filenames of all files in the current directory.
$search = FileFindFirstFile("p:\music\*.*")
$in_file = FileOpen("c:\program files\road runner\commands_in.xml", 0)
$out_file = FileOpen("c:\program files\road runner\commands.xml", 2)
; Check if file opened for reading OK
If $in_file = -1 Then
MsgBox(0, "Error", "Unable to open input file.")
Exit
EndIf
; Check if file opened for writing OK
If $out_file = -1 Then
MsgBox(0, "Error", "Unable to open output file.")
Exit
EndIf
; Copy contents of xml input file to new commands file
While 1
$line = FileReadLine($in_file)
If @error Then ExitLoop
FileWrite($out_file, $line & @CRLF)
WEnd
; Check if the search was successful
If $search = -1 Then
MsgBox(0, "Error", "No files/directories matched the search pattern")
Exit
EndIf
; Loop through directories and files in music folder, and write voice command to xml output file.
While 1
$file_name = FileFindNextFile($search)
If @error Then ExitLoop
$tag = $file_name
If StringInStr($tag, "m3u") Then
; Found a playlist instead of artist directory, just strip off the .m3u for the voice tag
$tag = StringLeft($tag, StringLen($tag) - 4)
EndIf
If StringInStr($tag, "beethoven") Then
; Custom hack: some artist names are too long and I just want to abbreviate the voice tag
$tag = "Beethoven"
EndIf
$line = StringFormat (" <P VALSTR=""LOADLIST;C:\\music\\" & "%s;%s"">play %s</P>" & @CRLF, $file_name, $file_name, $tag)
FileWrite($out_file, $line)
;MsgBox(4096, "File:", $file_name)
WEnd
; Write end of file stuff
FileWrite($out_file, " </L>" & @CRLF)
FileWrite($out_file, " <O>percent</O>" & @CRLF)
FileWrite($out_file, " </RULE>" & @CRLF)
FileWrite($out_file, "</GRAMMAR>" & @CRLF)
; Close the file handles
FileClose($search)
FileClose($in_file)
FileClose($out_file)
Wow, good work here!
But there has to be an easier way to just capture the speech and set that as a variable in RR to use in the querywinamp.vbs smartplaylist plugin/script
|
|
|
11-18-2007, 08:50 PM
|
#2
|
|
Variable Bitrate
Join Date: Nov 2004
Posts: 239
|
speech idea
This might could be something for RR's speech integration or maybe even a plugin but here it goes.
Have any of you seen the commercial for the new Ford Focus with Microsofts Sync software? Yeah the one where the two guys are in the car and the driver says, "Play <artist>" and the stereo plays that artist? (sorry forgot what they actually say). Wouldn't that be cool for RR? Wait this isn't available for RR yet is it?
|
|
|
11-18-2007, 09:48 PM
|
#3
|
|
FLAC
Join Date: Aug 2006
Location: West Allis, WI
Vehicle: 1986 Jaguar XJS
Posts: 947
|
Yes it is, voice control has been implimented for quite awhile I believe anyway. It is hard to get to work though. I messed aroung with a spech recognition plug in a few years back and in a noisey car or with the radio on it made it pretty hard to make it understand your commands correctly.
Maybe the technology is better now, like I said this was a few years ago.
|
|
|
11-19-2007, 08:13 AM
|
#5
|
|
MySQL Error
Join Date: Sep 2004
Location: Woodbridge, VA
Vehicle: 2003/Acura/RSX
Posts: 4,818
|
also using this in my car as i have been for a year or so now it seems... its really hit or miss in terms of understanding commands over the road noise in the automobile.. with the use of the voice control plugin and the winamp library i can do just what the "sync" system does now.
__________________
03 Acura RSX Coupe
a K.I.S.S Flash, VB, and Autoit Programmer
HARDWARE PROGRESS: 90%[/////////-]
Current Project: RRFusion, MovieTimes, RRMail, & CentraFusion
|
|
|
11-19-2007, 02:24 PM
|
#6
|
|
Variable Bitrate
Join Date: Nov 2004
Posts: 239
|
Quote: Originally Posted by Sonicxtacy02 
also using this in my car as i have been for a year or so now it seems... its really hit or miss in terms of understanding commands over the road noise in the automobile.. with the use of the voice control plugin and the winamp library i can do just what the "sync" system does now.
I'm aware of the integrated RR voice control but didn't know that it could play certain songs on command.
Sonic, can you elaborate on how to setup your winamp library and the voice plugin to get it to do this?
Last edited by juve021; 11-19-2007 at 04:09 PM.
|
|
|
11-19-2007, 03:01 PM
|
#7
|
|
MySQL Error
Join Date: Sep 2004
Location: Woodbridge, VA
Vehicle: 2003/Acura/RSX
Posts: 4,818
|
i'll have to dig up the code because its been so long since i made it lol but its based on the plugin that was recently created. You can find details on it here. I cant tell it to play certain songs currently. What i do is press the button.. then say "Play artist Puffy" and that command is broken down into 3 variables:
Play- Obviously tells winamp to play the file
Artist- Sets the $mySearchType$ variable in rr to "artist".. this tells rr to pre-load this code defined in my exectbl.ini as opposed to SEARCHSONGALBUM or SEARCHSONGGENRE
Code:
"SEARCHSONGARTIST","RUNQW;wscript.exe" "$rrpath$\SmartPlayLists\queryWinamp.vbs" "$winamppath$" "artist HAS "$MySearch$"" "||RELOADLIST||Load;Audio_player.skin"
Puffy- Sets the rr varbiable $MySearch$ to Puffy and instructions rr to run the command.
Simple enough right? lol. Right now i can say any Artist, Album, or Genre name and have requested term play (whenever the mic doesnt pick up a ton of noise and ruin the command)
__________________
03 Acura RSX Coupe
a K.I.S.S Flash, VB, and Autoit Programmer
HARDWARE PROGRESS: 90%[/////////-]
Current Project: RRFusion, MovieTimes, RRMail, & CentraFusion
Last edited by Sonicxtacy02; 11-19-2007 at 03:03 PM.
|
|
|
11-19-2007, 03:14 PM
|
#8
|
|
Variable Bitrate
Join Date: Nov 2004
Posts: 239
|
Quote: Originally Posted by Sonicxtacy02 
i'll have to dig up the code because its been so long since i made it lol but its based on the plugin that was recently created. You can find details on it here. I cant tell it to play certain songs currently. What i do is press the button.. then say "Play artist Puffy" and that command is broken down into 3 variables:
Play- Obviously tells winamp to play the file
Artist- Sets the $mySearchType$ variable in rr to "artist".. this tells rr to pre-load this code defined in my exectbl.ini as opposed to SEARCHSONGALBUM or SEARCHSONGGENRE
Code:
"SEARCHSONGARTIST","RUNQW;wscript.exe" "$rrpath$\SmartPlayLists\queryWinamp.vbs" "$winamppath$" "artist HAS "$MySearch$"" "||RELOADLIST||Load;Audio_player.skin"
Puffy- Sets the rr varbiable $MySearch$ to Puffy and instructions rr to run the command.
Simple enough right? lol. Right now i can say any Artist, Album, or Genre name and have requested term play (whenever the mic doesnt pick up a ton of noise and ruin the command)
Wow this is exactly what I'm talking about! Anychance I could get this script from ya?
|
|
|
11-19-2007, 03:21 PM
|
#9
|
|
MySQL Error
Join Date: Sep 2004
Location: Woodbridge, VA
Vehicle: 2003/Acura/RSX
Posts: 4,818
|
i'll have to pull it from the car pc but yea i'll post it for everyone.
__________________
03 Acura RSX Coupe
a K.I.S.S Flash, VB, and Autoit Programmer
HARDWARE PROGRESS: 90%[/////////-]
Current Project: RRFusion, MovieTimes, RRMail, & CentraFusion
|
|
|
12-02-2007, 07:35 PM
|
#10
|
|
Variable Bitrate
Join Date: Nov 2004
Posts: 239
|
Quote: Originally Posted by Sonicxtacy02 
i'll have to pull it from the car pc but yea i'll post it for everyone.
Sonic did u ever get a chance to do this?
|
|
|
12-16-2007, 05:29 PM
|
#11
|
|
Variable Bitrate
Join Date: Nov 2004
Posts: 239
|
SONIC!!! please post this plugin/file!
|
|
|
12-16-2007, 07:32 PM
|
#12
|
|
MySQL Error
Join Date: Sep 2004
Location: Woodbridge, VA
Vehicle: 2003/Acura/RSX
Posts: 4,818
|
unfortunately i no longer have the file as a lost a mobo and a hard drive a few weeks ago.. i'm in the process of setting it back up though because i'm getting an andrea mic for xmas.
__________________
03 Acura RSX Coupe
a K.I.S.S Flash, VB, and Autoit Programmer
HARDWARE PROGRESS: 90%[/////////-]
Current Project: RRFusion, MovieTimes, RRMail, & CentraFusion
|
|
|
12-17-2007, 11:58 AM
|
#13
|
|
Variable Bitrate
Join Date: Nov 2004
Posts: 239
|
Quote: Originally Posted by Sonicxtacy02 
unfortunately i no longer have the file as a lost a mobo and a hard drive a few weeks ago.. i'm in the process of setting it back up though because i'm getting an andrea mic for xmas.
NOOOOOO!!!!!!!
Crap, well hope you get the sys back up and running soon! Dang, that andrea mic is nice!
|
|
|
12-19-2007, 11:43 PM
|
#14
|
|
Low Bitrate
Join Date: Jun 2006
Location: DuPont, WA
Vehicle: 2006 HUMMER H3
Posts: 72
|
Quote:
...
Puffy- Sets the rr varbiable $MySearch$ to Puffy and instructions rr to run the command.
Simple enough right? lol. Right now i can say any Artist, Album, or Genre name and have requested term play (whenever the mic doesnt pick up a ton of noise and ruin the command)
This is great... one part I don't get, though. How is "Puffy" in Voice Control's vocabulary, in order to spell it properly in the search query? I thought Voice Control would only recognize words that are in the commands.xml file.
|
|
|
12-20-2007, 12:15 PM
|
#15
|
|
Newbie
Join Date: Jun 2005
Posts: 22
|
Old joke:
Voice control radio in car.
Driver sees a big rig transporting cattle. He says "Look at that truck full of cows."
Radio switches to Country & Western.
Driver says "My wife screwed up the checking account."
Radio switches to blues.
Driver says "Looks like a rock slide on the road."
Radio switches to Classic Rock.
Driver is almost hit by a kid on a skateboard, says "F....g kids."
Radio play a Michael Jackson song.
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:47 PM.
|
|