aeneas v1.4.1 now available on GitHub

66 views
Skip to first unread message

Alberto Pettarin

unread,
Feb 13, 2016, 5:06:40 AM2/13/16
to aeneas-forc...@googlegroups.com
Dear all,

aeneas v1.4.1 is now available on GitHub (on the master branch):

https://github.com/readbeyond/aeneas/

Docs: http://www.readbeyond.it/aeneas/docs/

Change log: http://www.readbeyond.it/aeneas/docs/changelog.html

=== === ===

As mentioned in a previous email, this release contains some structural
changes mainly aimed to ease developing the next major release (v1.5.0),
and some minor optimizations --- e.g., execute_task should be slightly
faster.

The user interfaces of the CLI tools are essentially unchanged, but now
you can specify runtime configurations using the "-r" or
"--runtime-configuration" switch. For example, to force running the
Python code instead of the optimized C code, append to the command
invokation:

-r="c_extensions=False"

or, to run at 10ms resolution (instead of the default 40ms):

-r="mfcc_window_length=0.025|mfcc_window_shift=0.010"

See the change log for details:
http://www.readbeyond.it/aeneas/docs/changelog.html

Please report any bugs you find.

=== === ===

I have also updated the Web App, now at v0.0.8: http://aeneasweb.org/

To prevent memory overruns, I added the constraint that each audio file
cannot be longer than 1.5 hours --- it seems fair enough for a "free"
service, considering the budget of this project (0).

I renewed the VPS for another 3 months. Donations are welcome --- I have
received none so far, albeit the Web App is used daily by ~3 users (on
average) --- which is not really a stimulus for working on it or keeping
it alive.

=== === ===

Roadmap for v1.5.0:

1. multilevel sync maps

2. better word-level alignment, e.g. by performing multiple passes at
different resolutions

3. audio-driven text segmentation (primarily for CC applications, and
maybe for Audio-eBook applications)

4. on-disk computation when the single audio file is too big to be
processed in RAM --- this, combined with 2., would allow processing
large audio files (e.g., >2h audiobook as a single audio file) that
currently are not managed at all

This (v1.5.0) next major release will require a large amount of work and
hence please do not expect it to be ready before 3 months.

=== === ===

Best regards,

Alberto Pettarin

Firat Özdemir

unread,
Feb 15, 2016, 5:41:37 AM2/15/16
to aeneas-forc...@googlegroups.com
Hi Alberto,

I just noticed that repeating the alignment -without changing any settings- gives slightly different results each time. Is this expected?  As far as I remember that wasn't the case with the older versions. 

Firat



--
You received this message because you are subscribed to the Google Groups "aeneas-forced-alignment" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aeneas-forced-ali...@googlegroups.com.
To post to this group, send email to aeneas-forc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aeneas-forced-alignment/56BF005D.6060104%40readbeyond.it.
For more options, visit https://groups.google.com/d/optout.

Alberto Pettarin

unread,
Feb 15, 2016, 5:49:46 AM2/15/16
to aeneas-forc...@googlegroups.com
No, it should not.

It looks like a memory problem, probably in the new C code.

Can you provide an example of the different output of two different
runs? (just the timings)

AP



On 02/15/2016 11:41 AM, Firat Özdemir wrote:
> Hi Alberto,
>
> I just noticed that repeating the alignment -without changing any
> settings- gives slightly different results each time. Is this
> expected? As far as I remember that wasn't the case with the older
> versions.
>
> Firat
>
> On 13 February 2016 at 11:07, Alberto Pettarin <alb...@readbeyond.it
> <mailto:aeneas-forced-alignment%2Bunsu...@googlegroups.com>.
> To post to this group, send email to
> aeneas-forc...@googlegroups.com
> <mailto:aeneas-forc...@googlegroups.com>.
> --
> You received this message because you are subscribed to the Google
> Groups "aeneas-forced-alignment" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to aeneas-forced-ali...@googlegroups.com
> <mailto:aeneas-forced-ali...@googlegroups.com>.
> To post to this group, send email to
> aeneas-forc...@googlegroups.com
> <mailto:aeneas-forc...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/aeneas-forced-alignment/CAEs3jXsiALGOgDMogLKnMy%2BcOmHQqBysoEYX3RotFt8GQzbJPQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/aeneas-forced-alignment/CAEs3jXsiALGOgDMogLKnMy%2BcOmHQqBysoEYX3RotFt8GQzbJPQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.


--
Alberto Pettarin

web: http://readbeyond.it/
web: http://www.albertopettarin.it/
twitter: http://twitter.com/acutebit/
skype: alberto_pettarin
mobile: +39 340 82 18 704

Firat Özdemir

unread,
Feb 15, 2016, 6:20:49 AM2/15/16
to aeneas-forc...@googlegroups.com

To unsubscribe from this group and stop receiving emails from it, send an email to aeneas-forced-ali...@googlegroups.com.
To post to this group, send email to aeneas-forc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aeneas-forced-alignment/56C1AD77.6050200%40readbeyond.it.

Alberto Pettarin

unread,
Feb 15, 2016, 7:28:59 AM2/15/16
to aeneas-forc...@googlegroups.com
OK, thanks.

I did a quick test right now, running different three tasks several
times on my laptop, and I was not able to reproduce, but that is not
conclusive: if it is indeed a dirty memory problem in the C code, it
might be difficult to reproduce it anyway.

From the "randomness" of your timing values, it definitely looks like a
"numerical" problem --- hence my hypothesis it is a "dirty memory" bug.

Clearly this is a major defect, albeit probably most users do not even
care about it --- as the output is still "reasonable".

At the moment, if you need reproducibility either downgrade to v1.4.0,
or use -r="c_extensions=False" if you can tolerate running the much
slower Python code.

Thanks for reporting this issue. I will investigate it ASAP. Just two
more questions:

1. Did aeneas crash during one of your runs or did it always produced an
output, although different?

2. What OS (type, version, 32/64 bits) and Python version are you running?

Thank you,

AP



On 02/15/2016 12:20 PM, Firat Özdemir wrote:
> Sample output:
> https://docs.google.com/spreadsheets/d/1pd9laV5eLVzhpnUa73bdfcXvL1c3lBx5edELOgWeTqU/edit?usp=sharing
>
> All settings were at default values.
>
> Firat
>
> On 15 February 2016 at 11:50, Alberto Pettarin <alb...@readbeyond.it
> <mailto:alb...@readbeyond.it>> wrote:
>
> No, it should not.
>
> It looks like a memory problem, probably in the new C code.
>
> Can you provide an example of the different output of two different
> runs? (just the timings)
>
> AP
>
>
>
> On 02/15/2016 11:41 AM, Firat Özdemir wrote:
>
> Hi Alberto,
>
> I just noticed that repeating the alignment -without changing any
> settings- gives slightly different results each time. Is this
> expected? As far as I remember that wasn't the case with the older
> versions.
>
> Firat
>
> On 13 February 2016 at 11:07, Alberto Pettarin
> <alb...@readbeyond.it <mailto:alb...@readbeyond.it>
> <mailto:alb...@readbeyond.it <mailto:alb...@readbeyond.it>>>
> <mailto:aeneas-forced-alignment%2Bunsu...@googlegroups.com
> <mailto:aeneas-forced-alignment%252Buns...@googlegroups.com>>.
> To post to this group, send email to
> aeneas-forc...@googlegroups.com
> <mailto:aeneas-forc...@googlegroups.com>
> <mailto:aeneas-forc...@googlegroups.com
> <mailto:aeneas-forc...@googlegroups.com>>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/aeneas-forced-alignment/56BF005D.6060104%40readbeyond.it.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "aeneas-forced-alignment" group.
> To unsubscribe from this group and stop receiving emails from
> it, send
> an email to aeneas-forced-ali...@googlegroups.com
> <mailto:aeneas-forced-alignment%2Bunsu...@googlegroups.com>
> <mailto:aeneas-forced-ali...@googlegroups.com
> <mailto:aeneas-forc...@googlegroups.com
> mobile: +39 340 82 18 704 <tel:%2B39%20340%2082%2018%20704>
>
> --
> You received this message because you are subscribed to the Google
> Groups "aeneas-forced-alignment" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to
> aeneas-forced-ali...@googlegroups.com
> <mailto:aeneas-forced-alignment%2Bunsu...@googlegroups.com>.
> To post to this group, send email to
> aeneas-forc...@googlegroups.com
> <mailto:aeneas-forc...@googlegroups.com>.
> To view this discussion on the web visit
> --
> You received this message because you are subscribed to the Google
> Groups "aeneas-forced-alignment" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to aeneas-forced-ali...@googlegroups.com
> <mailto:aeneas-forced-ali...@googlegroups.com>.
> To post to this group, send email to
> aeneas-forc...@googlegroups.com
> <mailto:aeneas-forc...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/aeneas-forced-alignment/CAEs3jXtkA0%3DYsfuEhMf%2BnoBMKp_cfgCzXnbj%2B6q_FOzxr2RQBQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/aeneas-forced-alignment/CAEs3jXtkA0%3DYsfuEhMf%2BnoBMKp_cfgCzXnbj%2B6q_FOzxr2RQBQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Alberto Pettarin

unread,
Feb 15, 2016, 7:57:09 AM2/15/16
to aeneas-forc...@googlegroups.com
I forgot: in theory, there is a possibility for two runs to produce two
different sets of timing values. It might happen if one run executes the
C code, and the other one executes the Python code.

Since aeneas first tries to run the C code (if compiled) but also falls
back to the Python code if an error of any kind occurs, this might
explain your results. You can check if this is the case by running with
the -v flag or the -l flag and see in the produced log if there is any
message about an error in the C extension (grep "C extension").

It seems unlikely (because it would imply that in one run the C code
worked as expected, while in the other run it crashed/failed), but it is
a possibility.

AP

Firat Özdemir

unread,
Feb 15, 2016, 9:24:18 AM2/15/16
to aeneas-forc...@googlegroups.com
The machine is Debian 8 64 bit.

I'm normally calling aeneas from Python (2.7),  I just tried the command line and it does give reproducible results. So it must be my code. Sorry for the false alarm, the output was too accurate to suspect from that.

Such random variation is still a bit strange though. If I find anything interesting I will let you know.

Thanks,
Firat



--
You received this message because you are subscribed to the Google Groups "aeneas-forced-alignment" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aeneas-forced-ali...@googlegroups.com.
To post to this group, send email to aeneas-forc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aeneas-forced-alignment/56C1CB53.8070709%40readbeyond.it.

Alberto Pettarin

unread,
Feb 15, 2016, 10:18:11 AM2/15/16
to aeneas-forc...@googlegroups.com
Alright, no problem.

AP



On 02/15/2016 03:23 PM, Firat Özdemir wrote:
> The machine is Debian 8 64 bit.
>
> I'm normally calling aeneas from Python (2.7), I just tried the command
> line and it does give reproducible results. So it must be my code. Sorry
> for the false alarm, the output was too accurate to suspect from that.
>
> Such random variation is still a bit strange though. If I find anything
> interesting I will let you know.
>
> Thanks,
> Firat
>
>
>
> On 15 February 2016 at 13:57, Alberto Pettarin <alb...@readbeyond.it
> <mailto:aeneas-forced-alignment%2Bunsu...@googlegroups.com>.
> To post to this group, send email to
> aeneas-forc...@googlegroups.com
> <mailto:aeneas-forc...@googlegroups.com>.
> --
> You received this message because you are subscribed to the Google
> Groups "aeneas-forced-alignment" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to aeneas-forced-ali...@googlegroups.com
> <mailto:aeneas-forced-ali...@googlegroups.com>.
> To post to this group, send email to
> aeneas-forc...@googlegroups.com
> <mailto:aeneas-forc...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/aeneas-forced-alignment/CAEs3jXsE_ayoo83OPACzDA57GQLOjho8qTKDO2gLhhzamXbNGg%40mail.gmail.com
> <https://groups.google.com/d/msgid/aeneas-forced-alignment/CAEs3jXsE_ayoo83OPACzDA57GQLOjho8qTKDO2gLhhzamXbNGg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.


Firat Özdemir

unread,
Feb 17, 2016, 3:32:01 PM2/17/16
to aeneas-forc...@googlegroups.com
Hi Alberto,

It wasn't my code. Your initial guess seems to be correct.

My script calls aeneas task execution multiple times. As you predicted, the variation doesn't occur when C extensions are off. When they are on, the first run gives exactly the same result as the pure Python code but there's variation in the second run and onwards. When I compare the logs for these runs, I see that the synthesized audio is a bit longer than the first run. 

Since aeneas' job execution works the same way (i.e multiple task executions in one script), I wanted to see if it happens there too. I tested it with a job with three identical tasks and resulting syncmaps did show the random variation. So it affects the regular usage of aeneas too.

My work-around was to run the task execution by subprocess instead of using it as a module:

subprocess.Popen(["python", "-m", "aeneas.tools.execute_task", audio_file_path, text_file_path, config_string, sync_map_file_path])

It feels a bit weird but it does the job. 

Firat




To unsubscribe from this group and stop receiving emails from it, send an email to aeneas-forced-ali...@googlegroups.com.
To post to this group, send email to aeneas-forc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aeneas-forced-alignment/56C1EC61.2060601%40readbeyond.it.

Alberto Pettarin

unread,
Feb 17, 2016, 5:16:27 PM2/17/16
to aeneas-forc...@googlegroups.com
Hi Firat,

thank you for taking time to drill the issue down.

I confirm that doing:

task = Task(...)
executor = ExecuteTask(task)
executor.execute()
executor.execute()
executor.execute()

produces slightly different syncmaps at each run, while it should not.

I also confirm that the issue is with the cew C extension --- if you
compile the C extensions, delete only aeneas/cew/cew.so, and run some
code with the above structure, you will get the same syncmap after each run.

The issue is reproducible even when you create different Task and/or
ExecuteTask objects, and that implies that ExecuteJob is affected as
well --- in the sense that from the syncmaps from the second task are
slightly different than they should be.

I believe the problem stems from the aeneas.cew.cew staying loaded
between executions --- perhaps since it became a sub-sub module in v1.4.1.

=== === ===

To recap:

Only Linux users are affected (since cew is available only on Linux),
and only those using aeneas as library or using execute_job.

Possible workarounds: 1. delete the aeneas/cew/cew.so compiled module;
or 2. run one task at a time (on the command line or spawning a new
process with subprocess as Firat suggested).

I will look into this issue ASAP, tomorrow or Friday.

AP

Alberto Pettarin

unread,
Feb 18, 2016, 7:27:01 AM2/18/16
to aeneas-forc...@googlegroups.com
Just a quick update.

It looks the problem comes from eSpeak itself, and cew or Python have
nothing to do with it, as I reproduced the issue with a minimal C
program that generates multiple times the audio data for the same text:
each run generates different audio events (hence, audio times).

I posted a message on the eSpeak mailing list, with the minimal example
and its output:

https://sourceforge.net/p/espeak/mailman/message/34861696/

I will wait a bit, hoping to get some insight from the eSpeak dev. Then,
I will decide whether I should add a workaround to the aeneas lib. The
only choice would be running aeneas.cew.cew into a separate subprocess,
since C extension modules cannot be reloaded/reimported dynamically.

The only use case seriously affected is people running execute_job on
the command line on Linux, where each Job has multiple Tasks. Since the
syncmap output for each Task is still "reasonable" (basically, some time
values might differ by at most a few hundred milliseconds), I would say
this is a defect that a majority of users can tolerate. If the user
absolutely needs repeatability, she must remove the cew .so compiled module.

Let me state again that Windows or OS X users and execute_task users are
not affected.

BTW, the issue has been there since the C extension cew was introduced,
not just in v1.4.1 --- I guess it is time to add some unit tests on cew...

AP

Alberto Pettarin

unread,
Mar 1, 2016, 5:37:08 AM3/1/16
to aeneas-forc...@googlegroups.com
On 02/18/2016 01:27 PM, Alberto Pettarin wrote:
> Just a quick update.
>
> It looks the problem comes from eSpeak itself, and cew or Python have
> nothing to do with it, as I reproduced the issue with a minimal C
> program that generates multiple times the audio data for the same text:
> each run generates different audio events (hence, audio times).
>
> I posted a message on the eSpeak mailing list, with the minimal example
> and its output:
>
> https://sourceforge.net/p/espeak/mailman/message/34861696/
>
> I will wait a bit, hoping to get some insight from the eSpeak dev. Then,
> I will decide whether I should add a workaround to the aeneas lib. The
> only choice would be running aeneas.cew.cew into a separate subprocess,
> since C extension modules cannot be reloaded/reimported dynamically.

Unfortunately on the eSpeak mailing list I only got a suggestion from
Reece Dunn, the developer who took the eSpeak project over in absentia
of Johnathan Duddington, but that did not help fixing the issue.

Moreover, it looks to me that the same issue is present in the new fork
named eSpeak-ng, so I guess there is something deep going on there. At
the moment I cannot afford investigating (i.e., memory debugging espeak
C code...) further.

For those needing absolute reproducibility of time values, I coded in
aeneas a workaround which calls cew using subprocess, hence ensuring
isolation and reproducibility while being essentially as fast as calling
cew directly.

This workaround will be published in the next aeneas major version,
v1.5.0. I am still in doubt whether turning this workaround on by
default or not, since it looks very ugly to me.

AP



Reply all
Reply to author
Forward
0 new messages