5

I was in Vietnam and tried to learn Vietnamese.

The difficult thing is to learn the pronunciation and I made an Android App to record voices. Vietnamese people are very nice and I collected more than 500 sound files.

Now I'm trying to make a language learning app. To do that I try to reduce noise and normalize volume.

I have chosen the following settings:

this.recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
this.recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC_ELD);
this.recorder.setAudioEncodingBitRate(96000);
this.recorder.setAudioSamplingRate(44100);

(cordova AudioPlayer.java - default settings are crap)

Now I have a problem. I'm not able to open the files with Audacity or FFmpeg.

./ffmpeg -i /tmp/speaker__ualp__x%E1%BA%A5u.mp4 /tmp/uu.wav
ffmpeg version 1.1.2 Copyright (c) 2000-2013 the FFmpeg developers
  built on Feb 20 2013 10:50:54 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --enable-libfdk-aac
  libavutil      52. 13.100 / 52. 13.100
  libavcodec     54. 86.100 / 54. 86.100
  libavformat    54. 59.106 / 54. 59.106
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 32.100 /  3. 32.100
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
[aac @ 0xaada980] Audio object type 39 is not supported.
    Last message repeated 1 times
Guessed Channel Layout for  Input Stream #0.0 : mono
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/speaker__ualp__x%E1%BA%A5u.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isom3gp4
    creation_time   : 2013-01-29 15:53:11
  Duration: 00:00:01.21, start: 0.000000, bitrate: 116 kb/s
    Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 96 kb/s
    Metadata:
      creation_time   : 2013-01-29 15:53:11
      handler_name    : SoundHandle
[aac @ 0xaada980] Audio object type 39 is not supported.
Output #0, wav, to '/tmp/uu.wav':
  Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isom3gp4
    Stream #0:0(eng): Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
    Metadata:
      creation_time   : 2013-01-29 15:53:11
      handler_name    : SoundHandle
Stream mapping:
  Stream #0:0 -> #0:0 (aac -> pcm_s16le)
Error while opening decoder for input stream #0:0

What can I do?

bernard
  • 306
  • 1
  • 8
  • Here an example soundfile: http://datenkueche.com/viet/sounds/audio.mp4 – bernard Feb 20 '13 at 17:59
  • I am able to playback audio.mp4 from audacity - checkout mediainfo which probes a file and displays format related info – Scott Stensland Feb 20 '13 at 20:19
  • Do you use audacity on Linux? Mediainfo shows: Format : ER AAC ELD Format/Info : Advanced Audio Codec Codec ID : 40 Bit rate mode : Constant Bit rate : 96.0 Kbps Channel(s) : 1 channel Channel positions : Front: C Sampling rate : 44.1 KHz Compression mode : Lossy Stream size : 29.4 KiB (91%) – bernard Feb 21 '13 at 02:39
  • Now I compiled the newest version of ffmpeg und libfdk-aac. I looks like ffmpeg supports encoding with libfdk-aac but not decoding. – bernard Feb 21 '13 at 09:42
  • Edit your question title, SOX should work in majority of linux distros but may not be available in android. – user1263746 Mar 07 '13 at 08:12

1 Answers1

0

Use SOX audio toolkit for setting BitRate and SamplingRate.

Sox can be used directly from your shell.

use below to see the syntax and options for conversion.

# man sox 

Example to Change sample rate

# sox input.mp3 -r 8000 output.wav
user1263746
  • 5,788
  • 4
  • 24
  • 28