LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-01-2009, 01:27 AM   #1
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Rep: Reputation: 30
Inquiry:How to convert .wav sound files to .gsm format with sox utility


Dear All
Can you please do me favor and let me know how can I convert .wav sound files to .gsm format as I have an application for this usage ? Please be informed that I have made use of the sox utility for this purpose , as the followings , but it didn't get through :
#sox FR00003.wav -r 8000 -c 1 FR0003.gsm resample -ql
Can you please let me know what is the problem in my case ?
Regards
H.Motamedi
 
Old 09-01-2009, 03:42 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Did you get an error message using the command above or is it just the quality of the output file not good? What if you try without any option?
Code:
sox FR00003.wav FR0003.gsm
Please, can you post the output of the following command (to see the sampling rate of the original wave file)?
Code:
file FR00003.wav
 
Old 09-01-2009, 03:51 AM   #3
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by colucix View Post
Did you get an error message using the command above or is it just the quality of the output file not good? What if you try without any option?
Code:
sox FR00003.wav FR0003.gsm
Please, can you post the output of the following command (to see the sampling rate of the original wave file)?
Code:
file FR00003.wav
Thank you for your reply . Please find below the reuested info :
"[root@statsvr zaptel-1.4.12.1]# file /usr/local/src/FR00003.wav
/usr/local/src/FR00003.wav: RIFF (little-endian) data, WAVE audio, ITU G.711 A-law, mono 8000 Hz"
 
Old 09-01-2009, 04:01 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by hadimotamedi View Post
Thank you for your reply . Please find below the reuested info :
"[root@statsvr zaptel-1.4.12.1]# file /usr/local/src/FR00003.wav
/usr/local/src/FR00003.wav: RIFF (little-endian) data, WAVE audio, ITU G.711 A-law, mono 8000 Hz"
The wave file already is mono and 8kHZ, so that you don't need the -c1 and -r8000 options respectively. Have you tried without any option? What is the quality of the output file? Another question: which Linux OS are you running the sox command on?
 
Old 09-01-2009, 04:16 AM   #5
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by colucix View Post
The wave file already is mono and 8kHZ, so that you don't need the -c1 and -r8000 options respectively. Have you tried without any option? What is the quality of the output file? Another question: which Linux OS are you running the sox command on?
Thank you very much for your reply . Please be informed that I run the command without any option and it seems that it gets through . The sizes of the *.gsm converted files are as :
sizes : 4752 bytes & 5841 bytes
Can you please confirm if they are correctly converted ?
Please be informed that my client Linux OS is of CentOS 5 .
 
Old 09-01-2009, 04:27 AM   #6
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by hadimotamedi View Post
Thank you very much for your reply . Please be informed that I run the command without any option and it seems that it gets through . The sizes of the *.gsm converted files are as :
sizes : 4752 bytes & 5841 bytes
Can you please confirm if they are correctly converted ?
Well... it's difficult to tell just knowing the size of the output file. If the sox command didn't throw any error message, most likely the conversion succeeded. You can test the quality of the result using the play command provided by the sox package:
Code:
play FR0003.gsm
 
Old 04-17-2015, 06:34 PM   #7
clinoob
LQ Newbie
 
Registered: Apr 2015
Posts: 1

Rep: Reputation: Disabled
Sox wav to gsm issue

Machine: virtualbox vm

Installation: uname -a: Linux ubuntu2 3.16.0-23-generic #31-Ubuntu SMP Tue Oct 21 18:00:35 UTC 2014 i686 i686 i686 GNU/Linux

sox --version:
sox: SoX v14.4.1

file type: (asterisk call recording)

file 1428510900.3473-out.wav
1428510900.3473-out.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz
soxi 1428510900.3473-out.wav

Input File : '1428510900.3473-out.wav'
Channels : 1
Sample Rate : 8000
Precision : 16-bit
Sample Encoding: 16-bit Signed Integer PCM

Trying to convert to gsm.

Tried every single command available on google to convert to gsm:

412 sox 1428510900.3473-out.wav -r 8000 1428510900.3473-out.gsm resample -ql
414 sox 1428510900.3473-out.wav 1428510900.3473-out.gsm
418 sox 1428510900.3473-out.wav -r 8000 -c 1 1428510900.3473-out.gsm -q
424 sox 1428510900.3473-out.wav -r 8000 -c 1 1428510900.3473-out.gsm -q
432 sox -r 8000 1428510900.3473-out.wav 1428510900.3473-out.gsm
441 sox -r 8000 1428510900.3473-out.wav 1428510900.3473-out.gsm
445 sox 1428510900.3473-out.wav 1428510900.3473-out.gsm
447 sox 1428510900.3473-out.wav ../1428510900.3473-out.gsm
457 sox 1428510900.3473-out.wav -r 8000 -c1 1428510900.3473-out.gsm lowpass 4000 compand 0.02,0.05 -60,-60,-30,-10,-20,-8,-5,-8,-2,-8 -8 -7 0.05
466 sox 1428510900.3473-out.wav ../1428510900.3473-out.gsm
505 sox 1428510900.3473-out.wav 1428510900.3473-out.gsm
508 sox 1428510900.3473-out.wav -r 8000 -c1 1428510900.3473-out.gsm lowpass 4000 compand 0.02,0.05 -60,-60,-30,-10,-20,-8,-5,-8,-2,-8 -8 -7 0.05
512 soxi 1428510900.3473-out.gsm
514 sox 1428510900.3473-out.wav -r 8000 -c1 1428510900.3473-out.gsm lowpass 4000 compand 0.02,0.05 -60,-60,-30,-10,-20,-8,-5,-8,-2,-8 -8 -7 0.05
515 soxi 1428510900.3473-out.gsm
521 sox -V 1428510900.3473-out.wav 1428510900.3473-out.gsm
525 sox -V 1428510900.3473-out.wav 1428510900.3473-out.gsm
574 rm 1428510900.3473-out.gsm
576 sox 1428510900.3473-out.wav 1428510900.3473-out.gsm
580 sox 1428510900.3473-out.wav -t wavpcm -e signed-integer 1428510900.3473-out.gsm
584 soxi 1428510900.3473-out.gsm
587 file 1428510900.3473-out.gsm
590 sox 1428510900.3473-out.wav 1428510900.3473-out.gsm resample
598 sox -t wav 1428510900.3473-out.wav -r 8000 -c1 -t gsm 1428510900.3473-out.gsm
601 sox -t wav 1428510900.3473-out.wav -r 8000 -c1 -t gsm 1428510900.3473-out.gsm resample
603 sox -t wav 1428510900.3473-out.wav -r 8000 -c1 -t gsm 1428510900.3473-out.gsm resample -ql
604 sox -t wav 1428510900.3473-out.wav -r 8000 -c1 -t gsm 1428510900.3473-out.gsm resample -l
605 sox -t wav 1428510900.3473-out.wav -r 8000 -c1 -t gsm 1428510900.3473-out.gsm resample -q
607 sox -t pcm 1428510900.3473-out.wav -r 8000 -c1 -t gsm 1428510900.3473-out.gsm
608 sox -t wavpcm 1428510900.3473-out.wav -r 8000 -c1 -t gsm 1428510900.3473-out.gsm
612 sox -t wavpcm 1428510900.3473-out.wav -t gsm 1428510900.3473-out.gsm
614 sox -t wavpcm -e signed 1428510900.3473-out.wav -t gsm 1428510900.3473-out.gsm
649 sox 1428510900.3473-out.wav 1428510900.3473-out.gsm


Output is a 0 byte gsm file or errors out because options are deprecated.

Any help to convert the above file type to gsm would be greatly appreciated.

Thanks.
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
using mpg123 to convert .mp3 to .wav files cddesjar Linux - Software 7 06-26-2018 11:28 PM
how to playback/convert raw sound with sox captured with alsa 'write file' donnied Linux - General 0 04-16-2009 07:14 AM
Music Q - How to convert wav files into mp3... cbjhawks Linux - Software 3 03-30-2008 04:12 AM
Can anyone recommend some good software to convert *.wav files into *mp3 files? Tom "Techno" Earl Linux - Software 4 10-12-2006 04:03 PM
clean up and convert wav 2 mp3 with sox dibblethewrecke Linux - Software 1 12-04-2004 08:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration