Python/JavaScript clues please?
March 19, 2017 8:27 PM   Subscribe

My elderly stepmother wants an app that will ask my elderly father any of several preset questions she chooses in his own voice. I want the app to be able to record new phrases and create new presets from them. I want to make this app myself -- no existing apps! Do you have any clues you can spare?

My elderly stepmother wants an app that will ask my elderly father any of several preset questions she chooses in his own voice. That part is easy, on a computer at least. I know some HTML/CSS, and a little JavaScript/jQuery and Python. BUT I want this app to be able to record new presets with the click of a "button" and store each one as a new button she can choose. That needs to have a SUPER-simple interface and I'm having trouble figuring out what knowledge I need to do this. A desktop app would be OK, but an Android app she could install on her phone would be ideal -- and I know NOTHING about making phone apps.

To top it all off, I will make this app myself -- no existing apps. Need clues tho.

OK, so this is partly a joke on my stepmother's part and partly a useful thing -- my dad has severe hearing loss and cannot hear people speak unless they're a basso profundo, which my dad happens to be himself. My stepmother is totally willing to install and learn to use a new app -- if it's as easy as, say, Facebook. My dad is a good sport, and will let us record him. I have a Windows computer and an iPhone -- no Android phone, unfortunately.

So this app would:
  • Open the microphone, record and store an audio file, say, "Are you hungry?" in my dad's voice
  • Provide an interface where my stepmom can (a) type in the phrase in the audio file (Are you hungry?) and (b) select the category it belongs to (Eating)
  • Create a friendly-looking, rounded-corner button on the Eating screen, marked Are you hungry? that she can click to replay the audio file.
How would YOU do this?
Please get as technical as possible, and explain like I'm 25. I can google what I don't understand -- but only if you use the real words. Thanks for any help you can provide!
posted by pH Indicating Socks to Computers & Internet (6 answers total) 2 users marked this as a favorite
 
Best answer: A basic Android app is pretty simple to make. It does use a language you seem unfamiliar with- Java- but I think that Java is simple enough to pick up if you have prior programming experience, and there's no shortage of beginner tutorials on the web.

Download Android Studio to get started- you won't need an Android phone to develop (you can use an emulator). The official Android development tutorials are a pretty good basic source. In fact, all the major aspects your app will need- an interface, saved data, a way to interface with the microphone- are all covered in just the Getting Started portion- so I would start off by literally just going through the entire Getting Started tutorial (skipping the Supporting Different Devices section), and googling any unfamiliar terms or syntax you encounter.

That's about as much specific help I can give you as someone who's only messed around a bit with Android, but hopefully it's a start!
posted by perplexion at 10:12 PM on March 19, 2017 [1 favorite]


Best answer: If you want to use your HTML/JS knowledge to create an Android app, you might look into Apache Cordova as a framework for that. Visual Studio has some built-in support for Cordova if you want a more integrated development experience.
posted by Aleyn at 11:43 PM on March 19, 2017 [1 favorite]


Cordova also works on the iPhone, but you're going to need a Mac to build for it. Maybe you can pick up a cheap Android phone or tablet for testing. That's a problem, but the bigger problem I see here: basso profundo voice out of a tiny, tinny phone speaker? Maybe there's a bluetooth speaker that it can be paired to?
posted by destructive cactus at 12:20 AM on March 20, 2017


Maybe you could seek inspiration from various flash cards apps?
posted by oceano at 1:14 AM on March 20, 2017


If I wanted to do this with the least hassle possible I would go about it in a very piecemeal approach.

Using any sort of MP3 recorder, get a few sample files to work with, use MP3 tags for the important data: categories -> tags; text -> title

Write the Python to scan the info out of the files using some Python MP3/ID3 library.
Turn that into a HTTP that shows the info and does filtering on the tags. Add JavaScript/CSS to make it pretty and send the MP3 file to the browser when the button is clicked.

Then make a different Python program with a PyQt or PyWebKit or whatever GUI and figure out how to record the MP3 in a nice and easy way.

Because I don't know IOS and don't know how to build an app, or even if you can put an app on an iPhone without going through the Apple Store, but you should be able to browse to the server running on the Windows box and get it to play the MP3 somehow. I'm also not sure if/how to record audio using the browser. Maybe WebRTC or something?

Anyway, figure out the scanning of MP3, build a HTTP server to serve your webapp and media, make it pretty however you like, then figure out a recording solution. Then come up with a name, a business plan, move it to EC2 and start a startup. :)
posted by zengargoyle at 2:34 AM on March 20, 2017


It's unclear to me if your grandfather is going to provide you with audio samples of given phrases, or if you want to generate phrases in his voice without his cooperation.

The latter is rather more complicated - but if that's what you're targeting, you may find Adobe's Project VoCo of interest.
posted by doctor tough love at 10:33 AM on March 20, 2017


« Older Is a washi tape design on the wall above a heater...   |   [Scoliosis filter] wheeze wheeze cry Newer »
This thread is closed to new comments.