Code Monkey home page Code Monkey logo

Comments (4)

wentz89 avatar wentz89 commented on July 29, 2024

The Solution is kind of simple,

the tutorial dont mention that the wav-files should be in 16-Bit format. (Since audacity by default use a 32-Bit format i had to change that for my wav-files)

from sphinxbase.

DaveXanatos avatar DaveXanatos commented on July 29, 2024

Getting same error. Used Audacity, Files are exported as WAV (Microsoft) signed 16-bit PCM. All files appear proper. Below are the directory listings (abbreviated - trust me, there all there, just figured no one needs to see all 46 when it dies on #1..), and the messages that are generated after running sphinx_fe from the command line. I've spent several hours now generating, editing and re-exporting from the original 32 bit to 16 bit.... would really love to know what I'm doing wrong. I have uploaded one of the audio files to https://www.xanatos.com/sounds/xanatos_0001.wav if anyone can take a look at it to see if it's somehow not properly set. Thanks for any help.

pi@Delos-CR4D-L:~/Desktop/workingdir $ ls -Fal

total 32852
drwxr-xr-x 3 pi pi     4096 Mar 11 19:53 ./
drwxr-xr-x 4 pi pi     4096 Mar 11 13:23 ../
-rw-r--r-- 1 pi pi  3406880 Mar  3 14:16 cmudict-en-us.dict
drwxr-xr-x 2 pi pi     4096 Mar 11 13:23 en-us/
-rw-r--r-- 1 pi pi 27114385 Mar  3 12:43 en-us.lm.bin
-rw-r--r-- 1 pi pi    119634 Mar 11 15:25 xanatos_0001.wav
-rw-r--r-- 1 pi pi    38730 Mar 11 15:24 xanatos_0002.wav
-rw-r--r-- 1 pi pi    36782 Mar 11 15:24 xanatos_0003.wav
............
-rw-r--r-- 1 pi pi    96260 Mar 11 15:49 xanatos_0044.wav
-rw-r--r-- 1 pi pi   128982 Mar 11 15:48 xanatos_0045.wav
-rw-r--r-- 1 pi pi   120968 Mar 11 15:48 xanatos_0046.wav
-rw-r--r-- 1 pi pi      646 Mar  3 08:58 xanatos.fileids
-rw-r--r-- 1 pi pi     3023 Mar  3 09:01 xanatos.transcription

pi@Delos-CR4D-L:~/Desktop/workingdir $ sudo sphinx_fe -argfile en-us/feat.params -samprate 16000 -c xanatos.fileids -di . -do . -ei wav -eo mfc -mswav yes

Current configuration:
[NAME]			[DEFLT]		[VALUE]
-alpha			0.97		9.700000e-01
-argfile				en-us/feat.params
-blocksize		2048		2048
-build_outdirs		yes		yes
-c					xanatos.fileids
-cep2spec		no		no
-di					.
-dither			no		no
-do					.
-doublebw		no		no
-ei					wav
-eo					mfc
-example		no		no
-frate			100		100
-help			no		no
-i					
-input_endian		little		little
-lifter			0		0
-logspec		no		no
-lowerf			133.33334	1.333333e+02
-mach_endian		little		little
-mswav			no		yes
-ncep			13		13
-nchans			1		1
-nfft			512		512
-nfilt			40		40
-nist			no		no
-npart			0		0
-nskip			0		0
-o					
-ofmt			sphinx		sphinx
-part			0		0
-raw			no		no
-remove_dc		no		no
-remove_noise		yes		yes
-remove_silence		yes		yes
-round_filters		yes		yes
-runlen			-1		-1
-samprate		16000		1.600000e+04
-seed			-1		-1
-smoothspec		no		no
-spec2cep		no		no
-sph2pipe		no		no
-transform		legacy		legacy
-unit_area		yes		yes
-upperf			6855.4976	6.855498e+03
-vad_postspeech		50		50
-vad_prespeech		20		20
-vad_startspeech	10		10
-vad_threshold		2.0		2.000000e+00
-verbose		no		no
-warp_params				
-warp_type		inverse_linear	inverse_linear
-whichchan		0		0
-wlen			0.025625	2.562500e-02

Current configuration:
[NAME]			[DEFLT]		[VALUE]
-alpha			0.97		9.700000e-01
-argfile				en-us/feat.params
-blocksize		2048		2048
-build_outdirs		yes		yes
-c					xanatos.fileids
-cep2spec		no		no
-di					.
-dither			no		no
-do					.
-doublebw		no		no
-ei					wav
-eo					mfc
-example		no		no
-frate			100		100
-help			no		no
-i					
-input_endian		little		little
-lifter			0		22
-logspec		no		no
-lowerf			133.33334	1.300000e+02
-mach_endian		little		little
-mswav			no		yes
-ncep			13		13
-nchans			1		1
-nfft			512		512
-nfilt			40		25
-nist			no		no
-npart			0		0
-nskip			0		0
-o					
-ofmt			sphinx		sphinx
-part			0		0
-raw			no		no
-remove_dc		no		no
-remove_noise		yes		yes
-remove_silence		yes		yes
-round_filters		yes		yes
-runlen			-1		-1
-samprate		16000		1.600000e+04
-seed			-1		-1
-smoothspec		no		no
-spec2cep		no		no
-sph2pipe		no		no
-transform		legacy		dct
-unit_area		yes		yes
-upperf			6855.4976	6.800000e+03
-vad_postspeech		50		50
-vad_prespeech		20		20
-vad_startspeech	10		10
-vad_threshold		2.0		2.000000e+00
-verbose		no		no
-warp_params				
-warp_type		inverse_linear	inverse_linear
-whichchan		0		0
-wlen			0.025625	2.562500e-02

INFO: sphinx_fe.c(967): Processing all remaining utterances at position 0
INFO: sphinx_fe.c(787): Converting ./xanatos_0001.wav to ./xanatos_0001.mfc
Segmentation fault

PS., Running Linux, Raspbian Stretch, if it makes a difference.

from sphinxbase.

nshmyrev avatar nshmyrev commented on July 29, 2024

@DaveXanatos it is better to open a separate issue for your problem

It seems your sphinxbase is pretty old because your file is 8khz instead of required 16 and sphinxbase should tell you about it.

from sphinxbase.

DaveXanatos avatar DaveXanatos commented on July 29, 2024

Thanks all. I re-recorded my files at 16kHz and successfully ran sphinx_fe on them. I now have my .mfc files. I also ran

pocketsphinx_mdef_convert -text en-us/mdef en-us/mdef.txt

and now I have my mdef.txt file and it looks good as well.

But... I appear to be missing the bw tool. I have downloaded sphinxtrain-5prealpha.tar.gz in hopes that I will find it in there once I unzip it... tomorrow. If I'm headed in the wrong direction and anyone reads this before Sunday morning Eastern USA time - and wants to send me a quick message telling me so... I would be appreciative :) Thanks

PS., Sorry, just realized that - perhaps this isn't the correct place now to ask this question... being that the original issue is closed/resolved due to it being a sample rate issue....

from sphinxbase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.