1

I'm having a hangup that I can't seem to get past. I'm not asking for code (although that would be nice), just trying to get going in the right direction. I'm trying to record audio on my website (press a button and speak into a mic), then have that recording saved onto a server (different than the one that I have my website on). I've found a few flash recorders, but they all seem to want to save to a hard drive on the clients computer. Has anyone had any success with doing something similar? Any recorders that may be easier to accomplish this on? The recorders I've read about seem to be lacking documentation in saving the audio to a MySQL database.

Thanks!

Milksnake12
  • 551
  • 1
  • 9
  • 19
  • You don't need to save your audio data in a database. Just as in storing images, you should just store the audio data in organized files. – Mark Garcia Aug 30 '12 at 05:56

3 Answers3

1

You don't wanna store the audio in a MySQL database, you wanna store the path to the audio files in the database.

There's a bit of an outdaded example here, showing how you could save the audio on your server. Then it's just inserting the path in an appropriate table in MySQL and you're done.

Sherlock
  • 7,525
  • 6
  • 38
  • 79
  • Well the reason I wanted the audio in the MySQL was I have a Phone system that draws the audio out of the database. I'll see about just saving it somewhere on the server. I also looked at the link to the WAMI recorder. I've read what they have and I still can't seem to figure out how to actually tell it where to send the audio file. – Milksnake12 Aug 30 '12 at 06:02
  • Does that 'phone system' draw the audio straight out of the database, or is it using some kind of API giving back the audio? I can't imagine that that phone system actually cares where the data exactly comes from. – Sherlock Aug 30 '12 at 06:03
  • It looks like it is actually saved in there in a BLOB. But if just dumping them in a file on the server is less troublesome, I would be willing to go that rout as I could direct my phone system to those as well. Do you know of any documentation where this is carried out? And thanks for the responses as well! – Milksnake12 Aug 30 '12 at 06:09
  • That, of course, depends on the Flash recording thing you're using, but usually you can set a path to which the audio files get saved, just as in my example. What recorder are you using? – Sherlock Aug 30 '12 at 06:14
  • I'm not sure yet, I was looking for a recommendation for the best one to use with what I am trying to accomplish. You mentioned the WAMI, would that be appropriate for this task? I was a little confused with it's docs. – Milksnake12 Aug 30 '12 at 06:16
1

you ever tried to store images on a website? audio clips have the same manner. just save the file name in database and the clip in a specified folder. at the time of retrieving ,you have to retrieve the name of file from the database and make a complete path to play the audio. hope it help.

Gaurav
  • 638
  • 6
  • 18
0

DO NOT save multimedia or large files into your database. You may save filename and associated data into your database table. The file may be given a unique name and you may store that in the database. The file may be copied into the server with that UNIQUE filename and you may even create a folder with some unique name and may be copied the file into that. But the path of the file should be able to retrieve from the database.

Also, you may refer to this stackoverflow question How to record voice files using PHP, FLASH

Community
  • 1
  • 1
Alfred
  • 21,058
  • 61
  • 167
  • 249
  • Ok, so the consensus is not to put the audio straight in the DB. I'll now be hunting on the same question, just with putting the audio file in a folder on the server. – Milksnake12 Aug 30 '12 at 06:14
  • I believe that is what I'm still having trouble with, going from the actual recording, and then sending it to the server. Have you seen any docs saying how to accomplish this? – Milksnake12 Aug 30 '12 at 06:22
  • have you referred the question I mentioned? – Alfred Aug 30 '12 at 06:25
  • I did, I can't go the RED5 direction. – Milksnake12 Aug 30 '12 at 06:29
  • I've also read about saving the files onto your server after saving. Unfortunately they have all been about saving them on the same server that the webpage is on. I need to then send that audio file off to another server. – Milksnake12 Aug 30 '12 at 06:34
  • I think you won't get an exact solution. You have to do a research yourself and come back to stackoverflow. You may change the file upload path to another server. Its possible. – Alfred Aug 30 '12 at 06:36
  • I'm starting to see that. This has given me enough to go on, I think I have a new direction to look in. Thanks very much! – Milksnake12 Aug 30 '12 at 06:40
  • Best of luck @Milksnake12 . You are always welcome to ask for support in stackoverflow :) . Consider upvoting (click up arrow) and accepting this answer (click check icon) if I helped you. – Alfred Aug 30 '12 at 06:44
  • Is there really a consensus about not saving multimedia or large files in db?? Why exactly? Is that something scientific or just a belief everybody just obeys without thinking about??!! – Heitor Jan 07 '20 at 18:38