Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-31-2007, 10:02 AM
Member
 
Join Date: Oct 2007
Posts: 3
sandeepk84@gmail.com is on a distinguished road
problem in playing mp3 on webpage which was recorded as wav and converted into mp3
Hi all,

I have recorded sound using my program. It uses classes like AudioSystem. And it's able to record and play also. but in my site I have an mp3 player. So i thought of converting the recorded wav file into mp3. For this i used LAME utility in Linux. And it was converted. Also it is being played in normal players like Winamp. But when i try to play this converted mp3 file using my player in my site it's having problem. Why is it like that?

Should i do something while capturing the sound from microphone so that it can be converted into mp3 format??
Or
Can I directly capture voice to an mp3 file??

In my program,

targetDataLine.open(audioFormat) where audioFormat is like

float sampleRate = 8000.0F;
int sampleSizeInBits = 16;
int channels = 1;
boolean signed = true;
boolean bigEndian = false;

Should I do something more or change something??

Please help me...

Thanx and Regards,
sand...
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-31-2007, 12:31 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
You can not play mp3 files with standard java api. You should use third party libraries to play them. And there is nothing wrong to convert wav to mp3 with LAME. I guess your problem is that mp3 is not supported in the way you used to play sound files.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 10-31-2007, 01:33 PM
Member
 
Join Date: Oct 2007
Posts: 3
sandeepk84@gmail.com is on a distinguished road
thanks a lot for your reply...
I have got the problem solved. While converting the wav file into MP3
I re sampled it with frequency-44.1. And it's playing now.
I am playing it not using java sound API but JW MP3 player.

thanx and regards,
sand...
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 10-31-2007, 01:47 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
Ok. Thanks for informing us. Happy to hear your problem solved.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Method to write if the string object can be converted to Integer or not. Abhishek New To Java 4 03-25-2008 02:16 PM
post info to a webpage kmp Networking 1 03-22-2008 04:20 AM
Secure Webpage for Logins chandpuri Advanced Java 1 03-08-2008 08:05 PM
Re-playing sound JSK CLDC and MIDP 0 02-06-2008 01:34 PM
Help needed with certificate used to access webpage karl Advanced Java 0 07-10-2007 11:13 PM


All times are GMT +3. The time now is 10:35 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org