MycroftAI / mimic1

Mycroft's TTS engine, based on CMU's Flite (Festival Lite)
https://mimic.mycroft.ai
Other
814 stars 152 forks source link

test failed #141

Open zangetsudo opened 6 years ago

zangetsudo commented 6 years ago

first, run this in my ubuntu:

# uname -a 
Linux ubuntu 4.4.0-59-generic #80~14.04.1-Ubuntu SMP Fri Jan 6 18:02:02 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

dos2unix dependencies.sh

./dependencies.sh --prefix="/opt/mimic/install"

dos2unix configure.ac 
dos2unix Makefile.am 

autogen.sh : modify the last line: && autoconf && autoreconf -ivf

./autogen.sh

./configure --prefix="/opt/mimic/install" && make && make check
end with error:
No package 'libpcre2-8' found

delete the lines in configure: from 12766 to 12775:


    as_fn_error $? "Package requirements (libpcre2-8) were not met:

$PCRE2_PKG_ERRORS

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables PCRE2_CFLAGS
and PCRE2_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5

run the command below again:

./configure --prefix="/opt/mimic/install"
make && make check end up with failed.

open the Makefile in the root path, modify the below lines:

PCRE2_CFLAGS=-O2 -fvisibility=hidden  -I./build/thirdparty/build_pcre2/src
PCRE2_LIBS = -L./build/thirdparty/build_pcre2/.libs/ ./build/thirdparty/build_pcre2/.libs/libpcre2-8.a

then the test failed with log which shows below:

make[2]: Leaving directory `/opt/mimic'
make  check-TESTS
make[2]: Entering directory `/opt/mimic'
make[3]: Entering directory `/opt/mimic'
PASS: unittests/hrg_test
PASS: unittests/regex_test
PASS: unittests/string_test
FAIL: unittests/token_test
PASS: unittests/voice_select
PASS: unittests/wave_test
PASS: unittests/lex_test
PASS: unittests/lts_test
PASS: unittests/nums_test
make[4]: Entering directory `/opt/mimic'
Making all in .
make[5]: Entering directory `/opt/mimic'
make[5]: Leaving directory `/opt/mimic'
make[4]: Leaving directory `/opt/mimic'
============================================================================
Testsuite summary for mimic 1.1.0.9000
============================================================================
# TOTAL: 9
# PASS:  8
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See ./test-suite.log
Please report to https://github.com/MycroftAI/mimic/issues
============================================================================
make[3]: *** [test-suite.log] Error 1
make[3]: Leaving directory `/opt/mimic'
make[2]: *** [check-TESTS] Error 2
make[2]: Leaving directory `/opt/mimic'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/opt/mimic'
make: *** [check-recursive] Error 1
========================================
   mimic 1.1.0.9000: ./test-suite.log
========================================

# TOTAL: 9
# PASS:  8
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: unittests/token_test
==========================

Test tokens...                  [ FAILED ]
  unittests/token_test_main.c:28: Check strcmp(token, "world") == 0... failed
  unittests/token_test_main.c:40: Check strcmp(token, "A") == 0... failed
  unittests/token_test_main.c:42: Check strcmp(token, "small") == 0... failed
  unittests/token_test_main.c:44: Check strcmp(token, "test") == 0... failed
  unittests/token_test_main.c:46: Check strcmp(token, "") == 0... failed
  unittests/token_test_main.c:47: Check ts_eof(fd)... failed
Test tokens_utf8...             [ FAILED ]
  unittests/token_test_main.c:70: Check strcmp(token, "Yahoo") == 0... failed
  unittests/token_test_main.c:71: Check strcmp(fd->postpunctuation, "!\"") == 0... failed
  unittests/token_test_main.c:73: Check strcmp(token, "who") == 0... failed
  unittests/token_test_main.c:75: Check strcmp(token, "(") == 0... failed
  unittests/token_test_main.c:77: Check strcmp(token, "s") == 0... failed
  unittests/token_test_main.c:79: Check strcmp(token, ")") == 0... failed
  unittests/token_test_main.c:81: Check strcmp(token, "Good") == 0... failed
  unittests/token_test_main.c:82: Check strcmp(fd->prepunctuation, "¡") == 0... failed
  unittests/token_test_main.c:84: Check strcmp(token, "News") == 0... failed
  unittests/token_test_main.c:85: Check strcmp(fd->postpunctuation, "!") == 0... failed
  unittests/token_test_main.c:87: Check strcmp(token, "Åke") == 0... failed
  unittests/token_test_main.c:89: Check strcmp(token, "€") == 0... failed
  unittests/token_test_main.c:91: Check strcmp(token, "Über") == 0... failed
  unittests/token_test_main.c:93: Check strcmp(token, "漢字") == 0... failed
  unittests/token_test_main.c:95: Check strcmp(token, "") == 0... failed
  unittests/token_test_main.c:96: Check ts_eof(fd)... failed

Summary:
  FAILED: 2 of 2 unit tests have failed.

please tell me if anything i can do.

forslund commented 6 years ago

Hi,

Above looks a bit weird but it's hard to tell when the configure script is hand edited. It looks like something is up with the PCRE2 calls (used for utf8 regexes) I would test the following

/dependencies.sh --prefix="/opt/mimic/install"
./autogen.sh
mkdir build && cd  build
PKG_CONFIG_PATH=/opt/mimic/install/lib/pkgconfig ../configure --prefix=/opt/mimic/install
make
make test

Setting the PKG_CONFIG_PATH variable should allow the configure script to automatically find the pcre2 install by the dependencies.sh sript

zeehio commented 6 years ago

I applied a commit on mimic-core worth backporting for this issue. https://github.com/MycroftAI/mimic-core/commit/9ac3af579266a323dbfdd23762d42e6d67ebf886

In that commit I fixed some failures on the test you mention due to different line ending conventions in windows systems. Seeing your dos2unix usage I am suspicious they can be related. Åke, I have no time this next month, it would be great if you could port that commit here. Could you?

forslund commented 6 years ago

I'll give it a go tonight and we'll see :)

zangetsudo commented 6 years ago

dos2unix is need because the above steps failed all the time. i really doubt your guys have tested it on Linux. buy the way, the output of minic is about 145M, is it possible to fit the embedded device by cutting it off?

zangetsudo commented 6 years ago

zeehio, thx for your commit. but it's for mimic-core, not mimic.. is there any patch for the mimic??

forslund commented 6 years ago

I've ported it over and will create a PR after a couple of tests.

Linux is the main platform we're running on (at least it's my only) so it's being run extensively on Linux (mainly debian based distros)

If you want a smaller binary you should disable the precompilation of some voices. The single biggest voice is vid_gb_ap so adding the --disable-vid_gb_ap should reduce the binary size significantly. (Down to 34M)

zangetsudo commented 6 years ago

hi, forslund, it's very nice you commented in time. there are a few people do this now days. i will check that and feed you back. the voice which come from mimic is very nice and thanks for your great project. one more question. how many languages does it support and will the binary(maybe 34M) after cut off can do the same thing as the bigger one exactly? i checked Chinese, but failed, i thank it related to the utf8 in the first post from you, though. will check it again after your patch comes up.

forslund commented 6 years ago

You can try the backport-zeehio-winfix branch with the relevant changes backported https://github.com/MycroftAI/mimic/tree/backport-zeehio-winfix

I'll still have to examine why the windows crosscompile is broken on travis.

In this build only English is supported. We're moving on to a plugin based structure (designed by @zeehio) to make language integration more easy. That has support for Spanish (and French) in addition to English.

zangetsudo commented 6 years ago

yep, i will give it a try so no Chinese is support? is it in schedule anyway??

forslund commented 6 years ago

We don't have a specific plan for language support, we will be adding languages as we (and by we I mean mostly @zeehio since he's the one responsible for most of that work so far) go along and will accept language contributions from the community.

zeehio commented 6 years ago

I'll try to separately answer most of the points in this issue:

forslund commented 6 years ago

@zeehio I'll go ahead and disable that test then and I'll look into the wine issue or disable that part of the test.

el-tocino commented 6 years ago

Using -O3 -march=native CFLAGS, --disable-voices-all --enable-cmu_us_slt configure options (x86_64), my binary is 6.1mb, strip'd it's down to 4.9mb.

On ubuntu, libpcre2-dev is needed to satisfy the configure check.

zangetsudo commented 6 years ago

wow!! 4.9M. that's nice. i cannot believe it can be cut off from 145M to 4.9M i will try it anyway

el-tocino commented 6 years ago

Built fresh today from a pull of the repo. mimic = compiled version, mimic-openmp is the strip'd version.

eltocino@cranky:/opt/mimic$ ls -l mimic -rwxrwxr-x 1 eltocino eltocino 6257552 Oct 27 00:52 mimic eltocino@cranky:/opt/mimic$ ./mimic -lv Voices available: slt eltocino@cranky:/opt/mimic$ ls -l mimic-openmp -rwxrwxr-x 1 eltocino eltocino 5073936 Oct 27 00:53 mimic-openmp eltocino@cranky:/opt/mimic$ ./mimic-openmp -lv Voices available: slt eltocino@cranky:/opt/mimic$ time ./mimic-openmp -v slt -t "Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battle-field of that war. We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this." times faster than real-time: 0.990325 (20.230000 seconds of speech synthesized in 20.427628)

real 0m20.431s user 0m0.340s sys 0m0.024s

eltocino@cranky:/opt/mimic$ time ./mimic -v slt -t "Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battle-field of that war. We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this." times faster than real-time: 1.009409 (20.230000 seconds of speech synthesized in 20.041431)

real 0m20.046s user 0m0.352s sys 0m0.032s

pabloab commented 5 years ago

I've just follow this steps on an Ubuntu 18.04

sudo apt-get install gcc make pkg-config automake libtool libasound2-dev
git clone https://github.com/MycroftAI/mimic.git
cd mimic
./dependencies.sh --prefix="/usr/local"
./autogen.sh
./configure --prefix="/usr/local"
make
make check

And on the last step I get the same error on _FAIL: unittests/stringtest:

make[3]: Entering directory '/tmp/mimic'
PASS: unittests/hrg_test
PASS: unittests/regex_test
FAIL: unittests/string_test
PASS: unittests/token_test
PASS: unittests/voice_select
PASS: unittests/wave_test
PASS: unittests/lex_test
PASS: unittests/lts_test
PASS: unittests/nums_test
============================================================================
Testsuite summary for mimic 1.1.0.9000
============================================================================
# TOTAL: 9
# PASS:  8
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See ./test-suite.log
Please report to https://github.com/MycroftAI/mimic/issues
============================================================================
Makefile:4695: recipe for target 'test-suite.log' failed
make[3]: *** [test-suite.log] Error 1
make[3]: Leaving directory '/tmp/mimic'
Makefile:4801: recipe for target 'check-TESTS' failed
make[2]: *** [check-TESTS] Error 2
make[2]: Leaving directory '/tmp/mimic'
Makefile:5095: recipe for target 'check-am' failed
make[1]: *** [check-am] Error 2
make[1]: Leaving directory '/tmp/mimic'
Makefile:4581: recipe for target 'check-recursive' failed
make: *** [check-recursive] Error 1

The only "strange" things: On ./dependencies.sh --prefix="/usr/local" I get

PCRE was successfully compiled. However, it could not be installed. The most likely cause is a lack of permissions. This script will try to run the installation with sudo asking your password.

and then amidst all the output:

libtool: warning: relinking 'libpcre2-posix.la'

There isn't any fix or workaround?

pabloab commented 5 years ago

Reluctantly but yes, I did.

Honghe commented 5 years ago

@forslund your solution works on Ubuntu 18.04

/dependencies.sh --prefix="/opt/mimic/install"
./autogen.sh
mkdir build && cd  build
PKG_CONFIG_PATH=/opt/mimic/install/lib/pkgconfig ../configure --prefix=/opt/mimic/install
make
make test