Linux SoundConverter Program - Missing 16 kHz Sample Rate Fix

I recently was working on another project where by a program called Pocket Sphinx required sound files recorded in 16 kHz sample rate. My preferred Linux sound converter application at this time is most apropos called SoundConverter. This free and open source Linux SoundConverter program does not have 16 kHz available as a re-sample rate.

One possible solution was to use dconf editor to add the 16 kHz sample rate to this Linux SoundConverter program. However, I could not find any entries under /org for this program. I looked in all the available configuration files using dconf editor to no avail.

I decided to then search for this Linux SoundConverter program files by typing in the following command:

whereis soundconverter

This was the output from that Linux command:

whereis soundconverter
soundconverter: /usr/bin/soundconverter /usr/share/soundconverter /usr/share/man/man1/soundconverter.1.gz

I browsed to the /usr/share/soundconverter directory using this command:

cd /usr/share/soundconverter

I then listed all the files and folders in this directory by performing this command:

ls -al

Here is the output of the ls -al command:

ls -al
total 316
drwxr-xr-x 3 root root 4096 Mar 12 01:02 .
drwxr-xr-x 332 root root 12288 Mar 12 21:49 ..
drwxr-xr-x 3 root root 4096 Mar 12 00:36 python
-rw-r–r– 1 root root 135178 Mar 12 01:02 soundconverter.glade
-rw-r–r– 1 root root 24707 Sep 30 2018 soundconverter-logo.svg

You will want to notice the soundconverter.glade file. In Linux, all files including folders are basically files. What this means is that you can easily open them up in a text editor like vi.

VI is and has been my preferred command line editor in Linux for decades now. You do not have to use VI editor to edit this file. However, the command to edit the soundconverter.glade file is below:

vi soundconverter.glade

You will need to become root user as you will notice both user and group permissions for the soundconverter.glade file are owned by root. Glade files are actually eXtensible Markup Language files. Generally XML files are easily accessible with a standard text editor.

You may want to create a backup of this Linux SoundConverter program file just to become safe. I have incorporated the habit of always creating a backup file of any Linux files I edit, in case I make a mistake. It is certainly up to you to incorporate this possible safety measure or not.

You will notice in this soundconverter.glade file an array with these numbers:

  <column type="gchararray"/>
</columns>
<data>
  <row>
    <col id="0">8000</col>
  </row>
  <row>
    <col id="0">11025</col>
  </row>
    <row>
    <col id="0">22050</col>
  </row>
  <row>
    <col id="0">44100</col>
  </row>
  <row>
    <col id="0">48000</col>
  </row>
  <row>
    <col id="0">72000</col>
  </row>
  <row>
    <col id="0">96000</col>
  </row>
  <row>
    <col id="0">128000</col>
  </row>
</data>

You can open up SoundConverter. Then click on “Preferences”. Now look below under “Target bitrate: N/A”.

Place a check in the check box next to “Resample” drop down list. You will notice that 16000 and 32000 for that matter are missing. Now you want to create a new array for 16 kHZ which would be 16000 numerically.

Insert a new line and array using your editor of choice. You will want to enter in the following array:

<row><col id=”0″>16000</col></row>

This will create a new entry in that re-sample drown down list with 16000. Also, you can add any other re-sample rates that you might need, for example 32000. Now you can go into SoundConverter and select 16000 Hz.

Linux SoundConverter Program Missing 16 kHz Sample Rate Fix Video Transcript

SJS Ronco need a in a computer comm or a
00:05
video about our day always working on a
00:08
project recently whereby I needed to
00:12
convert an audio file there is a free
00:17
Linux software program called
00:23
sound converter hence the term that
00:27
converts sound I’m saying however I
00:31
needed to convert sound into sixteen
00:35
thousand Hertz or sixteen small K large
00:41
H small Z and this program as you can
00:45
see on screen and I will show you I will
00:48
demonstrate does not have when you go
00:53
into preferences and then you’re going
00:56
to convert the file this project
01:03
requires that the file be and sixteen
01:05
thousand Hertz you know what I’m saying
01:09
16 kilohertz whatever now you go down
01:14
here there is sample rate and it’s
01:16
missing so you could you could cheat you
01:18
could convert it to eight thousand
01:21
eleven thousand twenty-five twenty two
01:23
thousand fifty forty four one hundred
01:25
forty eight hundred excuse me forty
01:28
eight thousand seventy two thousand
01:29
ninety six thousand one twenty eight
01:30
thousand so that’s a conundrum well I
01:34
went to the drawing board which is the
01:39
internet if you do not know something if
01:44
you’re ignorant or if you’re running or
01:46
problems internet search internet search
01:48
unless you’re like a you know programmer
01:51
and you’re a coder and you’re like oh
01:53
okay well I’ll just you know go to the
01:55
code alright
02:00
one solution was to use D conf editor
02:04
and let me find it D yep so let me open
02:10
it up and I’ll show you what deep
02:11
competitors really quickly so you’re
02:13
gonna get this warning you can you know
02:16
uncheck it but you know whatever so just
02:19
click I’ll be careful
02:21
now get D Kampf editor it is obviously
02:25
this is Linux and I haven’t titled the
02:27
video yet but well you actually my blog
02:29
post I already yeah Linux is in the blog
02:34
post title which will be the same title
02:36
of this video it just allows you to edit
02:41
certain application files now if you
02:46
notice you see apps see a desktop org it
02:49
was supposed to be under org but there
02:51
is nothing here as you can see there is
02:53
no sound converter there is blue man
02:56
free desktop known gtk on board X I went
02:59
through all these every single one every
03:02
subdirectory could not find a decomp
03:09
edible file so my predicament continued
03:15
then and then I was like well you know
03:18
what
03:18
I am NOT program but I am proficient
03:22
enough that I can use command line you
03:24
should definitely learn how to use
03:25
command line VI Emacs whatever the
03:29
it takes you know I’m saying on Linux
03:31
cuz you’re gonna run into problems Linux
03:33
is not perfect I know you have the
03:35
fanboys just like the wind
03:37
blows fan boys and girls in the Mac and
03:41
crap fan boys and girls Linux tards or
03:44
whatever the you want to call them
03:45
they claim Linux is the best thing since
03:47
you know the wheel and it’s like well
03:52
you know it’s not perfect now I’ve used
03:54
Linux for close to 20 years now maybe I
03:58
think the first time I actually ever use
04:00
Linux was in the mid-90s actually but I
04:03
kind of abandoned it until the early
04:06
2008 ways I digress
04:10
command line so what what I found was
04:13
that there is a Glade file glade GL ad
04:16
now this isn’t a dumbshit capitalistic
04:19
whorish stupid commercial for a
04:22
Glade the that goddamn you know
04:26
do you authorize or wear that
04:28
you spraying in the air
04:30
no Glade is actually an XML file type if
04:34
you know what XML is it’s edible very
04:39
easily edible okay so here is the
04:43
solution click on the link in the
04:45
description box below that will take you
04:46
to my blog post on my website unit
04:48
computers comm where I have the
04:49
instructions written in the abstract I
04:52
have all commands written out spelled
04:56
correctly
04:57
you know I have full instructions on how
05:00
to fix sound converter you’re gonna add
05:05
a entry into the program you’re actually
05:10
going to change the code you’re gonna
05:12
learn how to program a little bit you
05:14
know I’m saying you’re gonna add an
05:16
array is what you’re doing and then
05:20
you’ll be able to choose sixteen
05:21
thousand but I have full detail written
05:26
you know typed out instructions because
05:27
some people learn better that way or you
05:31
can also copy and paste the commands
05:32
alright so what we’re gonna do is we’re
05:34
gonna go to a command line
05:37
let me see if there’s anything I don’t
05:40
necessarily you always should be
05:41
security conscious you know what I’m
05:43
saying especially nowadays all right so
05:46
we’re at a Linux command line now the
05:48
first thing i typed in was where is
05:53
sound converter remember and I haven’t
05:58
do I have instructions on now now I
06:00
don’t think I had any instructions on
06:02
how to install Linux
06:03
Wow sound converter I mean I might’ve
06:05
but anyways so where is sound converter
06:11
there we go where is you might want to
06:14
learn where is that’s an excellent
06:17
command on Linux and UNIX actually it’ll
06:21
tell you it will even tell you where
06:23
configuration files are at it will tell
06:26
you where a program is at because in
06:29
linux everything is a sickly a file
06:31
everything even folders are editable you
06:34
know i’m saying so i want to use or
06:37
share so CD is change directory and then
06:42
I’m gonna go to / user / share / sound
06:45
converter it’s free Linux sound
06:49
converter program it’s excellent it’s
06:51
not about you know it doesn’t have every
06:53
Bell and whistle but you don’t need all
06:54
that notice I don’t now then you do an
06:58
LS – al now here’s a tip you do not have
07:01
to take this tip but it’s highly
07:03
recommended whenever I learned decades
07:06
ago on Linux because I was
07:08
around with config files and what I did
07:11
was I edited the original configuration
07:13
file and then I think it had to do with
07:15
networking and I had to reinstall Linux
07:18
cuz I over wrote it so here’s a bonus
07:21
added possible gold tip when it comes to
07:24
Linux and I would dare say any operating
07:29
system Mac and crap wind blows when
07:32
you’re editing system files any files
07:35
program configuration files create a
07:40
copy if you notice here I created sound
07:43
converter Glade bak you can name it
07:46
whatever you want a lot of times I name
07:49
them back or got save
07:51
back or just something you know I prefer
07:53
dot back because that tells me it’s a
07:55
backup but it whatever you want to you
07:59
know I’m saying and then you would you
08:01
would just do a CP you would do CP and
08:06
then the name of the file and then the
08:09
firt and then the second would be the
08:13
the destination so you’re gonna copy the
08:17
source sound converter dot Glade and
08:20
then space here copy sound converter
08:25
whoops I need to learn how to
08:28
goddamn type dot laid and whoops
08:32
and then sound converter dot blade blade
08:39
blade yeah I’m trying to
08:43
type too fast
08:44
I’m R I’m already getting bored with
08:46
this video I’m very honest I’m very
08:48
blunt if you’re offended by that I don’t
08:49
care you can kick rocks and go
08:51
somewhere else so that’s what you would
08:54
type to copy aren’t quickly now we’re
08:56
gonna edit on Linux there’s a default
08:58
editor command line on speaking command
09:02
line whatever it takes even if you have
09:04
to use you know a graphical user
09:06
interface but you should really probably
09:08
learn how to use command line and Linux
09:11
because when it comes to fixing issues
09:12
most times you’re gonna have to fix it
09:15
in a command line you’re I’m Sam so VI
09:17
has been around for decades actually
09:20
probably ever since Linux was first
09:23
developed and I’ve never used any other
09:25
editor I tried Emacs and I did not like
09:28
that you do not have to use VI my
09:30
blogpost with instructions I use VI that
09:35
certainly if you are more comfortable
09:36
with Emacs or there’s a VI m there which
09:40
is a more graphical VI version I think
09:43
just whatever it takes you know I’m
09:45
saying so you’re gonna do you’re gonna
09:47
open the file with the editor in Linux
09:50
you can just highlight and then middle
09:52
mouse click and then paste windows you
09:55
cannot do that mac and crap I don’t
09:57
think you can do that but I could be
09:59
wrong what Linux you just highlight
10:03
and then middle-click and bam it pastes
10:07
you don’t have to you know control-c
10:08
control-v or you don’t have to
10:10
right-click and select copy that you
10:13
know what I’m saying all right so we’re
10:15
gonna go into this file I already
10:17
created a backup and then we’re gonna
10:19
add an additional array so I have to I
10:22
think if I search slash in VI the four
10:25
slash is what you use to search and then
10:28
you type in after the slash what you’re
10:30
searching for so I think I’m gonna type
10:32
in eleven zero two five and it should
10:34
find that array here it is so and and
10:37
you want to make sure that you’re you
10:40
know got the correct code if you’re if
10:43
you this is how I learn to fix problems
10:46
and Linux I learn VI and then I learn to
10:50
look for configuration or files or study
10:53
errors PHP errors you can use an
10:57
internet search and then you know I’m
10:59
saying then if you are proficient enough
11:01
with the command line and an editor then
11:04
you can actually fix problems on your
11:06
own so you just have to be aware if you
11:09
if you’ve never been familiar with an
11:11
array of any type you know you can study
11:16
on your own look it up on the internet
11:18
you what you could do is probably in
11:21
type into a internet search gch array or
11:26
just an array it’s pretty
11:28
self-explanatory you know I’m saying so
11:31
what I’m gonna do is I’m gonna add an
11:33
array so I’m gonna place it right here
11:35
and so in VI you want to hit oh the
11:41
letter O to create another line and then
11:45
and it’s already going to insert but you
11:48
could escape and then type I to insert
11:50
so we’re gonna insert another row whoops
11:55
okay so I have to escape and then insert
11:59
all right so now okay so right here and
12:03
then you don’t have to but I’ve learned
12:06
that it’s probably a it’s productive to
12:10
keep your code clean however you want it
12:12
just because in case you have to go back
12:15
I think that most programmers probably
12:19
that’s why it’s coated in a certain way
12:21
you know I’m saying it’s up to you but
12:25
Linux spaces are ignored however once in
12:30
a while they can cause a problem that I
12:32
don’t want to digress about that so
12:34
we’re gonna create a row so Row is just
12:38
in the two brackets tells the operating
12:43
system to create a row a new row and
12:47
then we’re gonna add another column so
12:49
I’ll open tick and then column ID equals
12:54
and then you know zero and then in
12:59
parenthesis and then closing tick
13:02
16-thousand and then / the / tells it to
13:07
close that column and then we have to
13:10
add another entry here we have to close
13:13
the role you have to close these
13:15
variables I guess or I’m not a
13:17
programmer so that’s probably wrong
13:19
Burbage but it’s similar to HTML you got
13:24
a you got the opening and you got the
13:27
closing and you have to close with the
13:32
slash before you know what I’m saying
13:34
otherwise it’s not gonna look right now
13:39
I added it accidentally added an
13:40
additional row in VI you just type DD
13:43
twice or yeah two DS for delete and
13:48
they’re gone all right so then I’m gonna
13:51
escape again and then in VI editor to
13:54
save you type the parenthesis
13:57
excuse me the colon the colon you see
14:00
the colon now where the green cursor is
14:03
at and then WQ small a lot of times in
14:07
Linux it’s case sensitive so become
14:09
aware of that and VI it is there’s
14:11
there’s when you when you use VI and you
14:13
tell you type in a capital W you’re
14:16
telling it something different than a
14:18
lowercase W so W Q for write and then
14:22
quit or you wait another thing you could
14:25
do is you could just write
14:27
exclamation point exclamation point
14:29
tells it to write right now Lord Emma at
14:33
our own I knew this guard down program
14:35
fixed by tonight Aaron pronto movie
14:39
Laurent you could hit then hit enter and
14:44
bam it tells you right here sound career
14:47
Glade 26 50 lines blah blah blah blah 13
14:50
135 178 characters written as long as it
14:53
says written if it’s a if you get some
14:56
some permissions if its permissions
14:59
it’ll type it’ll respond in red telling
15:02
you that it wasn’t written or if you
15:06
didn’t type those characters correctly
15:07
you’ll get an error well I’m gonna write
15:10
quit so : BB small W small Q exclamation
15:15
point right now bitch
15:17
alright BAM it’s out now you what you
15:20
can do is when you learn is you can
15:23
double check you can double check your
15:24
work sometimes I still have to do that
15:27
and then forward slash and then 16000
15:30
BAM it’s there and that’s the only place
15:33
I had to place it you’re only adding one
15:36
array and a column and then it’s gonna
15:39
show up in that drop-down menu now I’m
15:44
gonna go to the program I probably have
15:45
to close it I could try but I doubt it
15:48
now go to the resample under the and I
15:52
have full instructions telling you you
15:55
know place a checkmark where every
15:57
sample is so that you can see the
15:59
drop-down full instructions you know I’m
16:02
saying and then click the drop down
16:04
arrow it’s not available because this
16:06
isn’t real time programs aren’t that
16:08
smart yet they probably never will be
16:11
but I well I could be wrong about that
16:12
so I’m gonna have to close sound
16:14
converter and I can show you my blog
16:16
post this is the blog post and let’s see
16:20
I gotta run I gotta run oh my god I’m at
16:22
16 minutes I gotta run I usually have a
16:23
15 minute you know quota 15 minute time
16:27
limit alright so a full blog post you
16:30
know blah blah where’s command and then
16:33
the output how do
16:36
where what folder to go the command LS –
16:38
a LCD to change directory LS the list
16:42
and then what the output should be I did
16:46
not include the copy instructions and
16:48
then VI to open the XML file Glade is
16:53
actually an extensible markup language
16:55
file it’s just a different type of XML
16:59
file but it is technically XML and then
17:01
the array that I noticed and then we
17:03
added a new row in the array we add in
17:07
an additional you know column or item or
17:10
whatever you want to call it in the
17:12
array and then now I’m gonna show you
17:15
let me transition real quick now let me
17:17
open sound converter free program open
17:21
source if I could find it that’s
17:25
what a search box is for think
17:29
dog computers are smarter than me
17:30
alright so now I have the program open
17:35
and there it is now we’re gonna go up to
17:37
preferences and then go down to the
17:39
resample and then hit the drop down and
17:42
there it is sixteen thousand see we
17:46
learn how to program we learn how to add
17:48
an array and which is a row and then a
17:51
column in the drop down array now you
17:54
would click close and then boom now with
17:58
my project I am ready to roll so that is
18:03
how you fix sixteen thousand you know
18:09
whatever 16 kilohertz missing from the
18:13
resample rate I’m not sure why sound
18:16
convertor didn’t include it 16,000 and I
18:20
would say 32 are probably standard but
18:23
eleven thousand 25 that’s it that’s a
18:26
common one actually I anyways I don’t
18:29
want to digress because I’m over my time
18:31
limit and then certainly if you need
18:34
32,000 you could you could add it in
18:37
there rate so you learn something and
18:39
that’s how with that’s kind of one
18:41
reason why I like Linux but but you know
18:44
caveat emptor linux is not like mac and
18:47
well mac and cry
18:48
does actually have bsd unix in it wind
18:52
blows I think wind blows might now have
18:55
some Linux in it or some I don’t
18:58
whatever Windows 10 it that could be
19:01
wrong about that whatever that is how I
19:06
learn back in the day so get comfortable
19:08
with VI you can fix your own issues if
19:12
you know if it’s otherwise you what you
19:16
would have had to have done is what find
19:19
another converter tool that has the
19:22
16,000 or 16 kilohertz available so in
19:27
closing my project which I probably
19:30
won’t get in well I’m still working on
19:32
it here I’ll just tell you what
19:34
the it is I’m trying to create
19:39
automated transcriptions of my videos
19:43
now not for the my YouTube channel did
19:48
you know that YouTube has an automatic
19:50
transcription every time you as a
19:52
YouTube content creator every time you
19:55
upload a video it automatically creates
19:57
it unless can you disable it yeah no no
19:59
anyways but I think by default it
20:01
creates a closed caption or a
20:04
transcription of your video if not
20:08
perfect I think it uses AI or unaware of
20:11
the or some kind of dictionary it’s
20:13
not perfect it’s not bad but it’s
20:16
certainly not perfect you know and
20:19
transcribing is much better obviously
20:21
however you have to pay money for that
20:23
now I’m not gonna tell you what website
20:26
but oh that’s right I was censored off
20:30
of YouTube because I had a different
20:32
YouTube channel where i spoke about
20:33
activism you know capitalism is stupid
20:37
it’s a control mechanism the
20:39
government’s out of control especially
20:41
recently with this fear-mongering with
20:43
this bullcrap
20:43
you know virus that anyways I don’t want
20:45
oh oh oh I better not talk about that I
20:48
better not criticize the system for that
20:50
because oh I’ll get my YouTube account
20:52
terminated tomorrow at midnight by Susan
20:54
Wojcicki and the rest of the crew here
20:56
I’m saying so I have a activism website
21:00
and I and I record videos however that
21:03
platform well I have to they do not
21:06
include a transcription of the video and
21:09
some of my videos are very likely even
21:11
this video that’s way too long now 21
21:13
minutes and Counting you know trying to
21:16
sit there transcribe it I don’t
21:18
have that time or you’d have to pay
21:20
somebody and some of the prices are like
21:23
you know pert they charge you per
21:24
letter or per word or
21:29
prefer sentence it’s like Jesus
21:33
Christ I’m already living in poverty as
21:36
a computer technician and you’re just
21:38
gonna bend me over further and sodomized
21:41
you me because I would just want a
21:43
goddamn transcription now I think maybe
21:47
decades down the road it’ll be much
21:50
better there’s some open there’s paid
21:52
services you can get paid software
21:55
that’s actually maybe maybe I don’t know
21:58
about the best but one of the decent
22:00
ones might be what it let me know any
22:05
good let me search it real quick I
22:07
support this once in a while but not as
22:09
much anymore Dre what is it
22:11
dragon naturallyspeaking is that what
22:14
it’s called yeah that one I heard yeah
22:19
Dragon NaturallySpeaking I still support
22:21
that one is by nuance yeah it’s a new
22:24
nuisance I mean it’s a nuance all right
22:25
and but that I think it I think it
22:30
requires Windows and it cost money so
22:33
I’m trying to find an open source I had
22:35
I was trying to install what is a CMU
22:39
Sphynx or pocket Sphinx which is
22:42
actually an automated transcription
22:45
recorder automated transcription
22:48
recorder what that would do is it would
22:52
open the video fault well it would
22:54
probably would have to be audio say get
22:56
it I had to take a video file convert it
22:59
to audio and then run it through the
23:02
transcriber however I ran into the
23:05
roadblock which was the the resample
23:09
rate when I converted the audio it had
23:13
being 16 kilohertz then I was like oh
23:18
and then as soon as I you know fixed it
23:21
in the program I reconverted that file
23:23
BAM
23:24
it no longer error but yeah I wanted
23:27
address about that I abandoned see Pacus
23:30
Sphynx because i couldn’t get it to work
23:34
yeah you have to have a dictionary you
23:38
got to have libraries and it’s just like
23:40
I just want a transcription of
23:46
my big mouth
23:48
adios