N900 as a talking parrot
[Solution in post #6]
Okay, I admit that this is a crazy idea but... For a one-off application, I want "something" to continuously monitor an audio line-in (mono would do just fine), detect audio over a certain threshold level, record it until it drops back below the threshold, wait for a given period, play it back, go back to monitoring. And I want it to run unattended. Detecting the threshold should be easy as the input line is squelched, so the level should be at zero (bar the input electronic's own noise) most of the time. I did an online search and found at least one parrot program for Windows, but not that flexible (you need to press a button to record, it plays back randomly...). Then I had the brilliant idea to harness my spare N900 to do something like that. My experience with Linux audio programming equals exactly zero. I suppose I could rip Recaller, myDicto or Orecchiette to shreds and learn something in the process, but I thought I'd ask first. Perhaps what I want could be done with a script? It sounds crazy, but having seen what people can do with a simple command line (like streaming video to a PC), my confidence in what Linux can do for someone who knows how to ask has no limits ;) |
Re: N900 as a talking parrot?
Quote:
|
Re: N900 as a talking parrot?
OK, so howto?
When I said the detection should be easy I meant the conditions are well defined. It should be easy for someone who knows how to do it but, as I say, I am a complete noob in software audio processing. Linux or otherwise. I was even thinking about two daemons, one continuously recording audio in, let's say, one-second chunks, the other one picking up those chunks, analyzing them and deleting if found to contain silence. Definitely a battery - and possibly eMMC - killer but I only want to run it for one day and on a charger. (And stream to a disposable SD card.) BTW, where did the tag come from? ;) |
Re: N900 as a talking parrot?
Crazy idea i want this !
|
Re: N900 as a talking parrot?
Quote:
Unfortunately I do not know that much about N900 so I cannot give exact advice on how to do it. |
Re: N900 as a talking parrot?
For those of you still curious, here's my solution. Not exactly as I would ideally like but good enough for my purposes.
An extensive search on this forum yielded this post about recording and playing back audio from the command line. Easy as pie. The next step was to sort out the triggers. I have not yet figured out how to catch the end of the event and would appreciate any input on that. For the time being, I am using a timer which is good enough for my purposes. But how to trigger the start? It turned out I had the right tool with me all this time: VU Meter! This nifty utility can run a command at a predefined threshold volume. The rest was to write a simple script and configure VU Meter. The only problem was that VU Meter executed the script every time the threshold was exceeded, even if a previous instance was already running. So I had to take care of that. Oh, and I had to configure tracker to ignore the target directory. The same effect could be achieved by using a different directory but I wanted the target under MyDocs, to make sure I have enough space and to be available in mass storage mode. Without further ado, here is my magic script: Code:
#!/bin/bash |
Re: N900 as a talking parrot
Out of plain curiosity - what are you using that for? Kids?
I was wondering about variant that would say the thing you've just said in N900's own voide (espeak). But, it would require pocketsphinx to make it understand, and as Saera proved, it's not working ideally. |
Re: N900 as a talking parrot
Quote:
In fact the connection quality test was my primary reason for wanting this in the first place :) Unfortunately other things got in the way and I could not proceed to the implementation for a while and then I forgot about it altogether. Now you've reminded me, I pretty much have to :) |
Re: N900 as a talking parrot
Absolutely awesome and hilarious, in positive way. If I stumble upon talking N900's in some mountain path or forest late at night, I'll know what it is, at last ;)
|
Re: N900 as a talking parrot
i know some people doing it with Python
https://github.com/zioproto/pyparrot they use a vhf radio with a Cubieboard there is a video in this italian blog post http://zioproto.ninux.org/wordpress/...-e-cubieboard/ |
All times are GMT. The time now is 06:51. |
vBulletin® Version 3.8.8