diff --git a/README.md b/README.md
index 5e78ff43..196bfbb2 100644
--- a/README.md
+++ b/README.md
@@ -2,13 +2,13 @@
**aeneas** is a Python/C library and a set of tools to automagically synchronize audio and text (aka forced alignment).
-* Version: 1.5.0
-* Date: 2016-04-02
+* Version: 1.5.0.2
+* Date: 2016-04-09
* Developed by: [ReadBeyond](http://www.readbeyond.it/)
* Lead Developer: [Alberto Pettarin](http://www.albertopettarin.it/)
* License: the GNU Affero General Public License Version 3 (AGPL v3)
* Contact: [aeneas@readbeyond.it](mailto:aeneas@readbeyond.it)
-* Quick Links: [Home](http://www.readbeyond.it/aeneas/) - [GitHub](https://github.com/readbeyond/aeneas/) - [PyPI](https://pypi.python.org/pypi/aeneas/) - [Docs](http://www.readbeyond.it/aeneas/docs/) - [Tutorial](http://www.readbeyond.it/aeneas/docs/clitutorial.html) - [Mailing List](https://groups.google.com/d/forum/aeneas-forced-alignment) - [Web App](http://aeneasweb.org)
+* Quick Links: [Home](http://www.readbeyond.it/aeneas/) - [GitHub](https://github.com/readbeyond/aeneas/) - [PyPI](https://pypi.python.org/pypi/aeneas/) - [Docs](http://www.readbeyond.it/aeneas/docs/) - [Tutorial](http://www.readbeyond.it/aeneas/docs/clitutorial.html) - [Benchmark](https://readbeyond.github.io/aeneas-benchmark/) - [Mailing List](https://groups.google.com/d/forum/aeneas-forced-alignment) - [Web App](http://aeneasweb.org)
## Goal
@@ -206,10 +206,12 @@ which explains how to use the built-in command line tools.
[https://groups.google.com/d/forum/aeneas-forced-alignment](https://groups.google.com/d/forum/aeneas-forced-alignment)
* Changelog:
[http://www.readbeyond.it/aeneas/docs/changelog.html](http://www.readbeyond.it/aeneas/docs/changelog.html)
-* High level description of how **aeneas** works:
+* High level description of how aeneas works:
[HOWITWORKS](https://github.com/readbeyond/aeneas/blob/master/wiki/HOWITWORKS.md)
* Development history:
[HISTORY](https://github.com/readbeyond/aeneas/blob/master/wiki/HISTORY.md)
+* Benchmark suite:
+ [https://readbeyond.github.io/aeneas-benchmark/](https://readbeyond.github.io/aeneas-benchmark/)
## Supported Features
diff --git a/README.rst b/README.rst
index dec6c93f..b7fcd9d6 100644
--- a/README.rst
+++ b/README.rst
@@ -4,8 +4,8 @@ aeneas
**aeneas** is a Python/C library and a set of tools to automagically
synchronize audio and text (aka forced alignment).
-- Version: 1.5.0
-- Date: 2016-04-02
+- Version: 1.5.0.2
+- Date: 2016-04-09
- Developed by: `ReadBeyond `__
- Lead Developer: `Alberto Pettarin `__
- License: the GNU Affero General Public License Version 3 (AGPL v3)
@@ -15,7 +15,8 @@ synchronize audio and text (aka forced alignment).
`PyPI `__ -
`Docs `__ -
`Tutorial `__
- - `Mailing
+ - `Benchmark `__ -
+ `Mailing
List `__ -
`Web App `__
@@ -208,10 +209,11 @@ Documentation and Support
- Mailing list:
https://groups.google.com/d/forum/aeneas-forced-alignment
- Changelog: http://www.readbeyond.it/aeneas/docs/changelog.html
-- High level description of how **aeneas** works:
+- High level description of how aeneas works:
`HOWITWORKS `__
- Development history:
`HISTORY `__
+- Benchmark suite: https://readbeyond.github.io/aeneas-benchmark/
Supported Features
------------------
diff --git a/aeneas/dtw.py b/aeneas/dtw.py
index afe168d9..134e77e0 100644
--- a/aeneas/dtw.py
+++ b/aeneas/dtw.py
@@ -222,11 +222,22 @@ def compute_boundaries(self, synt_anchors):
# synt_anchors as in seconds, convert them in MFCC indices
mws = self.rconf.mws
anchor_indices = numpy.array([int(a[0] / mws) for a in synt_anchors])
+ #
# right side sets the split point at the very beginning of "next" fragment
- begin_indices = numpy.searchsorted(synt_indices, anchor_indices, side="right")
+ #
+ # NOTE clip() is needed since searchsorted() with side="right" might return
+ # an index == len(synt_indices) == len(real_indices)
+ # when the insertion point is past the last element of synt_indices
+ # causing the fancy indexing real_indices[...] below might fail
+ begin_indices = numpy.clip(numpy.searchsorted(synt_indices, anchor_indices, side="right"), 0, len(synt_indices)-1)
# first split must occur at zero
begin_indices[0] = 0
+ #
# map onto real indices, obtaining "default" boundary indices
+ #
+ # NOTE since len(synt_indices) == len(real_indices)
+ # and because the numpy.clip() above, the fancy indexing is always valid
+ #
boundary_indices = numpy.append(real_indices[begin_indices], self.real_wave_mfcc.tail_begin)
self.log([u"Boundary indices: %d", len(boundary_indices)])
self.log(u"Computing boundary indices... done")
diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst
index 4064d452..99ecf868 100644
--- a/docs/source/changelog.rst
+++ b/docs/source/changelog.rst
@@ -1,6 +1,16 @@
Changelog
=========
+v1.5.0.2 (2016-04-09)
+---------------------
+
+#. Fix an issue in ``dtw`` with ``numpy.searchsorted`` returning an invalid index
+
+v1.5.0.1 (2016-04-03)
+---------------------
+
+#. Fix an issue with compiling C extensions on Windows
+
v1.5.0 (2016-04-02)
-------------------
diff --git a/setup.py b/setup.py
index 1cb97122..797e184f 100644
--- a/setup.py
+++ b/setup.py
@@ -86,7 +86,7 @@
"aeneas.extra": ["*.md"],
"aeneas.tools": ["res/*", "*.md"]
},
- version="1.5.0.1",
+ version="1.5.0.2",
description=SHORT_DESCRIPTION,
author="Alberto Pettarin",
author_email="alberto@albertopettarin.it",