Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

noise.flac #98

Open
winnerke opened this issue Nov 3, 2017 · 13 comments
Open

noise.flac #98

winnerke opened this issue Nov 3, 2017 · 13 comments

Comments

@winnerke
Copy link

winnerke commented Nov 3, 2017

Hey!
When I start voicecommand receive this warning in every 2-3 seconds.

Warning: Couldn't read data from file "/dev/shm/noise.flac", this makes an Warning: empty POST.

And also when I try to re-run the configuration I didn't hear any voice,
My .asoundrc is correct.

And the Suite is up-to-date.

Any suggestion?

@Lewiseab
Copy link

I'm experiencing the same symptoms you mention and can not yet figure out a solution.

@KDMcMullan
Copy link

Ah. I think this is the same problem as issue #99.

@sebastw22
Copy link

I have the same issue. Anyone solved it?

@dawsondeere
Copy link

After looking at /dev/shm/voice.log and seeing the following error, I found out that there's a bad flag for the flac command
ERROR: raw format options (--endian, --sign, --channels, --bps, and --sample-rate) are not allowed for non-raw input
On line 93 of voicecommand.cpp
system("flac /dev/shm/noise.wav -f --best --sample-rate 16000 -o /dev/shm/noise.flac 1>>/dev/shm/voice.log 2>>/dev/shm/voice.log");
Get rid of --sample-rate 1600 and recompile, and it should work
Also, on line 35 of speech-recog.sh, the same bad flag is there which causes the error with out.flac, so you'll need to remove it there too
Should also solve #99 and #100

@arunvramesh
Copy link

@dawsondeere what do you mean by recompile the voicecommand.cpp.I Am a newbie. please explain.

@dawsondeere
Copy link

@arunvramesh When I say recompile voicecommand.cpp, I mean from the directory PiAUISuite/VoiceCommand, run the command make voicecommand and when that is finished, run cp voicecommand /usr/bin/voicecommand (this command will probably need to be prefixed with sudo)

@IamVindicta
Copy link

@dawsondeere when i run the make command i get this, any help?

make voicecommand
g++-4.8 -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -D'BUILDTS="180329 04:50:54 +0100"' -O3 -lcurl -lboost_regex -o voicecommand voicecommand.cpp
make: g++-4.8: Command not found
Makefile:34: recipe for target 'voicecommand' failed
make: *** [voicecommand] Error 127

@dawsondeere
Copy link

@IamVindicta You don't have g++-4.8 installed. Change g++-4.8 to g++ and then run it (assuming you have g++ installed)

@IamVindicta
Copy link

IamVindicta commented Mar 29, 2018

@dawsondeere i installed g++-4.8 and ran again but this time i ended with a different error, sorry im not the best with this.

make voicecommand
g++-4.8 mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -D'BUILDTS="180329 18:11:11 +0100"' -O3 -lcurl -lboost_regex -o voicecommand voicecommand.cpp
g++-4.8: error: mcpu=cortex-a7: No such file or directory
Makefile:34: recipe for target 'voicecommand' failed
make: *** [voicecommand] Error 1

EDIT: I deleted the - before mcpu accidentally but i now get this error:

/tmp/ccELBpQ6.o: In function char const* boost::re_detail_106200::re_is_set_member<char const*, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(char const*, char const*, boost::re_detail_106200::re_set_long<unsigned int> const*, boost::re_detail_106200::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool)': voicecommand.cpp:(.text._ZN5boost16re_detail_10620016re_is_set_memberIPKccNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_S8_S8_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb[_ZN5boost16re_detail_10620016re_is_set_memberIPKccNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_S8_S8_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb]+0x100): undefined reference to boost::re_detail_106200::cpp_regex_traits_implementation::transform_primary(char const*, char const*) const'
voicecommand.cpp:(.text._ZN5boost16re_detail_10620016re_is_set_memberIPKccNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_S8_S8_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb[_ZN5boost16re_detail_10620016re_is_set_memberIPKccNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_S8_S8_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb]+0x3e4): undefined reference to `boost::re_detail_106200::cpp_regex_traits_implementation::transform(char const*, char const*) const'
collect2: error: ld returned 1 exit status
Makefile:34: recipe for target 'voicecommand' failed
make: *** [voicecommand] Error 1

@IamVindicta
Copy link

@dawsondeere would it be possible for you to upload the complied files somewhere for me and others having issues to download and replace the originals?

@Hazhan
Copy link

Hazhan commented Oct 24, 2018

@IamVindicta Thank you a lot, I could reach this point with your help but still I have this problem

g++-4.8 -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -D'BUILDTS="181024 22:39:29 +0100"' -O3 -lcurl -lboost_regex -o voicecommand voicecommand.cpp
^CMakefile:34: recipe for target 'voicecommand' failed
make: *** [voicecommand] Interrupt

@jtsSTECH
Copy link

@IamVindicta Thank you a lot, I could reach this point with your help but still I have this problem

g++-4.8 -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -D'BUILDTS="181024 22:39:29 +0100"' -O3 -lcurl -lboost_regex -o voicecommand voicecommand.cpp
^CMakefile:34: recipe for target 'voicecommand' failed
make: *** [voicecommand] Interrupt

The make file is using g++4.8. Try compiling it with your main g++ version:
g++ -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -D'BUILDTS="160506 05:20:31 -0700"' -O3 -lcurl -lboost_regex -o voicecommand

(Found here: https://www.raspberrypi.org/forums/viewtopic.php?t=72570)

@borhanshuvo
Copy link

Warning: Couldn't read data from file "/dev/shm/noise.flac", this makes an
Warning: empty POST. how to solve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants