|
eddiewalker posted:You probably commented it out in /etc/modprobe.d/alsa-base.conf or have something amiss in /etc/asound.rc I ended up just doing a fresh install of Raspbian and reinstalled Festival, sphinxbase and pocketsphinx. I changed the index on one line in alsa-base.conf from -2 to 0 so that the USB sound card would be the default card. It now shows as default card, and when I do arecord -l the card shows up as a recording device. I'm starting to wonder if maybe I just don't have a good microphone hooked up.
|
# ? Sep 13, 2013 02:32 |
|
|
# ? May 20, 2024 00:35 |
|
Sorry for the double post. I got a new microphone and it still doesn't work. I'm starting to think this $0.99 with free shipping USB sound card might not be the best quality I do have a USB mic that works and captures. Is there a way to set a seperate sound card for the line-in, or to make Pocketsphinx use specifically a certain device?
|
# ? Sep 13, 2013 21:33 |
|
Rubiks Pubes posted:Sorry for the double post. I got a new microphone and it still doesn't work. I'm starting to think this $0.99 with free shipping USB sound card might not be the best quality What? Even those TIGER games at the checkout lanes in the 90s cost more than 99 cent. Can you link the card or give us the name of it?
|
# ? Sep 13, 2013 21:36 |
|
Google made an image designed for developing web apps: Coder
|
# ? Sep 13, 2013 21:55 |
|
It looks pretty nice for teaching kids web development, but I wish it supported the server-side coding as well.
|
# ? Sep 13, 2013 22:05 |
|
Brady posted:Just installed Raspbian via NOOBS and for some reason the GUI takes up more room than the visible screen, ie: my icons and "taskbar" are mostly out of view. I was able to check the display settings and it's showing 1080x1920 with no other options other than "Auto", which sets it to 1080x1920 anyway. Assuming the resolution isn't backwords, look at the overscan settings in raspi-config
|
# ? Sep 16, 2013 03:02 |
|
I finally got Pocketsphinx to work by plugging in a USB mic and specifying -plughw:1,0 option from the command line. But the accuracy is total poo poo. One of the sites I saw said to use a 48000 sample rate but every time I try to specify sample rate I get an error message.
|
# ? Sep 16, 2013 15:31 |
|
I never had any luck getting alsa to force my interface to anything but its native sample rate, then I resample down in my recording app just to lower the amount of data to be processed so the RPi doesn't choke. I don't know anything about the software you're using, but 48k is high, above CD quality even. Telephony is traditionally 8k, so I'd be surprised if the software needed more than that to get intelligible speech.
|
# ? Sep 16, 2013 16:06 |
|
Anyone talked about this yet? Tessel appears to be something like a Raspberry Pi or Arduino that runs javascript, apparently in the Node.js style, considering it has NPM (node package manager) support. It's more a microcontroller than microcomputer, but for people like me, who like the Raspberry Pi because it makes it easy to put GPIO on a network, this looks really cool. It has built in Wifi, too.
|
# ? Sep 22, 2013 15:14 |
|
TVarmy posted:Anyone talked about this yet? It's a lot closer to an Arduino than a Raspberry Pi, with a Cortex-M3 processor. I'm interested, but only insofar as they've been able to cram a JavaScript engine on a Cortex-M3.
|
# ? Sep 22, 2013 16:51 |
|
While we're on the topic of "kinda like a Pi", somehow I managed not to hear about the BeagleBone Black until yesterday. It's A comparison: http://makezine.com/magazine/how-to-choose-the-right-platform-raspberry-pi-or-beaglebone-black/ e: Oops, wrong price Powered Descent fucked around with this message at 18:05 on Sep 22, 2013 |
# ? Sep 22, 2013 17:42 |
|
Powered Descent posted:While we're on the topic of "kinda like a Pi", somehow I managed not to hear about the BeagleBone Black until yesterday. It's The one thing that makes it even better for non-graphical applications and development work is that you can use the Ubuntu/Debian armhf architecture on the BBB, whereas on the RPI you are stuck with either the Raspbian-armhf rebuild of Debian's wheezy or using Debian armel which is quite slower than armhf.
|
# ? Sep 22, 2013 21:34 |
|
I hate to keep posting and asking scripting questions but I am finally, so close to having this setup working the way I want it to. I am now to the point that I have my little JARVIS rig listening for voice commands using Google's speech to text and turning lights on and off, etc. The only problem is that it is constantly 'cycling' and sending results of nothing to Google. So you have to wait on it if it's in the middle of sending out whatever it's recorded. Here's the code I have for that part, which works: code:
Here's the code for what I have: code:
|
# ? Sep 23, 2013 02:34 |
|
Rubiks Pubes posted:I hate to keep posting and asking scripting questions but I am finally, so close to having this setup working the way I want it to. There's no reason to use "shred -u" over "rm" for what you're doing other than causing extra wear on the SDcard. I also don't see a file named "whatyoutyped" being created at all. What's missing? Is there a cronjob dumping the weather into weather.txt? What's your syntax error? It's really hard to help without it. code:
Don't background it. Don't "arecord" into flac (sox will do this by itself). It presumably blocks (nothing else in your script executes while it's waiting). That's what you want. Everything else after it is contingent on recognizing what's in that wav, so there's no point in continuing if it hears nothing (other than potentially getting blackholed for abuse of Google's servers). Don't use wget for POSTs, use curl (libcurl is a million times more capable and you should be using curl for everything you'd use wget for anyway). Additionally, by the time you're using multiple awks in a very lone pipeline, it's time to consider another language. Or assigning the results to variables (that you can then echo into awk for more processing). There's a lot that can go wrong in your pipeline.
|
# ? Sep 23, 2013 16:18 |
|
I've never programmed anything before. This is a mishmash of other projects I've found online and hacked together to accomplish this. A cronjob dumps the weather data hourly into weather.txt. I will post the syntax error when I get home. It appears to be a missing single quote but I can't find it.
|
# ? Sep 23, 2013 17:45 |
|
Rubiks Pubes posted:I've never programmed anything before. This is a mishmash of other projects I've found online and hacked together to accomplish this. A cronjob dumps the weather data hourly into weather.txt. code:
|
# ? Sep 23, 2013 18:31 |
|
OK, I got it to run using the following code but it doesn't seem to send anything to Google for translation. I don't get any feedback from anything spoken into the mic. But, it runs! code:
|
# ? Sep 24, 2013 22:56 |
|
Stop and think about this.code:
So you start sox. You background it so it keeps running. You keep track of the PID (which you do absolutely nothing with) You immediately try to reencode as flac. Why? Does Google require flac? Why not have sox do this itself? The problem with this is that you're not checking whether or not the sox pid has exited. You're not even checking if the .wav you're trying to convert exists. Then you try to POST that flac to read it. And parse it with sed. Why are you escaping the quote here? You immediately hit talker() again, with the previous instance of sox potentially running. I have no idea what happens if you try to start a second instance listening on the same device. Does it start? Does it crash? You try to convert a test.wav that still may not exist. Here are the problems with your script: The Pi's CPU is weak. Converting between wav and flac isn't a great idea when sox can do flac directly. You're not checking whether or not test.wav even exists before you try to convert it (and there are extremely good odds that it will not) You're not checking whether or not test.wav has been written to in the last second -- in other words, whether or not sox is still trying to record a command, and there are extremely good odds that it will be. You're still hammering Google's servers with useless garbage. You don't do anything with the PID. What you script needs to do: Not background sox or check to see whether sox_pid is still running or stat() test.wav and check the times. This solves all the other problems. Checking whether the PID is still running will uselessly hammer the (weak) CPU. Just let sox do its thing and go from there. As I said in my last post, your entire script depends on that output. Wait for it.
|
# ? Sep 25, 2013 16:08 |
|
evol262 posted:
The script I used as my base did some monitoring to close the sox PID if there was silence, but I couldn't get my script to work properly with that part in there. quote:You immediately try to reencode as flac. Why? Does Google require flac? Why not have sox do this itself? EDIT: Google does require FLAC quote:The problem with this is that you're not checking whether or not the sox pid has exited. You're not even checking if the .wav you're trying to convert exists. How would I go about doing either of these things? quote:Then you try to POST that flac to read it. And parse it with sed. Why are you escaping the quote here? The script looks for the output from Google for each case. Google returns it in quotes. So I need to remove the quotes for it to work as a case. quote:You immediately hit talker() again, with the previous instance of sox potentially running. I have no idea what happens if you try to start a second instance listening on the same device. Does it start? Does it crash? I do get an error message on occasion that the resource for recording is unavailable. I assume that's because of this. quote:You try to convert a test.wav that still may not exist. Again, I'm flying by the seat of my pants here so what do I need to do to check that it's there? quote:What you script needs to do: What exactly is causing it to run backgrounded in the options? How would I check to see if it is still running? And how do I check the times? I 100% appreciate the fact that you are helping me out here... and I hope I'm not being too annoying. But I am beyond a newbie at this and am pretty much doing this through trial and error and Googling. edit: I looked up how to check if the file exists and added an if/then to the script to make sure it's not doing anything with the file if it isn't there. Also I added in the code from the other script that kills the SOX PID if necessary. When I try to run it I get a syntax error on line 91 which is the last } in the file - I am assuming that something I added is the cause of it. The error is: ./jarvis4.sh: line 91: syntax error near unexpected token `}' ./jarvis4.sh: line 91: `}' code:
Rubiks Pubes fucked around with this message at 01:29 on Sep 27, 2013 |
# ? Sep 27, 2013 01:12 |
|
Sox is running the background because you have an ampersand after the command.
|
# ? Sep 27, 2013 02:05 |
|
Rubiks Pubes posted:Also I added in the code from the other script that kills the SOX PID if necessary. When I try to run it I get a syntax error on line 91 which is the last } in the file - I am assuming that something I added is the cause of it. But that's ok. Let's step back a bit. What do you want the script to do? Listen on the mic. How does it do that? It starts sox and starts recording when it hears something. Ok, so how do you know when sox is done? You can pick from these choices:
The ampersand says "detach this from the foreground and run as a background job in the current shell". "nohup" would detach from the current shell and run on its own (effectively setting the parent PID (PPID in ps) to 1, so it doesn't get reaped when the parent process goes away). Removing the ampersand will make sox block. Sox won't proceed to the next command until it exits (and it won't exit until it's done recording). This immediately removes all of your problems. I mean, there's a possibility that it'll write some gibberish. Or you'll accidentally kill it. Or whatever. But your script basically stops here and waits for input, which exactly matches the behaviour of your "read" in the original script.
|
# ? Sep 27, 2013 18:22 |
|
Awesome! Thank you for putting it in simple terms for me. That totally makes sense. I will add the "fi"s in and get rid of the ampersand and see how that goes.
|
# ? Sep 27, 2013 23:50 |
|
OK I removed the ampersand and added in the missing "fi" and I am still getting the same drat syntax error. I can't figure it out. Is there a better program I can use to edit than TextEdit on OSX? I used to use Coda for web editing and I liked the color coding. Anyway here is the current code and syntax error: code:
jarvis4.sh: line 92: `}' WTF am i missing?
|
# ? Sep 28, 2013 15:11 |
|
Your first if doesn't have a matching fi.
|
# ? Sep 28, 2013 15:23 |
|
Rubiks Pubes posted:OK I removed the ampersand and added in the missing "fi" and I am still getting the same drat syntax error. I can't figure it out. Rubiks Pubes posted:Is there a better program I can use to edit than TextEdit on OSX? I used to use Coda for web editing and I liked the color coding. Rubiks Pubes posted:Anyway here is the current code and syntax error:
|
# ? Sep 28, 2013 16:19 |
|
I'm looking to use my Pi as a gaming console for NES/SNES games. I tried downloading a RetroPi image but I can't figure out how to get it to work properly. I try following a couple of guides, but it always boots into some Apple OS and I don't really know how to start the actual emulator. How do I do this when I'm incredibly lazy?
|
# ? Sep 28, 2013 18:06 |
|
evol262 posted:You don't actually need any of the other checks as long as sox is blocking, just FYI. OK, so I copied and pasted exactly what was in this box and replaced what I had. I uncommented the one #fi (which I assume was the one missing) and tried running it and am still getting the same error, this time on line 87. Not sure what to do about your comment on killing the SOX pid. I tried completely commenting out that section and it still gave the same syntax error. I cannot figure out what I am missing now.
|
# ? Sep 28, 2013 20:36 |
|
Rubiks Pubes posted:OK, so I copied and pasted exactly what was in this box and replaced what I had. I uncommented the one #fi (which I assume was the one missing) and tried running it and am still getting the same error, this time on line 87. code:
|
# ? Sep 28, 2013 20:57 |
|
OK, now it runs, and records, but it doesn't stop recording. It doesn't do anything with any of the commands listed in the script. If I hit enter on the keyboard it just starts recording again.
|
# ? Sep 28, 2013 21:43 |
|
Rubiks Pubes posted:OK, now it runs, and records, but it doesn't stop recording. It doesn't do anything with any of the commands listed in the script. If I hit enter on the keyboard it just starts recording again. This is sort of beyond what a forum can do. Is speech.txt there? What's in it? Start echoing out your variables to see what's happening.
|
# ? Sep 28, 2013 21:55 |
|
evol262 posted:This is sort of beyond what a forum can do. Is speech.txt there? What's in it? speech.txt is there but there's nothing in it. When I play back file.flac it's just static.
|
# ? Sep 28, 2013 22:05 |
|
Rubiks Pubes posted:speech.txt is there but there's nothing in it. When I play back file.flac it's just static. Mic broken? Bad sox options?
|
# ? Sep 28, 2013 22:14 |
|
The mic worked with the old script so I doubt it's broken. Not sure about sox options. I'll fiddle with it. I appreciate your help but I don't want to continue flooding this thread with this crap.
|
# ? Sep 29, 2013 00:29 |
|
You could post a thread in the programming forum, I'm sure people will be into it e- I have no idea what I'm talking about here, but if you're getting non-stop recording and it's static, you probably want to take a close look at the sox options and make real sure it's using the right audio source with all the trimmings. If you're just reading in a ton of noise from somewhere your silence-detection stuff is never going to trip and end the show. edit again: I'd specifically look at this http://wiki.audacityteam.org/wiki/USB_mic_on_Linux#Making_sure_ALSA_detects_the_mic make sure that plughw:1,0 (which refers to Card 1, Device 0 in the lists you get) is definitely referring to your mic baka kaba fucked around with this message at 01:25 on Sep 29, 2013 |
# ? Sep 29, 2013 01:01 |
|
Rubiks Pubes posted:The mic worked with the old script so I doubt it's broken. Not sure about sox options. I'll fiddle with it. I appreciate your help but I don't want to continue flooding this thread with this crap. Suggestion: test sox just on its own with the same options.
|
# ? Sep 30, 2013 15:38 |
|
Boz0r posted:I'm looking to use my Pi as a gaming console for NES/SNES games. I tried downloading a RetroPi image but I can't figure out how to get it to work properly. I try following a couple of guides, but it always boots into some Apple OS and I don't really know how to start the actual emulator. I spent an afternoon playing with RetroPi. You have to select the type of emulation you want, there was some key to open the menu or switch between emulations. Try mashing the keyboard a bit. I did not play with it for long because I could not work out how to get a controller working so gave it up as being a bit too underdeveloped for my low level skills to manage. I intend to return later when there was a bit more support available. I did get Street fighter 2 turbo running from the keyboard though and it worked well.
|
# ? Oct 1, 2013 00:49 |
|
This thread is too quiet. Anyone doing anything cool with their PI? I am making a kit for deaf people that converts their standard doorbell into a doorbell that sends a text when it is pressed. It uses an AC optocoupler and the python software just polls a gpio pin. The rest is just sending a http request to an sms gateway via mechanize. I wish the pi would catch on in the states outside of hackerspaces... I also think the raspberry pi foundation should shell out a little bit of money to be able to include dive into python on the raspbian image. For kids that don't know anything, without internet access, etc. A big link on the desktop that said "GET STARTED HERE ->". It would also be pretty cool if someone funded a MECC type company for the raspberry pi. I've already said it, but the pi has all the computing power necessary to replace PCs in elementary schools. I have fond memories of my elementary school lab full of apple IIs in 1992. The benefit of the PI would be that the kids could easily have one at home and all they would need to do would be take the SD card with them. I guess all the educational buzz in the US is around tablets though. SYSV Fanfic fucked around with this message at 18:59 on Oct 2, 2013 |
# ? Oct 2, 2013 17:23 |
|
keyvin posted:This thread is too quiet. Anyone doing anything cool with their PI? I am making a kit for deaf people that convert their standard doorbell into a doorbell that sends a text when it is pressed. It uses an AC optocoupler and the python software just polls a gpio pin. The rest is just sending a http request to an sms gateway via mechanize. I was making something using the gPhoto2 libraries to make the Pi send a liveview from my DSLR to my phone via Bluetooth. I got the Pi talking to my camera, but then before I could fully figure out Bluetooth, my phone's Bluetooth seems to have died and doesn't work for any kind of file transfer now.
|
# ? Oct 2, 2013 17:37 |
|
keyvin posted:This thread is too quiet. Anyone doing anything cool with their PI? I just completed a servo-wheeled robot controlled by a wireless pi mounted on it. Playing with python now to try to make an interface on my phone to control it. I am also looking into peoples quad-copter projects but thinking its probably a little beyond me right now.
|
# ? Oct 2, 2013 19:27 |
|
|
# ? May 20, 2024 00:35 |
|
Well my project is pretty much stuck. I'm thinking about finding something else to do with mine but I'm not sure what.
|
# ? Oct 3, 2013 20:42 |