Jump to content
  • Announcement

    Welcome to the forums!

    If you are a newly-approved member, make sure you check out the New Member Checklist!

    If you are a Detachment member and can't see the member-only area, post here for access.

    -DV

Recommended Posts

Posted

Hello a while back I acquired ionicdesign's audio file for Darth Nihilus' voice. I have taken that file chopped it into 39 audio files and labeled them in three sections, short, medium, and long phrases. Then I wrote a c++ program that plays it upon button input to select the short medium or long functions. I'm also attempting to develop one in Python for use on raspberry pi (cause I learned windows dependencies don't work on pi)

 

I am currently offering the full c++ program to do with as you wish including the chopped up audio with the original authors permission. Let me know if your interested.

This code will be distributed free!

if you find someone redistributing this for cost its definitely not from me!

 

 

 

 

 

Posted

also if interested there is totally the possibility of me building you one! 

Though in the interest of your shipping fees, you would provide your own battery. ( i live effectively on an island and lithium batteries don't agree with transport via air)

Posted

well i never had any luck with good audio thru an arduino (this will run the C++ that i have already developed) but youd be looking at

https://store.arduino.cc/usa/arduino-micro -$19.80 
https://www.adafruit.com/product/1944 -$15

https://www.adafruit.com/product/3351 -$4

+ wire for your setup -$4

ultra micro switches from E-switch or C&K like 5$ with shipping for 5 switches small enough to fit in the fingers of my glove)

Once i can get the Python working  you can use the Raspberry pi zero (limited availibility) but thats only 10 bucks so half the price of the micro..

plus this

https://www.adafruit.com/product/3346 -$13

 

if you were to buy all of this youd kinda have to teach yourself how to use them (honestly not that hard if your technologically savy and keen on learning)

if you wanted me to build it for your in the same way im planning mine ( the battery and audio processing will be on my wrist under the glove with a speaker around my neck on a collar of sorts.)

maybe add a little for labor? havent really thought about that yet. 

though if you know anyone that can code well in python i will totally help you build one for cost+shipping

 

id have to get enough people on a list if i was to make them as shipping to me (in alaska) is horrible. 

 

sending you both a link to download the code.

 

Posted
Hmmm. I wonder if I can do about the same thing with a CHIP.
Probably but I don't know how to make those and I know I like making things. Lol

Sent from my Nexus 6 using Tapatalk

Posted

CHIP is a little $7 mini computer. It is a lot like Arduino, except it has wifi, blutooth, and a standard speaker jack. A bit bigger than the micro, but I have one sitting around, so I might as well try.

Posted
CHIP is a little $7 mini computer. It is a lot like Arduino, except it has wifi, blutooth, and a standard speaker jack. A bit bigger than the micro, but I have one sitting around, so I might as well try.
Probably then. You got me interested. Let me know. May need a mini amp


Sent from my Nexus 6 using Tapatalk

Posted

yeah this is really interesting. reading the specs it's giving me flashbacks to my C64! :)

Sent from my SAMSUNG-SM-G920A using Tapatalk

  • Like 1
Posted

I would love this! Shouldn't be a hard thing to build either!

Sent from my SM-G920V using Tapatalk

Posted
If you start building these id be interested. I can fix a Harley all day but doing something like this scares me.
Pm sent

Sent from my Nexus 6 using Tapatalk

Posted

Olala, le Me is interested. I suck hard at electronics although my job is forcing me to work with them. :D

I would like some info on such a voice device. Thanks in advance, mate!

 

Posted

Played with the audio file a bit, but I clearly lack the know how to to make the setup it seems. I would be interested in info on having one made if you get your design down. In that event, could you PM me with details?

Posted

@DarthCephalus I absolutely will..

ill post it here if i get something a little less mad sciencey

though as a not to all readers future and current i live in AK so you will have to provide your own lithium battery and possible do the soldering for it. 

Posted (edited)

Hey, new to the forum so chiming in here.

You could install Windows onto a Pi, which would solve your C++ dependencies. Not the way I'd do it, but it *should* work.

Important Notes:

  • Not knowing what way format your audio files are in, I'll cover MP3 (first example) and WAV (second example) for fun
  • Each example will show two different ways it should work to play (first using the command line with MP3, the second using Pygame to play WAV files)
  • This code was done off the top of my head, as I recall doing it. I don't have it with me, so humor any minor errors

In this case, I'm going to assume using GPIO pins 23, 24, and 25 for a 3-button configuration.

This example is using 3 buttons and each is mapped to a single file:

<snipped> find working code further down

This example is a 3-button configuration that will play a random file from a pool (e.g. long, medium, short). It requires sorting your files by something (I did it by directory here, but you could use annotated filnames to do the same thing (e.g. 1short.wav, 2short.wav, 1long.wav, etc.etc. and filter on short/medium/long.wav):

<snipped> find working code further down

Both of the above *should* work substituting paths and whatnot as required, but I haven't tested it. Once it's confirmed working, then it's a matter of running the script at boot, which I use crontab ('crontab -e'):

@reboot /usr/bin/python /path/to/script.py &

 

Edited by cooldevo
fixed some formatting and missed syntax/lines of code
Posted

If you could send me the audio files (or a link to them), I can get the above running on my Pi tonight and update the code sample to ensure it's valid and working.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...