numediart/MBROLATOR

This program can't decode your database

Closed this issue · 12 comments

Hello,

I have tried building the sample database available under /TEST directory in this repository, however mbrola (compiled from source) cannot read it, giving the following message:

This program can't decode your database
Get the last version of mbrola at www address :
http://tcts.fpms.ac.be/synthesis

If I try to directly use the "test" database which is pre-build in this repository, mbrola reads it fine.

I'm running Ubuntu 19.04 64 bits under WSL. I can provide more info if needed.

Additional information would be nice.

I don't know exactly what sor of extra information you want me to provide, but I guess I'll start with the steps I took to reach the error:

First, I compiled both mbrola and "mbrolator", as instructed on the corresponding github pages. After compilation, I copied to /usr/local/bin the binaries mbrola, anaf0, anambe, database_build and resynth*

From a local copy of the repository, I navigated to the sample TEST database directory and from it I copied the WAV folder, generate_make.pl, generate_mbrola and test.seg into a new folder.

In the new folder, I ran, in order:
generate_mbrola test
generate_make.pl test WAV/ RES/ RES/
make -f test.mak

Then, I created a "test.pho" file with the following contents:

_ 100 50 131
a 200 50 262
k 100 50 262
i 200 50 131
_ 100 50 62

And then ran mbrola:
mbrola test test.pho test.wav
At this point, I got the error message that I have mentioned.

Can you compare pre-built and newly built databases with vbindiff and show differences?

It seems that there are a few extra bytes right at the start of the file, which offsets the entire contents. I took a look at other portions, and from a quick glance, they seem pretty much identical, with the exception of this initial offset.

The pre-built binary is on the top, and the newly built one is on the bottom of the image.

vbindiff

Currently I suspect, error comes from 64-bit platform.
Can you check, what happens, if:

  1. you delete unnecessary bytes by bless hex editor;
  2. you build database on 32-bit (virtual) machine?

Upon further inspection, beyond the existence of extra bytes in the binary file, there are many pairs of bytes that are swapped, so option number 1 won't work.

I created a virtual machine with ubuntu 17.04 32-bits, which is the latest desktop version that was released supporting 32-bit architecture. The resulting database could be used normally. So this probably means that there is some compatibility issue with 64-bit architecture.

Then it is definitely 64-bit architecture problem, and swapped bytes also mean there is also little- versus big-endian problem.

What happens, if you rebuild project with enabled CFLAGS += -m32 in /Resynthesis/Makefile and /AnaMBE/Makefile files on 64-bit platform?

I get a syntax error when running make -f test.mak on Phase 4

anaf0 'WAV/1.d16' RES/0.f0 2000 3810 test.f0
/usr/local/bin/anaf0: 1: /usr/local/bin/anaf0: Syntax error: "(" unexpected
make: *** [test.mak:4: RES/0.f0] Error 2

I have also encountered the same problem. But adding CFLAGS += -m32 to both /Resynthesis/Makefile and /AnaMBE/Makefile solved the problem. My OS is Arch Linux.

Today I have tried building again from scratch, adding CFLAGS += =m32 to the respective Makefiles. This time I was able to build a voice database and load it with mbrola.

Two things have changed since my last test, although I cannot state for sure whether any of these factors were contributing to the issue.
I have switched from WSL1 to WSL2. And now I'm running Ubuntu 20.04.1 LTS 64-bit.

I believe this issue may be closed.

lherg commented

Works fine with ubuntu 22.04. Just add CFLAGS += =m32 to both Makefile AnaMBE and Resynthesis.
Needs to install 32 bits header for gcc and g++:sudo apt-get install gcc-multilib g++-multilib