Skip to main content
Participant
November 27, 2008
Answered

Thanksgiving Challenge - ListenUp Java Applet integration

  • November 27, 2008
  • 2 replies
  • 618 views
For those that like a Challenge... I came across this Java Applet that appears to be quite powerful to add recording and playing of voice audio files to a website:
http://www.javasonics.com/downloads/

I have not been successful in writing the coldfusion code yet that will read the information that is passed from this Java Applet with respect to sound file (wav), file name, and other fields that are in the form when created.

This is the format of the use of the Applet that I would like to get working on the site:
http://www.javasonics.com/listenup/examples/use_text_fields.html

I look forward to anyone that can get this code working and how you did it with ColdFusion.

Thanks,
Tom
support@daybreakengineering.com

This topic has been closed for replies.
Correct answer ProWebService
-==cfSearching==-

Thank you for your help on this and for the detailed step by step on how to implement it and get it working on my server! I really appreciate your help!

A few questions that I do have is you say, "BTW, as you are debugging and testing watch out for caching!"

If I have this on a site and let's say there are 20 people or even 50 people using this Java Applet at the same time recording some audio, what potential problems do you see this causing the server?

What would be the best way to avoid this problem?

Is it memory on the server that would be the limiting factor?

When you say watch out for caching what exactly do you mean by that and what is the best way yo avoid it?

Thanks again for all your help!

V/R,
Tom

2 replies

Inspiring
November 28, 2008
BTW, as you are debugging and testing watch out for caching!
Participant
November 27, 2008
When I run their PHP version that works on a Linux System and the Java Applet debugger on this is the result from the time the file is handed off from the Java Applet to the PHP Code.

Can anyone tell if the file is actually being written to the server then PHP is reading it from the server or is it just being written to memory and PHP is reading a variable or memory block for this data?

ListenUp: 49.081, sendRecordedMessage(message_12345.wav)
ListenUp: 49.091, sendRecordedMessage: upload message_12345.wav
ListenUp: 49.101, start upload, freeMem = 3535456, totalMem = 5640192
ListenUp: 49.431, got compressed image, freeMem = 3453040, totalMem = 5640192
ListenUp: 49.671, got MIME data, freeMem = 3387064, totalMem = 5640192
ListenUp: 49.902, MultipartFormDataUploader: POST size = 15733
ListenUp: 49.902, parseStatusLine: HTTP/1.1 100 Continue, len 21
HTTP/1.1 200 OK
Cache-Control: private
Connection: close
Date: Thu, 27 Nov 2008 18:38:07 GMT
Content-Type: text/plain
Server: Microsoft-IIS/6.0
X-Powered-By: PHP/4.4.1
X-Powered-By: ASP.NET

<param name=userfile>
raw_name = message_12345.wav
name = message_12345.wav
type = audio/wav
size = 15420
Upload dir = ../uploads
duration = 2.6006349206349206
SUCCESS - message_12345.wav uploaded.
ListenUp: 50.332, DynamicMemoryBuffer: deleting array.
ListenUp: 50.332, finished upload, freeMem = 3487480, totalMem = 5640192
Inspiring
November 28, 2008
I have never used it. But I was bored and this is what seemed to work for me on windows. If it works great. If not ... oh well I tried ;-)

1. Unpacked files and moved the "listenup" directory to:
c:\coldfusion8\wwwroot\listenup\

2. Downloaded the commons fileupload jar from
[ Download -> http://commons.apache.org/downloads/download_fileupload.cgi ]

.. and placed it in the codebase directory:
c:\coldfusion8\wwwroot\listenup\codebase\


3. Created a subdirectory to store my cfm test files:

c:\coldfusion8\wwwroot\listenup\listenup_cfm\

4. Created two test files. One to display the form and the other to process it on the server.

The form file content is straight out of "use_text_fields.html". I just change the uploadURL to point to my handling page.

<!--- c:\coldfusion8\wwwroot\listenup\listenup_cfm\use_text_fields.html --->
<applet ....>
....
<param name="uploadURL" value="handle_upload_TextFields.cfm">
....
</applet>

My handler page uploads the sound file to a subdirectory and writes the results to the a log file. But you can do whatever you want the results:


ProWebServiceAuthorCorrect answer
Participant
November 28, 2008
-==cfSearching==-

Thank you for your help on this and for the detailed step by step on how to implement it and get it working on my server! I really appreciate your help!

A few questions that I do have is you say, "BTW, as you are debugging and testing watch out for caching!"

If I have this on a site and let's say there are 20 people or even 50 people using this Java Applet at the same time recording some audio, what potential problems do you see this causing the server?

What would be the best way to avoid this problem?

Is it memory on the server that would be the limiting factor?

When you say watch out for caching what exactly do you mean by that and what is the best way yo avoid it?

Thanks again for all your help!

V/R,
Tom