LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-30-2013, 07:08 AM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
Any easy way to record Google Translate


Hi all,

Ubuntu 12.04 desktop

Is there a convenient way to record the sound of "Google Translate" on a .mp3 sound file?

Thanks

Rgds
satimis
 
Old 07-30-2013, 08:35 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Member Response

Hi,

If you are using 'ALSA' mixer then you should be able to use 'Capture' by setting the level.

You really need to provide more information; Gnu/Linux in use, Desktop and sound card or system information. Please read the following FYI;
Quote:
FYI: Netiquette is a set of social conventions that facilitate interaction over networks, ranging from Usenet and mailing lists to blogs and forums.

FYI: I suggest that you look at 'How to Ask Questions the Smart Way' so in the future your queries provide information that will aid us in diagnosis of the problem or query.
Hope this helps!
 
Old 07-30-2013, 10:55 AM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by onebuck View Post
Hi,

If you are using 'ALSA' mixer then you should be able to use 'Capture' by setting the level.

You really need to provide more information; Gnu/Linux in use, Desktop and sound card or system information. Please read the following FYI;Hope this helps!
Hi,

Thanks for your advice.

I found an easy way:-
- Ran the Voice Memos of IPhone3gs recording the sound on a .m4a file.
- Sent the .m4a file to desktop computer
- Used an Online converter converting it to .mp3 file.

Rgds
satimis
 
Old 07-31-2013, 08:19 PM   #4
geek@LQ
LQ Newbie
 
Registered: Jul 2013
Posts: 14

Rep: Reputation: Disabled
You can use something like this as google translate is playing. After you setup your Mixer/Volume Control to the recoding source, you can use ffmpeg to capture the audio

ffmpeg -f alsa -i pulse -ar 44100 -ac 2 -ab 128k output.mp3

If not using pulse then use

ffmpeg -f alsa -i hw:0 -ar 44100 -ac 2 -ab 128k output.mp3

Last edited by geek@LQ; 07-31-2013 at 08:21 PM.
 
Old 07-31-2013, 09:34 PM   #5
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by geek@LQ View Post
You can use something like this as google translate is playing. After you setup your Mixer/Volume Control to the recoding source, you can use ffmpeg to capture the audio

ffmpeg -f alsa -i pulse -ar 44100 -ac 2 -ab 128k output.mp3

If not using pulse then use

ffmpeg -f alsa -i hw:0 -ar 44100 -ac 2 -ab 128k output.mp3
Hi,

Thanks for your advice.

Performed following steps;

Ubuntu 12.04 desktop 64bit

1) Tried both commands with same output:
$ ffmpeg -f alsa -i pulse -ar 44100 -ac 2 -ab 128k output.mp3

$ ffmpeg -f alsa -i hw:0 -ar 44100 -ac 2 -ab 128k output.mp3

Code:
Stream mapping:
  Stream #0.0 -> #0.0
Encoder (codec id 86017) not found for output stream #0.0
2) Found following article:
ffmpeg mp3 conversion failed [closed]
http://stackoverflow.com/questions/5...version-failed

Ran;
$ sudo apt-get install ffmpeg libavcodec-extra-*
Code:
.....
......
......
Setting up libopenjpeg2 (1.3+dfsg-4+squeeze1build0.12.04.1) ...
Setting up libavcodec-extra-53 (4:0.8.6ubuntu0.12.04.1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
N: Ignoring file 'gcl' in directory '/etc/apt/sources.list.d/' as it has no filename extension
N: Ignoring file 'google.OLDlist' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
3)
Ran;
Code:
$ alsamixer
Turned all lines and MIC to max

4)
Tried both commands. Both worked;
Code:
ffmpeg -f alsa -i pulse -ar 44100 -ac 2 -ab 128k output.mp3

ffmpeg -f alsa -i hw:0 -ar 44100 -ac 2 -ab 128k output.mp3
Sound files recorded but on playback with low volume output.

Please advise how to fix "low volume output"? Thanks

satimis
 
Old 07-31-2013, 10:10 PM   #6
geek@LQ
LQ Newbie
 
Registered: Jul 2013
Posts: 14

Rep: Reputation: Disabled
Quote:
Originally Posted by satimis View Post
Hi,
Sound files recorded but on playback with low volume output.

Please advise how to fix "low volume output"? Thanks

satimis

You can use audacity and use the Normalize effect filter or you can use normalize-mp3, a commandline utility which may come with the normalize package.

Another tip is to use -vol 1000 with ffmpeg to increase the volume and make a new mp3 file.

Code:
ffmpeg -i output.mp3 -ar 44100 -ac 2 -ab 128k -vol 1000 new_output.mp3
Note, you may want to experiment with different values with vol. To high a value and audio can be distorted. Try first with 1000, if it sounds fine you're set, if audio is distorted then try a lower value.

Last edited by geek@LQ; 07-31-2013 at 10:40 PM.
 
Old 07-31-2013, 10:34 PM   #7
geek@LQ
LQ Newbie
 
Registered: Jul 2013
Posts: 14

Rep: Reputation: Disabled
BTW, you can use vol while capturing audio

ffmpeg -f alsa -i pulse -ar 44100 -ac 2 -ab 128k -vol 1000 output.mp3

Also, ffmpeg is becoming depreciated in ubuntu. It's successor is avconv. avconv is compatible with ffmpeg options.
 
Old 07-31-2013, 10:49 PM   #8
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by geek@LQ View Post
You can use audacity and use the Normalize effect filter or you can use normalize-mp3, a commandline utility which may come with the normalize package.

Another tip is to use -vol 1000 with ffmpeg to increase the volume and make a new mp3 file.

Code:
ffmpeg -i output.mp3 -ar 44100 -ac 2 -ab 128k -vol 1000 new_output.mp3
Note, you may want to experiment with different values with vol. To high a value and audio can be distorted. Try first with 1000, if it sounds fine you're set, if audio is distorted then try a lower value.
Hi,

Your suggested command worked but the background noise increased dramatically as well. Unfortunately I couldn't attach the mp3 file here for your reference.

alsamixer seems having no effect here.

I don't have audacity installed

Rgds
satimis
 
Old 07-31-2013, 10:55 PM   #9
geek@LQ
LQ Newbie
 
Registered: Jul 2013
Posts: 14

Rep: Reputation: Disabled
Does the original file has any background noise?

If it doesn't try the normalize-mp3 tool. Normalize is designed to increase volume to a safe limit without distorting it.

If you install audacity it has filters to remove background noise and hiss. It can also normalize the audio.

Last edited by geek@LQ; 07-31-2013 at 10:57 PM.
 
Old 07-31-2013, 11:02 PM   #10
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by geek@LQ View Post
Does the original file has any background noise?
- deleted -
There is no original file. I just ran your late command recording the voice on Googel translate

satimis
 
Old 07-31-2013, 11:06 PM   #11
geek@LQ
LQ Newbie
 
Registered: Jul 2013
Posts: 14

Rep: Reputation: Disabled
I just noticed this line from your earlier post

Quote:
Turned all lines and MIC to max
I experience this before in the past. When it's at max it can introduce noise or high buzzing in the audio. I remedy this by lowering the slider to around 80% and there was hardly no noise. Linux is tricky with sound cards and mixers. You have to experiment to find the right settings to get the right sound.

Last edited by geek@LQ; 07-31-2013 at 11:09 PM.
 
Old 07-31-2013, 11:19 PM   #12
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by geek@LQ View Post
I just noticed this line from your earlier post



I experience this before in the past. When it's at max it can introduce noise or high buzzing in the audio. I remedy this by lowering the slider to around 80% and there was hardly no noise. Linux is tricky with sound cards and mixers. You have to experiment to find the right settings to get the right sound.
Lowering line and MIC to half on alsamixer

Ran;
Code:
$ ffmpeg -f alsa -i pulse -ar 44100 -ac 2 -ab 128k -vol 1000 sound_e.mp3
Noise reduced but the sound recorded also reduced as well

satimis
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GDrive for Linux. And Google's track record. dugan General 1 04-29-2012 11:45 AM
[SOLVED] Weird Firefox behavior when using google.translate.com corp769 Linux - Software 8 07-02-2011 08:43 PM
BASH/No X: Using google translate to convert TXT files (translate) frenchn00b Programming 10 09-13-2009 10:55 PM
can krecord record skype talking, any easy way ? frenchn00b Linux - General 3 02-11-2008 03:09 PM
LXer: Super Grub Disk delivers easy boot record recovery LXer Syndicated Linux News 0 10-03-2006 03:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:13 AM.

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