diff --git a/MANIFEST.in b/MANIFEST.in
index 94d3d07c..e81737bb 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -14,6 +14,7 @@ prune docs/build
include CHANGELOG
include LICENSE
recursive-include licenses *
+include output/.gitignore
include README.md
include README.rst
include requirements.txt
diff --git a/README.md b/README.md
index e077e75b..f69fb813 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
**aeneas** is a Python/C library and a set of tools to automagically synchronize audio and text (aka forced alignment).
-* Version: 1.5.0.3
-* Date: 2016-04-23
+* Version: 1.5.1.0
+* Date: 2016-07-25
* 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)
@@ -87,6 +87,16 @@ which can be installed on any modern OS (Linux, Mac OS X, Windows).
### Installation
+All-in-one installers are available for Mac OS X and Windows,
+and a Bash script for deb-based Linux distributions (Debian, Ubuntu)
+is provided in this repository.
+It is also possible to download a VirtualBox+Vagrant virtual machine.
+Please see the
+[INSTALL file](https://github.com/readbeyond/aeneas/blob/master/wiki/INSTALL.md)
+for detailed, step-by-step installation procedures for different operating systems.
+
+The generic OS-independent procedure is simple:
+
1. Install
[Python](https://python.org/) (2.7.x preferred),
[FFmpeg](https://www.ffmpeg.org/), and
@@ -102,20 +112,16 @@ which can be installed on any modern OS (Linux, Mac OS X, Windows).
pip install aeneas
```
-See the
-[INSTALL file](https://github.com/readbeyond/aeneas/blob/master/wiki/INSTALL.md)
-for detailed, step-by-step procedures for Linux, OS X, and Windows.
-
-
-## Usage
-
-1. To **check** whether you installed **aeneas** correctly, run:
+4. To **check** whether you installed **aeneas** correctly, run:
```bash
python -m aeneas.diagnostics
```
-2. Run without arguments to get the **usage message**:
+
+## Usage
+
+1. Run without arguments to get the **usage message**:
```bash
python -m aeneas.tools.execute_task
@@ -131,7 +137,7 @@ for detailed, step-by-step procedures for Linux, OS X, and Windows.
python -m aeneas.tools.execute_task --examples-all
```
-3. To **compute a synchronization map** `map.json` for a pair
+2. To **compute a synchronization map** `map.json` for a pair
(`audio.mp3`, `text.txt` in
[plain](http://www.readbeyond.it/aeneas/docs/textfile.html#aeneas.textfile.TextFileFormat.PLAIN)
text format), you can run:
@@ -169,7 +175,7 @@ for detailed, step-by-step procedures for Linux, OS X, and Windows.
[documentation](http://www.readbeyond.it/aeneas/docs/)
for details.
-4. If you have several tasks to process,
+3. If you have several tasks to process,
you can create a **job container**
to batch process them:
@@ -222,12 +228,12 @@ which explains how to use the built-in command line tools.
* Arbitrary text fragment granularity (single word, subphrase, phrase, paragraph, etc.)
* Input audio file formats: all those readable by `ffmpeg`
* Output sync map formats: AUD, CSV, EAF, JSON, SMIL, SRT, SSV, SUB, TSV, TTML, TXT, VTT, XML
-* Tested languages: ARA, BUL, CAT, CYM, CES, DAN, DEU, ELL, ENG, EPO, EST, FAS, FIN, FRA, GLE, GRC, HRV, HUN, ISL, ITA, LAT, LAV, LIT, NLD, NOR, RON, RUS, POL, POR, SLK, SPA, SRP, SWA, SWE, TUR, UKR
+* Confirmed working on languages: ARA, BUL, CAT, CYM, CES, DAN, DEU, ELL, ENG, EPO, EST, FAS, FIN, FRA, GLE, GRC, HRV, HUN, ISL, ITA, JPN, LAT, LAV, LIT, NLD, NOR, RON, RUS, POL, POR, SLK, SPA, SRP, SWA, SWE, TUR, UKR
* MFCC and DTW computed via Python C extensions to reduce the processing time
-* On Linux, eSpeak called via a Python C extension for faster audio synthesis
-* Batch processing of multiple audio/text pairs
* Several built-in TTS engine wrappers: eSpeak (default, FLOSS), Festival (FLOSS), Nuance TTS API (commercial)
-* Use custom TTS engine wrappers besides the built-in ones
+* Default TTS (eSpeak) called via a Python C extension for fast audio synthesis
+* A custom, user-provided TTS engine Python wrapper can be used instead of the built-in ones (included example for speect)
+* Batch processing of multiple audio/text pairs
* Download audio from a YouTube video
* In multilevel mode, recursive alignment from paragraph to sentence to word level
* Robust against misspelled/mispronounced words, local rearrangements of words, background noise/sporadic spikes
@@ -236,13 +242,14 @@ which explains how to use the built-in command line tools.
* Output an HTML file for fine tuning the sync map manually (`finetuneas` project)
* Execution parameters tunable at runtime
* Code suitable for Web app deployment (e.g., on-demand cloud computing)
+* Extensive test suite including 898 unit/integration/performance tests, that run and must pass before each release
## Limitations and Missing Features
* Audio should match the text: large portions of spurious text or audio might produce a wrong sync map
-* Audio is assumed to be spoken: not suitable/YMMV for song captioning
-* No protection against memory trashing if you feed extremely long audio files
+* Audio is assumed to be spoken: not suitable for song captioning, YMMV for CC applications
+* No protection against memory trashing if you feed extremely long audio files (>1.5h per single audio file)
* [Open issues](https://github.com/readbeyond/aeneas/issues)
@@ -340,6 +347,9 @@ for its asynchronous usage.
**Chris Hubbard** prepared the files for
packaging aeneas as a Debian/Ubuntu `.deb`.
+**Daniel Bair**, **Chris Hubbard**, and **Richard Margetts**
+packaged the installers for Mac OS X and Windows.
+
**Firat Ozdemir** contributed the `finetuneas`
HTML/JS code for fine tuning sync maps in the browser.
diff --git a/README.rst b/README.rst
index 3ba66b6f..070c4faa 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.3
-- Date: 2016-04-23
+- Version: 1.5.1.0
+- Date: 2016-07-25
- Developed by: `ReadBeyond `__
- Lead Developer: `Alberto Pettarin `__
- License: the GNU Affero General Public License Version 3 (AGPL v3)
@@ -100,6 +100,16 @@ modern OS (Linux, Mac OS X, Windows).
Installation
~~~~~~~~~~~~
+All-in-one installers are available for Mac OS X and Windows, and a Bash
+script for deb-based Linux distributions (Debian, Ubuntu) is provided in
+this repository. It is also possible to download a VirtualBox+Vagrant
+virtual machine. Please see the `INSTALL
+file `__
+for detailed, step-by-step installation procedures for different
+operating systems.
+
+The generic OS-independent procedure is simple:
+
1. Install `Python `__ (2.7.x preferred),
`FFmpeg `__, and
`eSpeak `__
@@ -114,18 +124,14 @@ Installation
pip install numpy
pip install aeneas
-See the `INSTALL
-file `__
-for detailed, step-by-step procedures for Linux, OS X, and Windows.
+4. To **check** whether you installed **aeneas** correctly, run:
+
+``bash python -m aeneas.diagnostics``
Usage
-----
-1. To **check** whether you installed **aeneas** correctly, run:
-
-``bash python -m aeneas.diagnostics``
-
-2. Run without arguments to get the **usage message**:
+1. Run without arguments to get the **usage message**:
.. code:: bash
@@ -140,7 +146,7 @@ Usage
python -m aeneas.tools.execute_task --examples
python -m aeneas.tools.execute_task --examples-all
-3. To **compute a synchronization map** ``map.json`` for a pair
+2. To **compute a synchronization map** ``map.json`` for a pair
(``audio.mp3``, ``text.txt`` in
`plain `__
text format), you can run:
@@ -178,7 +184,7 @@ specifies the parameters controlling the I/O formats and the processing
options for the task. Consult the
`documentation `__ for details.
-4. If you have several tasks to process, you can create a **job
+3. If you have several tasks to process, you can create a **job
container** to batch process them:
.. code:: bash
@@ -229,17 +235,19 @@ Supported Features
- Input audio file formats: all those readable by ``ffmpeg``
- Output sync map formats: AUD, CSV, EAF, JSON, SMIL, SRT, SSV, SUB,
TSV, TTML, TXT, VTT, XML
-- Tested languages: ARA, BUL, CAT, CYM, CES, DAN, DEU, ELL, ENG, EPO,
- EST, FAS, FIN, FRA, GLE, GRC, HRV, HUN, ISL, ITA, LAT, LAV, LIT, NLD,
- NOR, RON, RUS, POL, POR, SLK, SPA, SRP, SWA, SWE, TUR, UKR
+- Confirmed working on languages: ARA, BUL, CAT, CYM, CES, DAN, DEU,
+ ELL, ENG, EPO, EST, FAS, FIN, FRA, GLE, GRC, HRV, HUN, ISL, ITA, JPN,
+ LAT, LAV, LIT, NLD, NOR, RON, RUS, POL, POR, SLK, SPA, SRP, SWA, SWE,
+ TUR, UKR
- MFCC and DTW computed via Python C extensions to reduce the
processing time
-- On Linux, eSpeak called via a Python C extension for faster audio
- synthesis
-- Batch processing of multiple audio/text pairs
- Several built-in TTS engine wrappers: eSpeak (default, FLOSS),
Festival (FLOSS), Nuance TTS API (commercial)
-- Use custom TTS engine wrappers besides the built-in ones
+- Default TTS (eSpeak) called via a Python C extension for fast audio
+ synthesis
+- A custom, user-provided TTS engine Python wrapper can be used instead
+ of the built-in ones (included example for speect)
+- Batch processing of multiple audio/text pairs
- Download audio from a YouTube video
- In multilevel mode, recursive alignment from paragraph to sentence to
word level
@@ -253,15 +261,18 @@ Supported Features
- Execution parameters tunable at runtime
- Code suitable for Web app deployment (e.g., on-demand cloud
computing)
+- Extensive test suite including 898 unit/integration/performance
+ tests, that run and must pass before each release
Limitations and Missing Features
--------------------------------
- Audio should match the text: large portions of spurious text or audio
might produce a wrong sync map
-- Audio is assumed to be spoken: not suitable/YMMV for song captioning
+- Audio is assumed to be spoken: not suitable for song captioning, YMMV
+ for CC applications
- No protection against memory trashing if you feed extremely long
- audio files
+ audio files (>1.5h per single audio file)
- `Open issues `__
License
@@ -362,6 +373,9 @@ asynchronous usage.
**Chris Hubbard** prepared the files for packaging aeneas as a
Debian/Ubuntu ``.deb``.
+**Daniel Bair**, **Chris Hubbard**, and **Richard Margetts** packaged
+the installers for Mac OS X and Windows.
+
**Firat Ozdemir** contributed the ``finetuneas`` HTML/JS code for fine
tuning sync maps in the browser.
diff --git a/VERSION b/VERSION
index bc80560f..26ca5946 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.5.0
+1.5.1
diff --git a/aeneas/__init__.py b/aeneas/__init__.py
index 3bb2b30b..2ba74d49 100644
--- a/aeneas/__init__.py
+++ b/aeneas/__init__.py
@@ -13,7 +13,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/adjustboundaryalgorithm.py b/aeneas/adjustboundaryalgorithm.py
index 4651c746..0c07d6bc 100644
--- a/aeneas/adjustboundaryalgorithm.py
+++ b/aeneas/adjustboundaryalgorithm.py
@@ -30,7 +30,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/analyzecontainer.py b/aeneas/analyzecontainer.py
index 9fcf6868..7889c143 100644
--- a/aeneas/analyzecontainer.py
+++ b/aeneas/analyzecontainer.py
@@ -32,7 +32,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/audiofile.py b/aeneas/audiofile.py
index 25638fcc..de2847d6 100644
--- a/aeneas/audiofile.py
+++ b/aeneas/audiofile.py
@@ -37,7 +37,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
@@ -116,6 +116,77 @@ class AudioFile(Loggable):
:type logger: :class:`~aeneas.logger.Logger`
"""
+ FILE_EXTENSIONS = [
+ u"3g2",
+ u"3gp",
+ u"aa",
+ u"aa3",
+ u"aac",
+ u"aax",
+ u"aiff",
+ u"alac",
+ u"amr",
+ u"ape",
+ u"asf",
+ u"at3",
+ u"at9",
+ u"au",
+ u"avi",
+ u"awb",
+ u"celt",
+ u"dct",
+ u"dss",
+ u"dvf",
+ u"eac",
+ u"flac",
+ u"flv",
+ u"gsm",
+ u"m4a",
+ u"m4b",
+ u"m4p",
+ u"m4v",
+ u"mid",
+ u"midi",
+ u"mkv",
+ u"mmf",
+ u"mov",
+ u"mp2",
+ u"mp3",
+ u"mp4",
+ u"mpc",
+ u"mpeg",
+ u"mpg",
+ u"mpv",
+ u"msv",
+ u"oga",
+ u"ogg",
+ u"ogv",
+ u"oma",
+ u"opus",
+ u"pcm",
+ u"qt",
+ u"ra",
+ u"ram",
+ u"raw",
+ u"riff",
+ u"rm",
+ u"rmvb",
+ u"shn",
+ u"sln",
+ u"theora",
+ u"tta",
+ u"vob",
+ u"vorbis",
+ u"vox",
+ u"wav",
+ u"webm",
+ u"wma",
+ u"wmv",
+ u"wv",
+ u"yuv",
+ ]
+ """ Extensions of common formats for audio (and video) files. """
+
TAG = u"AudioFile"
def __init__(self, file_path=None, is_mono_wave=False, rconf=None, logger=None):
diff --git a/aeneas/audiofilemfcc.py b/aeneas/audiofilemfcc.py
index 2dd5efb4..18346463 100644
--- a/aeneas/audiofilemfcc.py
+++ b/aeneas/audiofilemfcc.py
@@ -29,7 +29,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
@@ -134,7 +134,7 @@ def __init__(
self._compute_mfcc_c_extension,
self._compute_mfcc_pure_python,
(),
- c_extension=self.rconf[RuntimeConfiguration.C_EXTENSIONS]
+ rconf=self.rconf
)
self.audio_length = self.audio_file.audio_length
if audio_file_was_none:
diff --git a/aeneas/cdtw/000_compile_driver.sh b/aeneas/cdtw/000_compile_driver.sh
index 4cb2f2b7..2f96b3dc 100644
--- a/aeneas/cdtw/000_compile_driver.sh
+++ b/aeneas/cdtw/000_compile_driver.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-gcc cdtw_driver.c cdtw_func.c cint.c -o cdtw_driver -lm -Wall -pedantic -std=c99
+gcc cdtw_driver.c cdtw_func.c ../cint/cint.c -o cdtw_driver -lm -Wall -pedantic -std=c99
diff --git a/aeneas/cdtw/900_clean.sh b/aeneas/cdtw/900_clean.sh
new file mode 100644
index 00000000..72abfd7f
--- /dev/null
+++ b/aeneas/cdtw/900_clean.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+rm -rf build __pycache__ *.so cdtw_driver
diff --git a/aeneas/cdtw/__init__.py b/aeneas/cdtw/__init__.py
index a8215303..abbd6102 100644
--- a/aeneas/cdtw/__init__.py
+++ b/aeneas/cdtw/__init__.py
@@ -114,7 +114,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL 3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/cdtw/cdtw_driver.c b/aeneas/cdtw/cdtw_driver.c
index 6d511227..e3a5d1af 100644
--- a/aeneas/cdtw/cdtw_driver.c
+++ b/aeneas/cdtw/cdtw_driver.c
@@ -9,7 +9,7 @@ __copyright__ = """
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/cdtw/cdtw_func.c b/aeneas/cdtw/cdtw_func.c
index 6bed35a3..f969a342 100644
--- a/aeneas/cdtw/cdtw_func.c
+++ b/aeneas/cdtw/cdtw_func.c
@@ -9,7 +9,7 @@ __copyright__ = """
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/cdtw/cdtw_func.h b/aeneas/cdtw/cdtw_func.h
index abef0212..46e05545 100644
--- a/aeneas/cdtw/cdtw_func.h
+++ b/aeneas/cdtw/cdtw_func.h
@@ -9,13 +9,13 @@ __copyright__ = """
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
*/
-#include "cint.h"
+#include "../cint/cint.h"
#define CDTW_SUCCESS 0
#define CDTW_FAILURE 1
diff --git a/aeneas/cdtw/cdtw_py.c b/aeneas/cdtw/cdtw_py.c
index 14e516ea..f210c525 100644
--- a/aeneas/cdtw/cdtw_py.c
+++ b/aeneas/cdtw/cdtw_py.c
@@ -9,7 +9,7 @@ __copyright__ = """
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/cdtw/cdtw_setup.py b/aeneas/cdtw/cdtw_setup.py
index aab0c739..2776237d 100644
--- a/aeneas/cdtw/cdtw_setup.py
+++ b/aeneas/cdtw/cdtw_setup.py
@@ -23,15 +23,15 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
-CMODULE = Extension("cdtw", sources=["cdtw_py.c", "cdtw_func.c", "cint.c"], include_dirs=[get_include()])
+CMODULE = Extension("cdtw", sources=["cdtw_py.c", "cdtw_func.c", "../cint/cint.c"], include_dirs=[get_include()])
setup(
name="cdtw",
- version="1.5.0",
+ version="1.5.1",
description="""
Python C Extension for computing the DTW as fast as your bare metal allows.
""",
diff --git a/aeneas/cdtw/cint.c b/aeneas/cdtw/cint.c
deleted file mode 100644
index 99541bfc..00000000
--- a/aeneas/cdtw/cint.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
-
-Portable fixed-size int definitions for the other Python C extensions.
-
-__author__ = "Alberto Pettarin"
-__copyright__ = """
- Copyright 2012-2013, Alberto Pettarin (www.albertopettarin.it)
- Copyright 2013-2015, ReadBeyond Srl (www.readbeyond.it)
- Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
- """
-__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
-__email__ = "aeneas@readbeyond.it"
-__status__ = "Production"
-
-*/
-
-#include "cint.h"
-
-uint8_t le_u8_to_cpu(const unsigned char *buf) {
- return (uint8_t)buf[0];
-}
-uint8_t be_u8_to_cpu(const unsigned char *buf) {
- return (uint8_t)buf[0];
-}
-uint16_t le_u16_to_cpu(const unsigned char *buf) {
- return ((uint16_t)buf[0]) | (((uint16_t)buf[1]) << 8);
-}
-uint16_t be_u16_to_cpu(const unsigned char *buf) {
- return ((uint16_t)buf[1]) | (((uint16_t)buf[0]) << 8);
-}
-uint32_t le_u32_to_cpu(const unsigned char *buf) {
- return ((uint32_t)buf[0]) | (((uint32_t)buf[1]) << 8) | (((uint32_t)buf[2]) << 16) | (((uint32_t)buf[3]) << 24);
-}
-uint32_t be_u32_to_cpu(const unsigned char *buf) {
- return ((uint32_t)buf[3]) | (((uint32_t)buf[2]) << 8) | (((uint32_t)buf[1]) << 16) | (((uint32_t)buf[0]) << 24);
-}
-
-int8_t le_s8_to_cpu(const unsigned char *buf) {
- return (uint8_t)buf[0];
-}
-int8_t be_s8_to_cpu(const unsigned char *buf) {
- return (uint8_t)buf[0];
-}
-int16_t le_s16_to_cpu(const unsigned char *buf) {
- return ((uint16_t)buf[0]) | (((uint16_t)buf[1]) << 8);
-}
-int16_t be_s16_to_cpu(const unsigned char *buf) {
- return ((uint16_t)buf[1]) | (((uint16_t)buf[0]) << 8);
-}
-int32_t le_s32_to_cpu(const unsigned char *buf) {
- return ((uint32_t)buf[0]) | (((uint32_t)buf[1]) << 8) | (((uint32_t)buf[2]) << 16) | (((uint32_t)buf[3]) << 24);
-}
-int32_t be_s32_to_cpu(const unsigned char *buf) {
- return ((uint32_t)buf[3]) | (((uint32_t)buf[2]) << 8) | (((uint32_t)buf[1]) << 16) | (((uint32_t)buf[0]) << 24);
-}
-
-void cpu_to_le_u8(unsigned char *buf, uint8_t val) {
- buf[0] = (val & 0xFF);
-}
-void cpu_to_be_u8(uint8_t *buf, uint8_t val) {
- buf[0] = (val & 0xFF);
-}
-void cpu_to_le_u16(unsigned char *buf, uint16_t val) {
- buf[0] = (val & 0x00FF);
- buf[1] = (val & 0xFF00) >> 8;
-}
-void cpu_to_be_u16(uint8_t *buf, uint16_t val) {
- buf[0] = (val & 0xFF00) >> 8;
- buf[1] = (val & 0x00FF);
-}
-void cpu_to_le_u32(unsigned char *buf, uint32_t val) {
- buf[0] = (val & 0x000000FF);
- buf[1] = (val & 0x0000FF00) >> 8;
- buf[2] = (val & 0x00FF0000) >> 16;
- buf[3] = (val & 0xFF000000) >> 24;
-}
-void cpu_to_be_u32(uint8_t *buf, uint32_t val) {
- buf[0] = (val & 0xFF000000) >> 24;
- buf[1] = (val & 0x00FF0000) >> 16;
- buf[2] = (val & 0x0000FF00) >> 8;
- buf[3] = (val & 0x000000FF);
-}
-
-void cpu_to_le_s8(unsigned char *buf, int8_t val) {
- buf[0] = (val & 0xFF);
-}
-void cpu_to_be_s8(uint8_t *buf, int8_t val) {
- buf[0] = (val & 0xFF);
-}
-void cpu_to_le_s16(unsigned char *buf, int16_t val) {
- buf[0] = (val & 0x00FF);
- buf[1] = (val & 0xFF00) >> 8;
-}
-void cpu_to_be_s16(uint8_t *buf, int16_t val) {
- buf[0] = (val & 0xFF00) >> 8;
- buf[1] = (val & 0x00FF);
-}
-void cpu_to_le_s32(unsigned char *buf, int32_t val) {
- buf[0] = (val & 0x000000FF);
- buf[1] = (val & 0x0000FF00) >> 8;
- buf[2] = (val & 0x00FF0000) >> 16;
- buf[3] = (val & 0xFF000000) >> 24;
-}
-void cpu_to_be_s32(uint8_t *buf, int32_t val) {
- buf[0] = (val & 0xFF000000) >> 24;
- buf[1] = (val & 0x00FF0000) >> 16;
- buf[2] = (val & 0x0000FF00) >> 8;
- buf[3] = (val & 0x000000FF);
-}
-
diff --git a/aeneas/cdtw/cint.h b/aeneas/cdtw/cint.h
deleted file mode 100644
index a8abed0e..00000000
--- a/aeneas/cdtw/cint.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-
-Portable fixed-size int definitions for the other Python C extensions.
-
-__author__ = "Alberto Pettarin"
-__copyright__ = """
- Copyright 2012-2013, Alberto Pettarin (www.albertopettarin.it)
- Copyright 2013-2015, ReadBeyond Srl (www.readbeyond.it)
- Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
- """
-__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
-__email__ = "aeneas@readbeyond.it"
-__status__ = "Production"
-
-*/
-
-#ifdef _MSC_VER
-typedef __int8 int8_t;
-typedef __int16 int16_t;
-typedef __int32 int32_t;
-typedef __int64 int64_t;
-typedef unsigned __int8 uint8_t;
-typedef unsigned __int16 uint16_t;
-typedef unsigned __int32 uint32_t;
-typedef unsigned __int64 uint64_t;
-#else
-#include
-#endif
-
-uint8_t le_u8_to_cpu(const unsigned char *buf);
-uint8_t be_u8_to_cpu(const unsigned char *buf);
-uint16_t le_u16_to_cpu(const unsigned char *buf);
-uint16_t be_u16_to_cpu(const unsigned char *buf);
-uint32_t le_u32_to_cpu(const unsigned char *buf);
-uint32_t be_u32_to_cpu(const unsigned char *buf);
-
-int8_t le_s8_to_cpu(const unsigned char *buf);
-int8_t be_s8_to_cpu(const unsigned char *buf);
-int16_t le_s16_to_cpu(const unsigned char *buf);
-int16_t be_s16_to_cpu(const unsigned char *buf);
-int32_t le_s32_to_cpu(const unsigned char *buf);
-int32_t be_s32_to_cpu(const unsigned char *buf);
-
-void cpu_to_le_u8(unsigned char *buf, uint8_t val);
-void cpu_to_be_u8(unsigned char *buf, uint8_t val);
-void cpu_to_le_u16(unsigned char *buf, uint16_t val);
-void cpu_to_be_u16(unsigned char *buf, uint16_t val);
-void cpu_to_le_u32(unsigned char *buf, uint32_t val);
-void cpu_to_be_u32(unsigned char *buf, uint32_t val);
-
-void cpu_to_le_s8(unsigned char *buf, int8_t val);
-void cpu_to_be_s8(unsigned char *buf, int8_t val);
-void cpu_to_le_s16(unsigned char *buf, int16_t val);
-void cpu_to_be_s16(unsigned char *buf, int16_t val);
-void cpu_to_le_s32(unsigned char *buf, int32_t val);
-void cpu_to_be_s32(unsigned char *buf, int32_t val);
-
diff --git a/aeneas/cew/900_clean.sh b/aeneas/cew/900_clean.sh
new file mode 100644
index 00000000..eb542a9f
--- /dev/null
+++ b/aeneas/cew/900_clean.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+rm -rf build __pycache__ *.so cew_driver
diff --git a/aeneas/cew/__init__.py b/aeneas/cew/__init__.py
index eea4eea4..c3f09e40 100644
--- a/aeneas/cew/__init__.py
+++ b/aeneas/cew/__init__.py
@@ -61,7 +61,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL 3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/cew/cew_driver.c b/aeneas/cew/cew_driver.c
index 65354bc9..09c59527 100644
--- a/aeneas/cew/cew_driver.c
+++ b/aeneas/cew/cew_driver.c
@@ -9,7 +9,7 @@ __copyright__ = """
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/cew/cew_func.c b/aeneas/cew/cew_func.c
index 2cfee22b..313983f7 100644
--- a/aeneas/cew/cew_func.c
+++ b/aeneas/cew/cew_func.c
@@ -9,7 +9,7 @@ __copyright__ = """
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/cew/cew_func.h b/aeneas/cew/cew_func.h
index 7010d19c..f8129042 100644
--- a/aeneas/cew/cew_func.h
+++ b/aeneas/cew/cew_func.h
@@ -9,7 +9,7 @@ __copyright__ = """
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/cew/cew_py.c b/aeneas/cew/cew_py.c
index 77661b60..022f5ff5 100644
--- a/aeneas/cew/cew_py.c
+++ b/aeneas/cew/cew_py.c
@@ -9,7 +9,7 @@ __copyright__ = """
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/cew/cew_setup.py b/aeneas/cew/cew_setup.py
index 41de70a1..ec97c6e0 100644
--- a/aeneas/cew/cew_setup.py
+++ b/aeneas/cew/cew_setup.py
@@ -21,7 +21,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
@@ -29,7 +29,7 @@
setup(
name="cew",
- version="1.5.0",
+ version="1.5.1",
description="""
Python C Extension for synthesizing text with eSpeak.
""",
diff --git a/aeneas/cewsubprocess.py b/aeneas/cewsubprocess.py
index 1b69db80..c4e0b820 100644
--- a/aeneas/cewsubprocess.py
+++ b/aeneas/cewsubprocess.py
@@ -39,7 +39,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/cint/__init__.py b/aeneas/cint/__init__.py
index 7087cd97..98c99b97 100644
--- a/aeneas/cint/__init__.py
+++ b/aeneas/cint/__init__.py
@@ -14,7 +14,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL 3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/cint/cint.c b/aeneas/cint/cint.c
index 99541bfc..59c42993 100644
--- a/aeneas/cint/cint.c
+++ b/aeneas/cint/cint.c
@@ -9,7 +9,7 @@ __copyright__ = """
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/cint/cint.h b/aeneas/cint/cint.h
index a8abed0e..dbffc375 100644
--- a/aeneas/cint/cint.h
+++ b/aeneas/cint/cint.h
@@ -9,7 +9,7 @@ __copyright__ = """
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/cmfcc/000_compile_driver.sh b/aeneas/cmfcc/000_compile_driver.sh
index 63fc926d..e7d13731 100644
--- a/aeneas/cmfcc/000_compile_driver.sh
+++ b/aeneas/cmfcc/000_compile_driver.sh
@@ -1,8 +1,8 @@
#!/bin/bash
-gcc cmfcc_driver.c cmfcc_func.c cwave_func.c cint.c -o cmfcc_driver_wo_fo -Wall -pedantic -std=c99 -lm
-gcc cmfcc_driver.c cmfcc_func.c cwave_func.c cint.c -o cmfcc_driver_wo_ff -Wall -pedantic -std=c99 -lm -lrfftw -lfftw -DUSE_FFTW
-gcc cmfcc_driver.c cmfcc_func.c cwave_func.c cint.c -o cmfcc_driver_ws_fo -Wall -pedantic -std=c99 -lm -lsndfile -DUSE_SNDFILE
-gcc cmfcc_driver.c cmfcc_func.c cwave_func.c cint.c -o cmfcc_driver_ws_ff -Wall -pedantic -std=c99 -lm -lsndfile -lrfftw -lfftw -DUSE_SNDFILE -DUSE_FFTW
+gcc cmfcc_driver.c cmfcc_func.c ../cwave/cwave_func.c ../cint/cint.c -o cmfcc_driver_wo_fo -Wall -pedantic -std=c99 -lm
+gcc cmfcc_driver.c cmfcc_func.c ../cwave/cwave_func.c ../cint/cint.c -o cmfcc_driver_wo_ff -Wall -pedantic -std=c99 -lm -lrfftw -lfftw -DUSE_FFTW
+gcc cmfcc_driver.c cmfcc_func.c ../cwave/cwave_func.c ../cint/cint.c -o cmfcc_driver_ws_fo -Wall -pedantic -std=c99 -lm -lsndfile -DUSE_SNDFILE
+gcc cmfcc_driver.c cmfcc_func.c ../cwave/cwave_func.c ../cint/cint.c -o cmfcc_driver_ws_ff -Wall -pedantic -std=c99 -lm -lsndfile -lrfftw -lfftw -DUSE_SNDFILE -DUSE_FFTW
diff --git a/aeneas/cmfcc/900_clean.sh b/aeneas/cmfcc/900_clean.sh
new file mode 100644
index 00000000..2cf53d20
--- /dev/null
+++ b/aeneas/cmfcc/900_clean.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+rm -rf build __pycache__ *.so cmfcc_driver_wo_ff cmfcc_driver_wo_fo cmfcc_driver_ws_ff cmfcc_driver_ws_fo
diff --git a/aeneas/cmfcc/__init__.py b/aeneas/cmfcc/__init__.py
index 16ea6cb7..b5f66845 100644
--- a/aeneas/cmfcc/__init__.py
+++ b/aeneas/cmfcc/__init__.py
@@ -58,7 +58,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL 3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/cmfcc/cint.c b/aeneas/cmfcc/cint.c
deleted file mode 100644
index 99541bfc..00000000
--- a/aeneas/cmfcc/cint.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
-
-Portable fixed-size int definitions for the other Python C extensions.
-
-__author__ = "Alberto Pettarin"
-__copyright__ = """
- Copyright 2012-2013, Alberto Pettarin (www.albertopettarin.it)
- Copyright 2013-2015, ReadBeyond Srl (www.readbeyond.it)
- Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
- """
-__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
-__email__ = "aeneas@readbeyond.it"
-__status__ = "Production"
-
-*/
-
-#include "cint.h"
-
-uint8_t le_u8_to_cpu(const unsigned char *buf) {
- return (uint8_t)buf[0];
-}
-uint8_t be_u8_to_cpu(const unsigned char *buf) {
- return (uint8_t)buf[0];
-}
-uint16_t le_u16_to_cpu(const unsigned char *buf) {
- return ((uint16_t)buf[0]) | (((uint16_t)buf[1]) << 8);
-}
-uint16_t be_u16_to_cpu(const unsigned char *buf) {
- return ((uint16_t)buf[1]) | (((uint16_t)buf[0]) << 8);
-}
-uint32_t le_u32_to_cpu(const unsigned char *buf) {
- return ((uint32_t)buf[0]) | (((uint32_t)buf[1]) << 8) | (((uint32_t)buf[2]) << 16) | (((uint32_t)buf[3]) << 24);
-}
-uint32_t be_u32_to_cpu(const unsigned char *buf) {
- return ((uint32_t)buf[3]) | (((uint32_t)buf[2]) << 8) | (((uint32_t)buf[1]) << 16) | (((uint32_t)buf[0]) << 24);
-}
-
-int8_t le_s8_to_cpu(const unsigned char *buf) {
- return (uint8_t)buf[0];
-}
-int8_t be_s8_to_cpu(const unsigned char *buf) {
- return (uint8_t)buf[0];
-}
-int16_t le_s16_to_cpu(const unsigned char *buf) {
- return ((uint16_t)buf[0]) | (((uint16_t)buf[1]) << 8);
-}
-int16_t be_s16_to_cpu(const unsigned char *buf) {
- return ((uint16_t)buf[1]) | (((uint16_t)buf[0]) << 8);
-}
-int32_t le_s32_to_cpu(const unsigned char *buf) {
- return ((uint32_t)buf[0]) | (((uint32_t)buf[1]) << 8) | (((uint32_t)buf[2]) << 16) | (((uint32_t)buf[3]) << 24);
-}
-int32_t be_s32_to_cpu(const unsigned char *buf) {
- return ((uint32_t)buf[3]) | (((uint32_t)buf[2]) << 8) | (((uint32_t)buf[1]) << 16) | (((uint32_t)buf[0]) << 24);
-}
-
-void cpu_to_le_u8(unsigned char *buf, uint8_t val) {
- buf[0] = (val & 0xFF);
-}
-void cpu_to_be_u8(uint8_t *buf, uint8_t val) {
- buf[0] = (val & 0xFF);
-}
-void cpu_to_le_u16(unsigned char *buf, uint16_t val) {
- buf[0] = (val & 0x00FF);
- buf[1] = (val & 0xFF00) >> 8;
-}
-void cpu_to_be_u16(uint8_t *buf, uint16_t val) {
- buf[0] = (val & 0xFF00) >> 8;
- buf[1] = (val & 0x00FF);
-}
-void cpu_to_le_u32(unsigned char *buf, uint32_t val) {
- buf[0] = (val & 0x000000FF);
- buf[1] = (val & 0x0000FF00) >> 8;
- buf[2] = (val & 0x00FF0000) >> 16;
- buf[3] = (val & 0xFF000000) >> 24;
-}
-void cpu_to_be_u32(uint8_t *buf, uint32_t val) {
- buf[0] = (val & 0xFF000000) >> 24;
- buf[1] = (val & 0x00FF0000) >> 16;
- buf[2] = (val & 0x0000FF00) >> 8;
- buf[3] = (val & 0x000000FF);
-}
-
-void cpu_to_le_s8(unsigned char *buf, int8_t val) {
- buf[0] = (val & 0xFF);
-}
-void cpu_to_be_s8(uint8_t *buf, int8_t val) {
- buf[0] = (val & 0xFF);
-}
-void cpu_to_le_s16(unsigned char *buf, int16_t val) {
- buf[0] = (val & 0x00FF);
- buf[1] = (val & 0xFF00) >> 8;
-}
-void cpu_to_be_s16(uint8_t *buf, int16_t val) {
- buf[0] = (val & 0xFF00) >> 8;
- buf[1] = (val & 0x00FF);
-}
-void cpu_to_le_s32(unsigned char *buf, int32_t val) {
- buf[0] = (val & 0x000000FF);
- buf[1] = (val & 0x0000FF00) >> 8;
- buf[2] = (val & 0x00FF0000) >> 16;
- buf[3] = (val & 0xFF000000) >> 24;
-}
-void cpu_to_be_s32(uint8_t *buf, int32_t val) {
- buf[0] = (val & 0xFF000000) >> 24;
- buf[1] = (val & 0x00FF0000) >> 16;
- buf[2] = (val & 0x0000FF00) >> 8;
- buf[3] = (val & 0x000000FF);
-}
-
diff --git a/aeneas/cmfcc/cint.h b/aeneas/cmfcc/cint.h
deleted file mode 100644
index a8abed0e..00000000
--- a/aeneas/cmfcc/cint.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-
-Portable fixed-size int definitions for the other Python C extensions.
-
-__author__ = "Alberto Pettarin"
-__copyright__ = """
- Copyright 2012-2013, Alberto Pettarin (www.albertopettarin.it)
- Copyright 2013-2015, ReadBeyond Srl (www.readbeyond.it)
- Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
- """
-__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
-__email__ = "aeneas@readbeyond.it"
-__status__ = "Production"
-
-*/
-
-#ifdef _MSC_VER
-typedef __int8 int8_t;
-typedef __int16 int16_t;
-typedef __int32 int32_t;
-typedef __int64 int64_t;
-typedef unsigned __int8 uint8_t;
-typedef unsigned __int16 uint16_t;
-typedef unsigned __int32 uint32_t;
-typedef unsigned __int64 uint64_t;
-#else
-#include
-#endif
-
-uint8_t le_u8_to_cpu(const unsigned char *buf);
-uint8_t be_u8_to_cpu(const unsigned char *buf);
-uint16_t le_u16_to_cpu(const unsigned char *buf);
-uint16_t be_u16_to_cpu(const unsigned char *buf);
-uint32_t le_u32_to_cpu(const unsigned char *buf);
-uint32_t be_u32_to_cpu(const unsigned char *buf);
-
-int8_t le_s8_to_cpu(const unsigned char *buf);
-int8_t be_s8_to_cpu(const unsigned char *buf);
-int16_t le_s16_to_cpu(const unsigned char *buf);
-int16_t be_s16_to_cpu(const unsigned char *buf);
-int32_t le_s32_to_cpu(const unsigned char *buf);
-int32_t be_s32_to_cpu(const unsigned char *buf);
-
-void cpu_to_le_u8(unsigned char *buf, uint8_t val);
-void cpu_to_be_u8(unsigned char *buf, uint8_t val);
-void cpu_to_le_u16(unsigned char *buf, uint16_t val);
-void cpu_to_be_u16(unsigned char *buf, uint16_t val);
-void cpu_to_le_u32(unsigned char *buf, uint32_t val);
-void cpu_to_be_u32(unsigned char *buf, uint32_t val);
-
-void cpu_to_le_s8(unsigned char *buf, int8_t val);
-void cpu_to_be_s8(unsigned char *buf, int8_t val);
-void cpu_to_le_s16(unsigned char *buf, int16_t val);
-void cpu_to_be_s16(unsigned char *buf, int16_t val);
-void cpu_to_le_s32(unsigned char *buf, int32_t val);
-void cpu_to_be_s32(unsigned char *buf, int32_t val);
-
diff --git a/aeneas/cmfcc/cmfcc_driver.c b/aeneas/cmfcc/cmfcc_driver.c
index cd87a2f5..62d1fb41 100644
--- a/aeneas/cmfcc/cmfcc_driver.c
+++ b/aeneas/cmfcc/cmfcc_driver.c
@@ -9,7 +9,7 @@ __copyright__ = """
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
@@ -23,7 +23,7 @@ __status__ = "Production"
#if USE_SNDFILE
#include
#else
-#include "cwave_func.h"
+#include "../cwave/cwave_func.h"
#endif
#define DRIVER_SUCCESS 0
diff --git a/aeneas/cmfcc/cmfcc_func.c b/aeneas/cmfcc/cmfcc_func.c
index 7a9c1b7f..2b2ce321 100644
--- a/aeneas/cmfcc/cmfcc_func.c
+++ b/aeneas/cmfcc/cmfcc_func.c
@@ -9,7 +9,7 @@ __copyright__ = """
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
@@ -27,7 +27,7 @@ __status__ = "Production"
#include
#include "cmfcc_func.h"
-#include "cwave_func.h"
+#include "../cwave/cwave_func.h"
#ifdef USE_FFTW
#include
diff --git a/aeneas/cmfcc/cmfcc_func.h b/aeneas/cmfcc/cmfcc_func.h
index e6aa89b2..aa308a8f 100644
--- a/aeneas/cmfcc/cmfcc_func.h
+++ b/aeneas/cmfcc/cmfcc_func.h
@@ -9,13 +9,13 @@ __copyright__ = """
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
*/
-#include "cint.h"
+#include "../cint/cint.h"
#define CMFCC_SUCCESS 0
#define CMFCC_FAILURE 1
diff --git a/aeneas/cmfcc/cmfcc_py.c b/aeneas/cmfcc/cmfcc_py.c
index b65df710..67b910a5 100644
--- a/aeneas/cmfcc/cmfcc_py.c
+++ b/aeneas/cmfcc/cmfcc_py.c
@@ -9,7 +9,7 @@ __copyright__ = """
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/cmfcc/cmfcc_setup.py b/aeneas/cmfcc/cmfcc_setup.py
index dbc1fa1e..f73b352a 100644
--- a/aeneas/cmfcc/cmfcc_setup.py
+++ b/aeneas/cmfcc/cmfcc_setup.py
@@ -23,15 +23,15 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
-CMODULE = Extension("cmfcc", sources=["cmfcc_py.c", "cmfcc_func.c", "cwave_func.c", "cint.c"], include_dirs=[get_include()])
+CMODULE = Extension("cmfcc", sources=["cmfcc_py.c", "cmfcc_func.c", "../cwave/cwave_func.c", "../cint/cint.c"], include_dirs=[get_include()])
setup(
name="cmfcc",
- version="1.5.0",
+ version="1.5.1",
description="""
Python C Extension for computing the MFCCs as fast as your bare metal allows.
""",
diff --git a/aeneas/cmfcc/cwave_func.c b/aeneas/cmfcc/cwave_func.c
deleted file mode 100644
index 5e717e99..00000000
--- a/aeneas/cmfcc/cwave_func.c
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
-
-Python C Extension for reading WAVE mono files.
-
-__author__ = "Alberto Pettarin"
-__copyright__ = """
- Copyright 2012-2013, Alberto Pettarin (www.albertopettarin.it)
- Copyright 2013-2015, ReadBeyond Srl (www.readbeyond.it)
- Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
- """
-__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
-__email__ = "aeneas@readbeyond.it"
-__status__ = "Production"
-
-*/
-
-#include
-#include
-#include
-
-#include "cwave_func.h"
-
-static const int CWAVE_BUFFER_SIZE = 4096;
-
-// convert a little-endian buffer to signed double
-static double _le_to_double(unsigned char *buffer, const uint32_t length) {
- if (length == 1) {
- return ((double)le_s8_to_cpu(buffer)) / 128;
- }
- if (length == 2) {
- return ((double)le_s16_to_cpu(buffer)) / 32768;
- }
- if (length == 4) {
- return ((double)le_s32_to_cpu(buffer)) / 2147483648;
- }
- return 0.0;
-}
-
-// read a little-endian u16 field
-static int _read_le_u16_field(FILE *ptr, uint16_t *dest) {
- unsigned char buffer[2];
-
- if (fread(buffer, 2, 1, ptr) != 1) {
- return CWAVE_FAILURE;
- }
- *dest = le_u16_to_cpu(buffer);
- return CWAVE_SUCCESS;
-}
-
-// read a little-endian u32 field
-static int _read_le_u32_field(FILE *ptr, uint32_t *dest) {
- unsigned char buffer[4];
-
- if (fread(buffer, 4, 1, ptr) != 1) {
- return CWAVE_FAILURE;
- }
- *dest = le_u32_to_cpu(buffer);
- return CWAVE_SUCCESS;
-}
-
-// read a big-endian field
-static int _read_be_field(FILE *ptr, char *dest, const int length) {
- if (fread(dest, length, 1, ptr) != 1) {
- return CWAVE_FAILURE;
- }
- return CWAVE_SUCCESS;
-}
-
-// find the "match" chunk, and store its size in "size"
-static int _seek_to_chunk(FILE *ptr, struct WAVE_INFO *header, const char *match, uint32_t *size) {
- char buffer4[4];
- uint32_t chunk_size;
- const uint32_t max_pos = (*header).leChunkSize + 8; // max pos in file
-
- rewind(ptr);
- chunk_size = 12; // skip first 12 bytes
- while((ftell(ptr) >= 0) && (ftell(ptr) + chunk_size + 8 < max_pos)) {
- // seek to the next chunk
- if (fseek(ptr, chunk_size, SEEK_CUR) != 0) {
- return CWAVE_FAILURE;
- }
- // read the chunk description
- if (_read_be_field(ptr, buffer4, 4) != CWAVE_SUCCESS) {
- return CWAVE_FAILURE;
- }
- // read the chunk size
- if (_read_le_u32_field(ptr, &chunk_size) != CWAVE_SUCCESS) {
- return CWAVE_FAILURE;
- }
- // compare the chunk description with the desired string
- if (memcmp(buffer4, match, 4) == 0) {
- *size = chunk_size;
- return CWAVE_SUCCESS;
- }
- }
- return CWAVE_FAILURE;
-}
-
-// open a WAVE mono file and read header info
-// the header is always initialized to zero
-FILE *wave_open(const char *path, struct WAVE_INFO *header) {
- FILE *ptr;
- char buffer4[4];
- struct WAVE_INFO h;
-
- // initialize header
- memset(header, 0, sizeof(*header));
-
- // open file
- if (path == NULL) {
- //printf("Error: path is NULL\n");
- return NULL;
- }
- ptr = fopen(path, "rb");
- if (ptr == NULL) {
- //printf("Error: unable to open input file %s\n", path);
- return NULL;
- }
-
- // read first 12 bytes: RIFF header.leChunkSize WAVE
- rewind(ptr);
- if (_read_be_field(ptr, buffer4, 4) != CWAVE_SUCCESS) {
- //printf("Error: cannot read beChunkID\n");
- return NULL;
- }
- if (memcmp(buffer4, "RIFF", 4) != 0) {
- //printf("Error: beChunkID is not RIFF\n");
- return NULL;
- }
-
- if (_read_le_u32_field(ptr, &h.leChunkSize) != CWAVE_SUCCESS) {
- //printf("Error: cannot read leChunkSize\n");
- return NULL;
- }
-
- if (_read_be_field(ptr, buffer4, 4) != CWAVE_SUCCESS) {
- //printf("Error: cannot read beFormat\n");
- return NULL;
- }
- if (memcmp(buffer4, "WAVE", 4) != 0) {
- //printf("Error: beFormat is not WAVE\n");
- return NULL;
- }
-
- // locate the fmt chunk
- if (_seek_to_chunk(ptr, &h, "fmt ", &h.leSubchunkFmtSize) != CWAVE_SUCCESS) {
- //printf("Error: cannot locate fmt chunk\n");
- return NULL;
- }
- if (h.leSubchunkFmtSize < 16) {
- //printf("Error: fmt chunk has length < 16\n");
- return NULL;
- }
-
- // read fields
- if (_read_le_u16_field(ptr, &h.leAudioFormat) != CWAVE_SUCCESS) {
- //printf("Error: cannot read leAudioFormat\n");
- return NULL;
- }
- // NOTE we fail here because we are only interested in PCM files!
- if (h.leAudioFormat != WAVE_FORMAT_PCM) {
- //printf("Error: leAudioFormat is not PCM\n");
- return NULL;
- }
- if (_read_le_u16_field(ptr, &h.leNumChannels) != CWAVE_SUCCESS) {
- //printf("Error: cannot read leNumChannels\n");
- return NULL;
- }
- // NOTE we fail here because we are only interested in mono files!
- if (h.leNumChannels != WAVE_CHANNELS_MONO) {
- //printf("Error: leNumChannels is not 1\n");
- return NULL;
- }
- if (_read_le_u32_field(ptr, &h.leSampleRate) != CWAVE_SUCCESS) {
- //printf("Error: cannot read leSampleRate\n");
- return NULL;
- }
- if (_read_le_u32_field(ptr, &h.leByteRate) != CWAVE_SUCCESS) {
- //printf("Error: cannot read leByteRate\n");
- return NULL;
- }
- if (_read_le_u16_field(ptr, &h.leBlockAlign) != CWAVE_SUCCESS) {
- //printf("Error: cannot read leBlockAlign\n");
- return NULL;
- }
- if (_read_le_u16_field(ptr, &h.leBitsPerSample) != CWAVE_SUCCESS) {
- //printf("Error: cannot read leBitsPerSample\n");
- return NULL;
- }
-
- // locate the data chunk
- if (_seek_to_chunk(ptr, &h, "data", &h.leSubchunkDataSize) != CWAVE_SUCCESS) {
- //printf("Error: cannot locate data chunk\n");
- return NULL;
- }
- if (h.leSubchunkDataSize == 0) {
- //printf("Error: data chunk has length zero\n");
- return NULL;
- }
- // here ptr is at the beginnig of the data info
- h.coSubchunkDataStart = (uint32_t)ftell(ptr);
- // compute number of samples
- h.coNumSamples = (h.leSubchunkDataSize / (h.leNumChannels * h.leBitsPerSample / 8));
- // compute number of bytes/sample (single channel)
- h.coBytesPerSample = h.leBitsPerSample / 8;
- // max byte position
- h.coMaxDataPosition = h.coSubchunkDataStart + h.leSubchunkDataSize;
-
- // copy h into header and return the pointer to the audio file
- *header = h;
- return ptr;
-}
-
-// close a WAVE mono file previously open
-int wave_close(FILE *ptr) {
- int ret;
-
- ret = fclose(ptr);
- ptr = NULL;
- return ret;
-}
-
-// read samples from an open WAVE mono file
-int wave_read_double(
- FILE *ptr,
- struct WAVE_INFO *header,
- double *dest,
- const uint32_t from_sample,
- const uint32_t number_samples
- ) {
- unsigned char *buffer;
- uint32_t target_pos;
- const uint32_t bytes_per_sample = (*header).coBytesPerSample;
- uint32_t i, j, read, remaining;
-
- if (from_sample + number_samples > (*header).coNumSamples) {
- //printf("Error: attempted reading outside data\n");
- return CWAVE_FAILURE;
- }
-
- target_pos = (*header).coSubchunkDataStart + bytes_per_sample * from_sample;
- if (ftell(ptr) != target_pos) {
- fseek(ptr, target_pos, SEEK_SET);
- }
-
- buffer = (unsigned char *)calloc(CWAVE_BUFFER_SIZE, bytes_per_sample);
- remaining = number_samples;
- j = 0;
- while (remaining > 0) {
- if (remaining >= CWAVE_BUFFER_SIZE) {
- read = fread(buffer, bytes_per_sample, CWAVE_BUFFER_SIZE, ptr);
- } else {
- read = fread(buffer, bytes_per_sample, remaining, ptr);
- }
- for (i = 0; i < read; ++i) {
- dest[j++] = _le_to_double(buffer + i * bytes_per_sample, bytes_per_sample);
- }
- remaining -= read;
- }
- free((void *)buffer);
- buffer = NULL;
-
- return CWAVE_SUCCESS;
-}
-
-
-
diff --git a/aeneas/cmfcc/cwave_func.h b/aeneas/cmfcc/cwave_func.h
deleted file mode 100644
index ae429924..00000000
--- a/aeneas/cmfcc/cwave_func.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
-
-Python C Extension for reading WAVE mono files.
-
-__author__ = "Alberto Pettarin"
-__copyright__ = """
- Copyright 2012-2013, Alberto Pettarin (www.albertopettarin.it)
- Copyright 2013-2015, ReadBeyond Srl (www.readbeyond.it)
- Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
- """
-__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
-__email__ = "aeneas@readbeyond.it"
-__status__ = "Production"
-
-*/
-
-#include "cint.h"
-
-#define CWAVE_SUCCESS 0
-#define CWAVE_FAILURE 1
-
-enum {
- WAVE_FORMAT_PCM = 0x0001, // PCM
- WAVE_FORMAT_IEEE_FLOAT = 0x0003, // IEEE float
- WAVE_FORMAT_ALAW = 0x0006, // 8-bit ITU-T G.711 A-law
- WAVE_FORMAT_MULAW = 0x0007, // 8-bit ITU-T G.711 mu-law
- WAVE_FORMAT_EXTENSIBLE = 0xFFFE, // extensible format
-
- WAVE_CHANNELS_MONO = 0x0001, // mono
- WAVE_CHANNELS_STERO = 0x0002 // stereo
-};
-
-struct WAVE_INFO {
- // be = big endian in file => converted into cpu endianness
- // le = little endian in file => converted into cpu endianness
- // co = computed, always in cpu endianness
-
- // first 12 bytes
- //uint32_t beChunkID; // string 'RIFF'
- uint32_t leChunkSize; // (size of the whole file in bytes - 8)
- //uint32_t beFormat; // string 'WAVE'
-
- // then, we have at least the SubchunkFmt and SubchunkData
- // in any order, and other kinds of Subchunk can be present as well
- uint32_t leSubchunkFmtSize; // (size of the subchunk 1 in bytes - 4)
- uint16_t leAudioFormat; // one of the WAVE_FORMAT_* values
- uint16_t leNumChannels; // number of channels (1 = mono, 2 = stereo)
- uint32_t leSampleRate; // samples per second (e.g. 48000, 44100, 22050, 16000, 8000)
- uint32_t leByteRate; // leSampleRate * leNumChannels * leBitsPerSample/8 => data bytes/s
- uint16_t leBlockAlign; // leNumChannels * leBitsPerSample/8 => bytes/sample, including all channels
- uint16_t leBitsPerSample; // number of bits per sample (e.g., 8, 16, 32)
- uint32_t leSubchunkDataSize; // leNumSamples * leNumChannels * leBitsPerSample/8 => data bytes
-
- // computed
- uint32_t coNumSamples; // number of samples
- uint32_t coSubchunkDataStart; // byte at which the data chunk starts
- uint32_t coBytesPerSample; // leBitsPerSample / 8 => bytes/sample (single channel)
- uint32_t coMaxDataPosition; // coSubchunkDataStart + leSubchunkDataSize => max byte position of data
-};
-
-// open a WAVE mono file and read header info
-FILE *wave_open(const char *path, struct WAVE_INFO *audio_info);
-
-// close an open WAVE mono file
-int wave_close(FILE *audio_file_ptr);
-
-// read samples from an open WAVE mono file
-int wave_read_double(
- FILE *audio_file_ptr,
- struct WAVE_INFO *audio_info,
- double *dest,
- const uint32_t from_sample,
- const uint32_t number_samples
-);
-
-
-
diff --git a/aeneas/configuration.py b/aeneas/configuration.py
index 9f45193a..f0c9a320 100644
--- a/aeneas/configuration.py
+++ b/aeneas/configuration.py
@@ -24,7 +24,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/container.py b/aeneas/container.py
index c4aaeba2..ee589432 100644
--- a/aeneas/container.py
+++ b/aeneas/container.py
@@ -31,7 +31,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
@@ -363,19 +363,21 @@ def _set_actual_container(self):
# set the actual container
self.log(u"Setting actual container...")
- # TODO map this
- if self.container_format == ContainerFormat.ZIP:
- self.actual_container = _ContainerZIP(self.file_path, rconf=self.rconf, logger=self.logger)
- elif self.container_format == ContainerFormat.EPUB:
- self.actual_container = _ContainerZIP(self.file_path, rconf=self.rconf, logger=self.logger)
- elif self.container_format == ContainerFormat.TAR:
- self.actual_container = _ContainerTAR(self.file_path, "", rconf=self.rconf, logger=self.logger)
- elif self.container_format == ContainerFormat.TAR_GZ:
- self.actual_container = _ContainerTAR(self.file_path, ":gz", rconf=self.rconf, logger=self.logger)
- elif self.container_format == ContainerFormat.TAR_BZ2:
- self.actual_container = _ContainerTAR(self.file_path, ":bz2", rconf=self.rconf, logger=self.logger)
- elif self.container_format == ContainerFormat.UNPACKED:
- self.actual_container = _ContainerUnpacked(self.file_path, rconf=self.rconf, logger=self.logger)
+ class_map = {
+ ContainerFormat.ZIP: (_ContainerZIP, None),
+ ContainerFormat.EPUB: (_ContainerZIP, None),
+ ContainerFormat.TAR: (_ContainerTAR, ""),
+ ContainerFormat.TAR_GZ: (_ContainerTAR, ":gz"),
+ ContainerFormat.TAR_BZ2: (_ContainerTAR, ":bz2"),
+ ContainerFormat.UNPACKED: (_ContainerUnpacked, None)
+ }
+ actual_class, variant = class_map[self.container_format]
+ self.actual_container = actual_class(
+ file_path=self.file_path,
+ variant=variant,
+ rconf=self.rconf,
+ logger=self.logger
+ )
self.log([u"Actual container format: '%s'", self.container_format])
self.log(u"Setting actual container... done")
@@ -445,7 +447,7 @@ class _ContainerZIP(Loggable):
TAG = u"ContainerZIP"
- def __init__(self, file_path, rconf=None, logger=None):
+ def __init__(self, file_path, variant=None, rconf=None, logger=None):
super(_ContainerZIP, self).__init__(rconf=rconf, logger=logger)
self.file_path = file_path
@@ -497,7 +499,7 @@ class _ContainerUnpacked(Loggable):
TAG = u"ContainerUnpacked"
- def __init__(self, file_path, rconf=None, logger=None):
+ def __init__(self, file_path, variant=None, rconf=None, logger=None):
super(_ContainerUnpacked, self).__init__(rconf=rconf, logger=logger)
self.file_path = file_path
diff --git a/aeneas/cwave/000_compile_driver.sh b/aeneas/cwave/000_compile_driver.sh
index 4b24ca6d..db96d1c5 100644
--- a/aeneas/cwave/000_compile_driver.sh
+++ b/aeneas/cwave/000_compile_driver.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-gcc cwave_driver.c cwave_func.c cint.c -o cwave_driver -Wall -pedantic -std=c99
+gcc cwave_driver.c cwave_func.c ../cint/cint.c -o cwave_driver -Wall -pedantic -std=c99
diff --git a/aeneas/cwave/900_clean.sh b/aeneas/cwave/900_clean.sh
new file mode 100644
index 00000000..e7c7edf8
--- /dev/null
+++ b/aeneas/cwave/900_clean.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+rm -rf build __pycache__ *.so cwave_driver
diff --git a/aeneas/cwave/__init__.py b/aeneas/cwave/__init__.py
index a435100a..2b831697 100644
--- a/aeneas/cwave/__init__.py
+++ b/aeneas/cwave/__init__.py
@@ -37,7 +37,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL 3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/cwave/cint.c b/aeneas/cwave/cint.c
deleted file mode 100644
index 99541bfc..00000000
--- a/aeneas/cwave/cint.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
-
-Portable fixed-size int definitions for the other Python C extensions.
-
-__author__ = "Alberto Pettarin"
-__copyright__ = """
- Copyright 2012-2013, Alberto Pettarin (www.albertopettarin.it)
- Copyright 2013-2015, ReadBeyond Srl (www.readbeyond.it)
- Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
- """
-__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
-__email__ = "aeneas@readbeyond.it"
-__status__ = "Production"
-
-*/
-
-#include "cint.h"
-
-uint8_t le_u8_to_cpu(const unsigned char *buf) {
- return (uint8_t)buf[0];
-}
-uint8_t be_u8_to_cpu(const unsigned char *buf) {
- return (uint8_t)buf[0];
-}
-uint16_t le_u16_to_cpu(const unsigned char *buf) {
- return ((uint16_t)buf[0]) | (((uint16_t)buf[1]) << 8);
-}
-uint16_t be_u16_to_cpu(const unsigned char *buf) {
- return ((uint16_t)buf[1]) | (((uint16_t)buf[0]) << 8);
-}
-uint32_t le_u32_to_cpu(const unsigned char *buf) {
- return ((uint32_t)buf[0]) | (((uint32_t)buf[1]) << 8) | (((uint32_t)buf[2]) << 16) | (((uint32_t)buf[3]) << 24);
-}
-uint32_t be_u32_to_cpu(const unsigned char *buf) {
- return ((uint32_t)buf[3]) | (((uint32_t)buf[2]) << 8) | (((uint32_t)buf[1]) << 16) | (((uint32_t)buf[0]) << 24);
-}
-
-int8_t le_s8_to_cpu(const unsigned char *buf) {
- return (uint8_t)buf[0];
-}
-int8_t be_s8_to_cpu(const unsigned char *buf) {
- return (uint8_t)buf[0];
-}
-int16_t le_s16_to_cpu(const unsigned char *buf) {
- return ((uint16_t)buf[0]) | (((uint16_t)buf[1]) << 8);
-}
-int16_t be_s16_to_cpu(const unsigned char *buf) {
- return ((uint16_t)buf[1]) | (((uint16_t)buf[0]) << 8);
-}
-int32_t le_s32_to_cpu(const unsigned char *buf) {
- return ((uint32_t)buf[0]) | (((uint32_t)buf[1]) << 8) | (((uint32_t)buf[2]) << 16) | (((uint32_t)buf[3]) << 24);
-}
-int32_t be_s32_to_cpu(const unsigned char *buf) {
- return ((uint32_t)buf[3]) | (((uint32_t)buf[2]) << 8) | (((uint32_t)buf[1]) << 16) | (((uint32_t)buf[0]) << 24);
-}
-
-void cpu_to_le_u8(unsigned char *buf, uint8_t val) {
- buf[0] = (val & 0xFF);
-}
-void cpu_to_be_u8(uint8_t *buf, uint8_t val) {
- buf[0] = (val & 0xFF);
-}
-void cpu_to_le_u16(unsigned char *buf, uint16_t val) {
- buf[0] = (val & 0x00FF);
- buf[1] = (val & 0xFF00) >> 8;
-}
-void cpu_to_be_u16(uint8_t *buf, uint16_t val) {
- buf[0] = (val & 0xFF00) >> 8;
- buf[1] = (val & 0x00FF);
-}
-void cpu_to_le_u32(unsigned char *buf, uint32_t val) {
- buf[0] = (val & 0x000000FF);
- buf[1] = (val & 0x0000FF00) >> 8;
- buf[2] = (val & 0x00FF0000) >> 16;
- buf[3] = (val & 0xFF000000) >> 24;
-}
-void cpu_to_be_u32(uint8_t *buf, uint32_t val) {
- buf[0] = (val & 0xFF000000) >> 24;
- buf[1] = (val & 0x00FF0000) >> 16;
- buf[2] = (val & 0x0000FF00) >> 8;
- buf[3] = (val & 0x000000FF);
-}
-
-void cpu_to_le_s8(unsigned char *buf, int8_t val) {
- buf[0] = (val & 0xFF);
-}
-void cpu_to_be_s8(uint8_t *buf, int8_t val) {
- buf[0] = (val & 0xFF);
-}
-void cpu_to_le_s16(unsigned char *buf, int16_t val) {
- buf[0] = (val & 0x00FF);
- buf[1] = (val & 0xFF00) >> 8;
-}
-void cpu_to_be_s16(uint8_t *buf, int16_t val) {
- buf[0] = (val & 0xFF00) >> 8;
- buf[1] = (val & 0x00FF);
-}
-void cpu_to_le_s32(unsigned char *buf, int32_t val) {
- buf[0] = (val & 0x000000FF);
- buf[1] = (val & 0x0000FF00) >> 8;
- buf[2] = (val & 0x00FF0000) >> 16;
- buf[3] = (val & 0xFF000000) >> 24;
-}
-void cpu_to_be_s32(uint8_t *buf, int32_t val) {
- buf[0] = (val & 0xFF000000) >> 24;
- buf[1] = (val & 0x00FF0000) >> 16;
- buf[2] = (val & 0x0000FF00) >> 8;
- buf[3] = (val & 0x000000FF);
-}
-
diff --git a/aeneas/cwave/cint.h b/aeneas/cwave/cint.h
deleted file mode 100644
index a8abed0e..00000000
--- a/aeneas/cwave/cint.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-
-Portable fixed-size int definitions for the other Python C extensions.
-
-__author__ = "Alberto Pettarin"
-__copyright__ = """
- Copyright 2012-2013, Alberto Pettarin (www.albertopettarin.it)
- Copyright 2013-2015, ReadBeyond Srl (www.readbeyond.it)
- Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
- """
-__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
-__email__ = "aeneas@readbeyond.it"
-__status__ = "Production"
-
-*/
-
-#ifdef _MSC_VER
-typedef __int8 int8_t;
-typedef __int16 int16_t;
-typedef __int32 int32_t;
-typedef __int64 int64_t;
-typedef unsigned __int8 uint8_t;
-typedef unsigned __int16 uint16_t;
-typedef unsigned __int32 uint32_t;
-typedef unsigned __int64 uint64_t;
-#else
-#include
-#endif
-
-uint8_t le_u8_to_cpu(const unsigned char *buf);
-uint8_t be_u8_to_cpu(const unsigned char *buf);
-uint16_t le_u16_to_cpu(const unsigned char *buf);
-uint16_t be_u16_to_cpu(const unsigned char *buf);
-uint32_t le_u32_to_cpu(const unsigned char *buf);
-uint32_t be_u32_to_cpu(const unsigned char *buf);
-
-int8_t le_s8_to_cpu(const unsigned char *buf);
-int8_t be_s8_to_cpu(const unsigned char *buf);
-int16_t le_s16_to_cpu(const unsigned char *buf);
-int16_t be_s16_to_cpu(const unsigned char *buf);
-int32_t le_s32_to_cpu(const unsigned char *buf);
-int32_t be_s32_to_cpu(const unsigned char *buf);
-
-void cpu_to_le_u8(unsigned char *buf, uint8_t val);
-void cpu_to_be_u8(unsigned char *buf, uint8_t val);
-void cpu_to_le_u16(unsigned char *buf, uint16_t val);
-void cpu_to_be_u16(unsigned char *buf, uint16_t val);
-void cpu_to_le_u32(unsigned char *buf, uint32_t val);
-void cpu_to_be_u32(unsigned char *buf, uint32_t val);
-
-void cpu_to_le_s8(unsigned char *buf, int8_t val);
-void cpu_to_be_s8(unsigned char *buf, int8_t val);
-void cpu_to_le_s16(unsigned char *buf, int16_t val);
-void cpu_to_be_s16(unsigned char *buf, int16_t val);
-void cpu_to_le_s32(unsigned char *buf, int32_t val);
-void cpu_to_be_s32(unsigned char *buf, int32_t val);
-
diff --git a/aeneas/cwave/cwave_driver.c b/aeneas/cwave/cwave_driver.c
index b1790e9f..1bc8dbce 100644
--- a/aeneas/cwave/cwave_driver.c
+++ b/aeneas/cwave/cwave_driver.c
@@ -9,7 +9,7 @@ __copyright__ = """
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/cwave/cwave_func.c b/aeneas/cwave/cwave_func.c
index 5e717e99..9f4a5003 100644
--- a/aeneas/cwave/cwave_func.c
+++ b/aeneas/cwave/cwave_func.c
@@ -9,7 +9,7 @@ __copyright__ = """
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/cwave/cwave_func.h b/aeneas/cwave/cwave_func.h
index ae429924..9763384a 100644
--- a/aeneas/cwave/cwave_func.h
+++ b/aeneas/cwave/cwave_func.h
@@ -9,13 +9,13 @@ __copyright__ = """
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
*/
-#include "cint.h"
+#include "../cint/cint.h"
#define CWAVE_SUCCESS 0
#define CWAVE_FAILURE 1
diff --git a/aeneas/cwave/cwave_py.c b/aeneas/cwave/cwave_py.c
index 06493adf..4a497598 100644
--- a/aeneas/cwave/cwave_py.c
+++ b/aeneas/cwave/cwave_py.c
@@ -9,7 +9,7 @@ __copyright__ = """
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/cwave/cwave_setup.py b/aeneas/cwave/cwave_setup.py
index 513a23ed..126cb348 100644
--- a/aeneas/cwave/cwave_setup.py
+++ b/aeneas/cwave/cwave_setup.py
@@ -23,15 +23,15 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
-CMODULE = Extension("cwave", sources=["cwave_py.c", "cwave_func.c", "cint.c"], include_dirs=[get_include()])
+CMODULE = Extension("cwave", sources=["cwave_py.c", "cwave_func.c", "../cint/cint.c"], include_dirs=[get_include()])
setup(
name="cwave",
- version="1.5.0",
+ version="1.5.1",
description="""
Python C Extension for for reading WAVE files.
""",
diff --git a/aeneas/diagnostics.py b/aeneas/diagnostics.py
index f2b571b6..9ad99009 100644
--- a/aeneas/diagnostics.py
+++ b/aeneas/diagnostics.py
@@ -27,12 +27,10 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
-SETUP_COMMAND = u"'python setup.py build_ext --inplace'"
-
class Diagnostics(object):
"""
Check whether the setup of ``aeneas`` was successful.
@@ -200,7 +198,7 @@ def check_cdtw(cls):
return False
gf.print_warning(u"aeneas.cdtw NOT COMPILED")
gf.print_info(u" You can still run aeneas but it will be significantly slower")
- gf.print_info(u" To compile the cdtw module, run %s" % SETUP_COMMAND)
+ gf.print_info(u" Please refer to the installation documentation for details")
return True
@classmethod
@@ -217,7 +215,7 @@ def check_cmfcc(cls):
return False
gf.print_warning(u"aeneas.cmfcc NOT COMPILED")
gf.print_info(u" You can still run aeneas but it will be significantly slower")
- gf.print_info(u" To compile the cmfcc module, run %s" % SETUP_COMMAND)
+ gf.print_info(u" Please refer to the installation documentation for details")
return True
@classmethod
@@ -227,22 +225,14 @@ def check_cew(cls):
Return ``True`` on failure and ``False`` on success.
- For those OSes where ``cew`` is not available,
- print a warning and return ``False`` (success).
-
:rtype: bool
"""
- if not gf.is_linux():
- gf.print_warning(u"aeneas.cew NOT AVAILABLE")
- gf.print_info(u" The Python C Extension cew is not available for your OS")
- gf.print_info(u" You can still run aeneas but it will be a bit slower (than Linux)")
- return False
if gf.can_run_c_extension("cew"):
gf.print_success(u"aeneas.cew COMPILED")
return False
gf.print_warning(u"aeneas.cew NOT COMPILED")
gf.print_info(u" You can still run aeneas but it will be a bit slower")
- gf.print_info(u" To compile the cew module, run %s" % SETUP_COMMAND)
+ gf.print_info(u" Please refer to the installation documentation for details")
return True
@classmethod
diff --git a/aeneas/downloader.py b/aeneas/downloader.py
index 3436b46e..2697c809 100644
--- a/aeneas/downloader.py
+++ b/aeneas/downloader.py
@@ -23,7 +23,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/dtw.py b/aeneas/dtw.py
index 134e77e0..7fb0e226 100644
--- a/aeneas/dtw.py
+++ b/aeneas/dtw.py
@@ -48,7 +48,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
@@ -310,7 +310,7 @@ def compute_accumulated_cost_matrix(self):
self._compute_acm_c_extension,
self._compute_acm_pure_python,
(),
- c_extension=True
+ rconf=self.rconf
)
def _compute_acm_c_extension(self):
@@ -355,7 +355,7 @@ def compute_path(self):
self._compute_path_c_extension,
self._compute_path_pure_python,
(),
- c_extension=True
+ rconf=self.rconf
)
def _compute_path_c_extension(self):
@@ -412,7 +412,7 @@ def _compute_cost_matrix(self):
self.log(u"Limiting delta to m")
delta = m
cost_matrix = numpy.zeros((n, delta))
- centers = numpy.zeros(n)
+ centers = numpy.zeros(n, dtype=int)
for i in range(n):
# center j at row i
center_j = (m * i) // n
diff --git a/aeneas/espeakwrapper.py b/aeneas/espeakwrapper.py
index 38c423fa..4fb60226 100644
--- a/aeneas/espeakwrapper.py
+++ b/aeneas/espeakwrapper.py
@@ -23,7 +23,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/executejob.py b/aeneas/executejob.py
index 3590fe70..5d5e1479 100644
--- a/aeneas/executejob.py
+++ b/aeneas/executejob.py
@@ -30,7 +30,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/executetask.py b/aeneas/executetask.py
index c949878d..54a65147 100644
--- a/aeneas/executetask.py
+++ b/aeneas/executetask.py
@@ -41,7 +41,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
@@ -655,7 +655,6 @@ def _check_no_zero(self, min_mws):
""" Check for fragments with zero duration """
if self.task.configuration["o_no_zero"]:
self.log(u"Checking for fragments with zero duration...")
- # TODO use min_mws when doable, e.g. only one fragment?
delta = TimeValue("0.001")
leaves = self.task.sync_map.fragments_tree.vleaves_not_empty
# first and last leaves are HEAD and TAIL, skipping them
diff --git a/aeneas/extra/__init__.py b/aeneas/extra/__init__.py
index 8b698ed4..bfac6fb1 100644
--- a/aeneas/extra/__init__.py
+++ b/aeneas/extra/__init__.py
@@ -13,7 +13,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL 3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/extra/ctw_espeak.py b/aeneas/extra/ctw_espeak.py
index 7f8828f5..02a35ed4 100644
--- a/aeneas/extra/ctw_espeak.py
+++ b/aeneas/extra/ctw_espeak.py
@@ -18,7 +18,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/extra/ctw_speect.py b/aeneas/extra/ctw_speect.py
index b7ade692..2bcfb91c 100644
--- a/aeneas/extra/ctw_speect.py
+++ b/aeneas/extra/ctw_speect.py
@@ -26,7 +26,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/festivalwrapper.py b/aeneas/festivalwrapper.py
index 67dadd34..dd6a37af 100644
--- a/aeneas/festivalwrapper.py
+++ b/aeneas/festivalwrapper.py
@@ -21,7 +21,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/ffmpegwrapper.py b/aeneas/ffmpegwrapper.py
index 108c7bae..b71995ca 100644
--- a/aeneas/ffmpegwrapper.py
+++ b/aeneas/ffmpegwrapper.py
@@ -23,7 +23,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/ffprobewrapper.py b/aeneas/ffprobewrapper.py
index e3db20b4..0cb4638b 100644
--- a/aeneas/ffprobewrapper.py
+++ b/aeneas/ffprobewrapper.py
@@ -28,7 +28,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
diff --git a/aeneas/globalconstants.py b/aeneas/globalconstants.py
index 2d5aa210..9eee32dd 100644
--- a/aeneas/globalconstants.py
+++ b/aeneas/globalconstants.py
@@ -13,7 +13,7 @@
Copyright 2015-2016, Alberto Pettarin (www.albertopettarin.it)
"""
__license__ = "GNU AGPL v3"
-__version__ = "1.5.0"
+__version__ = "1.5.1"
__email__ = "aeneas@readbeyond.it"
__status__ = "Production"
@@ -202,11 +202,6 @@
"""
-PPN_JOB_IS_TEXT_FILE_FORMAT = "is_text_type"
-"""
-See PPN_TASK_IS_TEXT_FILE_FORMAT
-"""
-
PPN_JOB_IS_TEXT_FILE_NAME_REGEX = "is_text_file_name_regex"
"""
The regex for matching the text file name
@@ -240,36 +235,6 @@
"""
-PPN_JOB_IS_TEXT_MUNPARSED_L1_ID_REGEX = "is_text_munparsed_l1_id_regex"
-"""
-See PPN_TASK_IS_TEXT_MUNPARSED_L1_ID_REGEX
-"""
-
-PPN_JOB_IS_TEXT_MUNPARSED_L2_ID_REGEX = "is_text_munparsed_l2_id_regex"
-"""
-See PPN_TASK_IS_TEXT_MUNPARSED_L2_ID_REGEX
-"""
-
-PPN_JOB_IS_TEXT_MUNPARSED_L3_ID_REGEX = "is_text_munparsed_l3_id_regex"
-"""
-See PPN_TASK_IS_TEXT_MUNPARSED_L3_ID_REGEX
-"""
-
-PPN_JOB_IS_TEXT_UNPARSED_CLASS_REGEX = "is_text_unparsed_class_regex"
-"""
-See PPN_TASK_IS_TEXT_UNPARSED_CLASS_REGEX
-"""
-
-PPN_JOB_IS_TEXT_UNPARSED_ID_REGEX = "is_text_unparsed_id_regex"
-"""
-See PPN_TASK_IS_TEXT_UNPARSED_ID_REGEX
-"""
-
-PPN_JOB_IS_TEXT_UNPARSED_ID_SORT = "is_text_unparsed_id_sort"
-"""
-See PPN_TASK_IS_TEXT_UNPARSED_ID_SORT
-"""
-
PPN_JOB_OS_CONTAINER_FORMAT = "os_job_file_container"
"""
The format of the output container.
@@ -924,6 +889,22 @@
.. versionadded:: 1.5.0
"""
+PPN_TASK_OS_FILE_EAF_AUDIO_REF = "os_task_file_eaf_audio_ref"
+"""
+The value of the ```` element in the output sync map,
+complete with the ``file://`` prefix.
+It applies to ``EAF`` sync maps only.
+
+Usage: config string, TXT config file, XML config file
+
+Values: string
+
+Example::
+
+ os_task_file_eaf_audio_ref=file:///audio/p001.mp3
+
+"""
+
PPN_TASK_OS_FILE_SMIL_AUDIO_REF = "os_task_file_smil_audio_ref"
"""
The value of the ``src`` attribute for the ``