-1

I am new to Stackoverflow, and I am actually working on a J2EE web app that stores information onto a Mysql DB, including audio files that I record on a JSP page.

Now I am stuck on the recording and storing the audio file on the database. i also have looked that up and it seemed to be possible, but all the answers were short and ambiguous.

Thanks everyone for your help.

EDIT: My question is, is there a way to record audio on a JSP page and sent the result file to the database?

  • 1
    Please mention the problem you are facing ? This question is not clear :( – Ankit Nov 21 '16 at 17:30
  • @ankitjava the problem os that I don't know how to capture audio on the computer's mic and store the file onto my database. – ZackTheRed Nov 21 '16 at 17:34

2 Answers2

1

You can solve the audio recording issue by referring to this link http://subinsb.com/html5-record-mic-voice.

They are using HTML5 for recording the audio. They are also providing the option to download the code on your system and test it.

On second part of your question, you now have audio file recorded by your jsp page and you can send it across to AJAX handler (also described on the document) and save your MySQL database or do accordingly as per your requirement.

Hope it helps :)

Ankit
  • 2,126
  • 4
  • 33
  • 53
  • Hi, thanks for your feedback, this also helps. So i think that I'll just use the html5 code and try to upload the recorded file to the server and then store the path on the database. – ZackTheRed Nov 21 '16 at 20:35
  • This can be other possibility. However, you can store audio file into your database table with above flow. – Ankit Nov 22 '16 at 05:25
0

You can try and use HTML5 to record audio.

Look at this page for an example.

After this, there quite a few ways to send the data to the webserver.

One of them can be REST call POST. You can send the data and then store it in the database.

Look at this answer.

Community
  • 1
  • 1
Pritam Banerjee
  • 17,953
  • 10
  • 93
  • 108
  • Thanks for your answer, but the problem is after recording the audio, how can I store the file onto the database? Knowing that I don't have to save it on the user's computer, I should send it through directly. – ZackTheRed Nov 21 '16 at 17:48
  • 1
    You might want to dig around for a plugin that does this if you're not prepared to try and make one yourself. – tadman Nov 21 '16 at 18:04