Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (497)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Recording Audio Via JWS and XFer Using ftp  (Read 2264 times)
0 Members and 1 Guest are viewing this topic.
Offline dranonymous

Junior Member




Hoping to become a Java Titan someday!


« Posted 2007-02-08 20:18:57 »

I need to make a simple app that can record speech for me. This application will be used by non-technical people, who have little to no understanding of audio formats, specs, etc.

This is what intend to do -

- Record audio on the users computer
- Play audio on the users computer
- Save the audio to a file on their computer
- Send the file to my computer
- Run using JWS

My thought is to run a simple ftp server on my computer (on a non-standard port). The app would ftp the audio files up after they have been recorded.

The user would do the following -

1 - Run the app via JWS
2 - Press a button to start the recording
3 - The screen would present a word to the user, which they say
4 - The app pauses a few seconds and the shows another word
5 - After say 10 words, the application automatically stops recording
6 - The file is transferred up to the server
7 - The repeat 2 - 6 a few times for different sets of words
8 - They are now done and exit the app

I'm sure there are ftp libraries out there for java. The thing I'm not sure of is how to do the recording, ie what approach - JMF, Java Sound, other?

Can you all share some experience and make some suggestions?

Cheers,
DrA>
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #1 - Posted 2007-02-09 13:26:44 »

Recording using JavaSound is easy (just check the tutorials). Make sure your JWS application is signed though, or else java's security won't let you record anything.

The thing is, as far as I know JavaSound can't write any standard audio file format so you'll have to do that yourself. You could use jorbis for that (so you'll have compression too, since your saving it on the internet).

As for FTP, jftp is quite nice and easy to use and is a small jar. Jakarta commons-net works well too (and is more complete), but the jars are bigger (commons-net supports a bunch of other protocols too, and needs jakarta-oro to work).

Offline c_lilian

Senior Member


Projects: 1


Java games will probably rock someday...


« Reply #2 - Posted 2007-02-09 13:46:21 »

Hi, about ftp, the basic java.net.URL class can manage single files transfers

1  
URL url=new URL("ftp://user:password@ftp.website.com/dir1/dir2/file1.wav;type=i");


then you get an output stream with
1  
2  
cnx = url.getConnection();
out = cnx.getOutputStream()


and you can write your data into it.
(don't forget to close the connexion when you're done)

Lilian Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline dranonymous

Junior Member




Hoping to become a Java Titan someday!


« Reply #3 - Posted 2007-02-12 16:14:44 »

Thank you both for the replies.  I'll have to poke around a bit and see how the implementation works out.

Thanks,
Dr.A>
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

BurntPizza (4 views)
2014-09-21 02:42:18

BurntPizza (8 views)
2014-09-21 01:30:30

BurntPizza (11 views)
2014-09-21 00:34:41

moogie (10 views)
2014-09-21 00:26:15

UprightPath (23 views)
2014-09-20 20:14:06

BurntPizza (27 views)
2014-09-19 03:14:18

Dwinin (40 views)
2014-09-12 09:08:26

Norakomi (70 views)
2014-09-10 13:57:51

TehJavaDev (96 views)
2014-09-10 06:39:09

Tekkerue (49 views)
2014-09-09 02:24:56
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!