...
 
Commits (30)
This diff is collapsed.
\contentsline {section}{\numberline {1}MBROLA Sources General condition of use}{1}
\contentsline {section}{\numberline {2}A brief description of MBROLA}{1}
\contentsline {section}{\numberline {3}Distribution}{2}
\contentsline {section}{\numberline {4}Installation and Tests\nobreakspace {} }{5}
\contentsline {subsection}{\numberline {4.1}On Unix}{5}
\contentsline {subsection}{\numberline {4.2}On PCs/Dos}{7}
\contentsline {subsection}{\numberline {4.3}On PC/Windows}{7}
\contentsline {subsubsection}{\numberline {4.3.1}Black magic}{8}
\contentsline {subsection}{\numberline {4.4}Using the standalone binary}{8}
\contentsline {subsubsection}{\numberline {4.4.1}Changing the pitch}{10}
\contentsline {subsubsection}{\numberline {4.4.2}Using Pipes}{11}
\contentsline {subsubsection}{\numberline {4.4.3}Renaming and Cloning phonemes}{11}
\contentsline {subsection}{\numberline {4.5}Machine dependant hints for best using Mbrola}{12}
\contentsline {subsubsection}{\numberline {4.5.1}On MSDOS}{12}
\contentsline {subsubsection}{\numberline {4.5.2}On modern Unix systems such as Solaris or HPUX or Linux}{12}
\contentsline {subsubsection}{\numberline {4.5.3}On Sun4 ( old audio interface )}{13}
\contentsline {subsubsection}{\numberline {4.5.4}On VAX or AXP workstations}{13}
\contentsline {subsection}{\numberline {4.6}Default Parser Manual}{13}
\contentsline {subsubsection}{\numberline {4.6.1}Input file format}{13}
\contentsline {subsubsection}{\numberline {4.6.2}Changing the Frequency Ratio or Time Ratio}{14}
\contentsline {subsubsection}{\numberline {4.6.3}Flush the output stream}{14}
\contentsline {subsubsection}{\numberline {4.6.4}Limitations of MBROLA}{15}
\contentsline {section}{\numberline {5}Programmer's Manual}{15}
\contentsline {subsection}{\numberline {5.1}Philosophy and architecture}{15}
\contentsline {subsection}{\numberline {5.2}Encapsulation of Object's attributes}{16}
\contentsline {subsubsection}{\numberline {5.2.1}Inheritance and Polymorphism}{17}
\contentsline {subsubsection}{\numberline {5.2.2}Inheritance and cross-reference graph}{18}
\contentsline {section}{\numberline {6}Application Programming Interface}{18}
\contentsline {subsection}{\numberline {6.1}One channel mode}{18}
\contentsline {subsubsection}{\numberline {6.1.1}Multi channel mode}{19}
\contentsline {subsubsection}{\numberline {6.1.2}Designing and plugging your own parser}{21}
\contentsline {subsection}{\numberline {6.2}Mbrola architecture}{22}
%%BoundingBox: 60 37 535 805
This source diff could not be displayed because it is too large. You can view the blob instead.
Mbrola package
--------------
The mbrola package provides the code part of the mbrola speech synthesizer.
To make it work, you need to install voice packages according to the desired
languages and quality, these are called mbrola-xyn where xyn is the mbrola voice
identifier, the same as in the upstream database:
http://tcts.fpms.ac.be/synthesis/
Voice packages also provide the virtual package mbrola-voice-<lang>
where <lang> is the iso code of the language), and sometimes also
mbrola-voice-<lang>-<territory> where the additional <territory> is the
territory of the language.
Since mbrola only synthesizes wave speech from phonemes, you also need a text
to phoneme converter, such as espeak or cicero, and a player such as sox. For
instance, to use the us1 voice from the mbrola-us1 package, you can run
echo 'Hello, world!' | espeak -v mb-us1 --stdin | mbrola -e /usr/share/mbrola/us1/us1 - -.au | play -t .au -
To make use of mbrola along espeak in speech-dispatcher, enable the
espeak-mbrola-generic module by uncommenting the corresponding line in
/etc/speech-dispatcher/speechd.conf
Not all mbrola voices are packaged, because they take a lot of space and require
text to phoneme support. If you need to package a particular mbrola voice, you
can probably just use the debian/mbrola-voice-package-generate script from
the /usr/share/doc/mbrola/examples.
Note: the amd64 package ships a 32bit binary, because the said-to-be-64
bit version on the mbrola site actually is 32bit and does not work at
all. Users who compile their own kernel should thus make sure to enable
CONFIG_IA32_EMULATION.
-- Samuel Thibault <sthibault@debian.org> Mon, 01 Jun 2009 18:42:38 +0200
mbrola (3.02b+dfsg-5) UNRELEASED; urgency=medium
* {control,copyright}: Update upstream website URL.
* watch: Add watch file.
* control: Bump Standards-Version to 4.4.0 (no changes).
-- Samuel Thibault <sthibault@debian.org> Thu, 18 Apr 2019 12:53:55 +0200
mbrola (3.02b+dfsg-4) unstable; urgency=medium
* tests/control: Fix AUTOPKGTEST_TMP variable name (Closes: Bug#914990).
-- Samuel Thibault <sthibault@debian.org> Thu, 29 Nov 2018 13:34:59 +0100
mbrola (3.02b+dfsg-3) unstable; urgency=medium
* clean: Fix removing tmp (Closes: Bug#914903).
-- Samuel Thibault <sthibault@debian.org> Wed, 28 Nov 2018 14:54:32 +0100
mbrola (3.02b+dfsg-2) unstable; urgency=medium
* control: Add Vcs URLs.
* copyright: Update upstream URL.
* patches/glibc: Fix build on ppc64el and !linux.
-- Samuel Thibault <sthibault@debian.org> Tue, 30 Oct 2018 13:17:53 +0100
mbrola (3.02b+dfsg-1) unstable; urgency=medium
* New upstream release, now free software!! (but still depend on non-free
voices).
- copyright: Update, notably to AGPL2+.
- control: Move to contrib section. Only build-depend on debhelper and
lyx, texlive-latex-base, texlive-fonts-recommended, ghostscript,
tex4ht. Build on any arch. Only depend on shlibs deps.
- install: Only install mbrola binary.
- rules: Clear. Add documentation build and test override.
- docs: Update.
- clean: Update.
- strongexit/: Remove.
* control: Bump Standards-Version to 4.2.0
* tests/control: Add autopkgtest.
* mbrola-voice-package-generate: Add autopkgtest to voice packages. Fix
package generation. Fix upstream URL.
-- Samuel Thibault <sthibault@debian.org> Sat, 20 Oct 2018 04:18:53 +0200
mbrola (3.01h+2-3) unstable; urgency=medium
* Make mbrola wrapper for libstrongexit.so simpler. espeak seems to be
looking at mbrola's state, and does not like to see it sleeping, waiting
for dpkg-architecture's output... (Closes: 857501).
-- Samuel Thibault <sthibault@debian.org> Sun, 12 Mar 2017 02:29:45 +0100
mbrola (3.01h+2-2) unstable; urgency=medium
* Add libstrongexit.so workaround. mbrola crashes on exit() cleanup, so
don't bother trying to exit cleanly, mbrola does close the output file
fine anyway (Closes: #856331).
- install: install libstrongexit.so and wrapper script to use it
- control:
- build-depend on gcc-multilib on amd64 for cross-compiling 32bit
libstrongexit.so
- build-depend on dh-exec for multiarch path
- depend on dpkg-dev for multiarch path at exec.
-- Samuel Thibault <sthibault@debian.org> Tue, 28 Feb 2017 14:26:24 +0100
mbrola (3.01h+2-1) unstable; urgency=medium
* Add armhf build from upstream (Closes: 839021).
* control: Bump Standards-Version to 3.9.8 (no change).
-- Samuel Thibault <sthibault@debian.org> Wed, 28 Sep 2016 09:21:27 +0200
mbrola (3.01h+1-3) unstable; urgency=medium
* Bump Standards-Version to 3.9.6 (no changes).
* compat: Bump to 9.
* rules: Clear.
-- Samuel Thibault <sthibault@debian.org> Tue, 22 Dec 2015 21:41:04 +0100
mbrola (3.01h+1-2) unstable; urgency=medium
* mbrola-voice-package-generate: Add TEST1 to list of test directories.
* Add libc6:i386 as shlib alternative on amd64 (Closes: 757188).
-- Samuel Thibault <sthibault@debian.org> Wed, 06 Aug 2014 10:07:46 +0200
mbrola (3.01h+1-1) unstable; urgency=low
* Include ARM dynamic-rebuilt binary.
* Bump Standards-Version to 3.9.5 (no change needed)
* debian/rules: Add build-indep rule.
* debian/mbrola-voice-package-generate: Add build-{arch,indep} rules.
-- Samuel Thibault <sthibault@debian.org> Tue, 31 Dec 2013 00:00:23 +0100
mbrola (3.01h-6) unstable; urgency=low
* debian/control: Bump Standards-Version to 3.9.1 (no change needed).
* debian/mbrola-voice-package-generate: Fix voice path according to common
usage (Closes: 593971).
-- Samuel Thibault <sthibault@debian.org> Thu, 16 Sep 2010 07:52:25 +0200
mbrola (3.01h-5) unstable; urgency=low
* rules: chmod u+w mbrola to fix FTBFS on sparc.
* debian/control: Bump Standards-Version to 3.8.4 (no change needed).
-- Samuel Thibault <sthibault@debian.org> Thu, 28 Jan 2010 00:02:20 +0100
mbrola (3.01h-4) unstable; urgency=low
* control: add ${misc:Depends}.
* mbrola.1: Fix typo.
* rules: Strip the mbrola binary.
-- Samuel Thibault <sthibault@debian.org> Fri, 01 Jan 2010 22:20:17 +0100
mbrola (3.01h-3) unstable; urgency=low
* README.Debian: Add a note about the amd64 package containing a 32bit
binary, and that hence ia32 emulation must be enabled in the kernel
(Closes: Bug#532972).
* Bump Standards-Version to 3.8.3 (no change needed).
* control: Add Multi-Arch: foreign header.
-- Samuel Thibault <sthibault@debian.org> Fri, 01 Jan 2010 21:38:40 +0100
mbrola (3.01h-2) unstable; urgency=low
* Bump Standards-Version to 3.8.1, no changes needed.
* Change my email, remove DM-Upload-Allowed, as well as in voice packages.
* Bump debhelper build-dependency to (>= 7), to get dh_prep.
* Remove arm arch.
* Document how to use espeak+mbrola in speech dispatcher.
-- Samuel Thibault <sthibault@debian.org> Thu, 07 May 2009 01:48:36 +0200
mbrola (3.01h-1) unstable; urgency=low
* Initial release (Closes: #509517).
-- Samuel Thibault <samuel.thibault@ens-lyon.org> Sun, 18 Jan 2009 22:32:09 +0100
Documentation/LATEX/doc2.pdf
Documentation/LATEX/doc2.html.LyXconv/*
tmp/
Source: mbrola
Section: contrib/sound
Priority: optional
Maintainer: Samuel Thibault <sthibault@debian.org>
Build-Depends: debhelper (>= 10), lyx, texlive-latex-base, texlive-fonts-recommended, ghostscript, tex4ht
Standards-Version: 4.4.0
Homepage: https://github.com/numediart/MBROLA
Vcs-Browser: https://salsa.debian.org/tts-team/mbrola.git
Vcs-Git: https://salsa.debian.org/tts-team/mbrola.git
XS-Autobuild: yes
Package: mbrola
Architecture: any
Multi-Arch: foreign
Depends: ${misc:Depends}, ${shlibs:Depends}
Suggests: mbrola-voice, espeak, cicero
Description: Multilingual software speech synthesizer
Mbrola is Thierry Dutoit's phonemizer for multilingual speech synthesis. The
various diphone databases are distributed on separate packages, but they
must be used with and only with Mbrola because of license matters. Read the
copyright for details.
.
Mbrola itself doesn't provide full TTS. It is a speech synthesizer based on
the concatenation of diphones. It takes a list of phonemes as input,
together with prosodic information (duration of phonemes and a piecewise linear
description of pitch), and produces speech samples on 16 bits (linear),
at the sampling frequency of the diphone database.
.
Use Mbrola along with Freephone, cicero or espeak to have a complete
text-to-speech in English.
This diff is collapsed.
README.md
Documentation/HISTORY.txt
Documentation/rom_documentation.txt
tmp/doc2.pdf
tmp/doc2.html.LyXconv/*
debian/mbrola-voice-package-generate
[DEFAULT]
upstream-branch = upstream-clean
[import-orig]
upstream-branch = upstream
merge = False
Bin/mbrola /usr/bin
debian/mbrola.1
#!/bin/bash
shopt -s nocaseglob nullglob
me="Samuel Thibault <sthibault@debian.org>"
debug() {
:
echo "$@"
}
if [ "$#" -lt 4 ]
then
echo "Usage: $0 code version language locale"
echo "for instance, $0 ca1 0.1 \"Canadian French\" fr_CA"
exit 1
fi
code="$1"
version="$2"
language="$3"
language="$(echo $language | sed -e 's/^\(.\)/\u\1/')"
locale="$4"
locale_lang="${locale/%_*/}"
locale_territory=
[ -z "${locale/*_*}" ] && locale_territory="${locale/#*_/}"
territory="$(echo $locale_territory | tr 'A-Z' 'a-z')"
a_language="a $language"
case $language in
A*|E*|I*|O*)
a_language="an $language"
esac
debug "code=\"$code\""
debug "version=\"$version\""
debug "language=\"$language\""
debug "locale=\"$locale\""
debug "lang=\"$locale_lang\""
debug "territory=\"$territory\""
debug "a language=\"$a_language\""
#
#
debug \# Check the cwd
#
#
license=
[ -r license.txt ] && license=license.txt
[ -r License.txt ] && license=License.txt
[ -r licence.txt ] && license=licence.txt
[ -r Licence.txt ] && license=Licence.txt
if [ -z "$license" ]
then
echo "missing license file, are you within the unzipped archive?"
exit 1
fi
#
#
debug \# check voice file
#
#
voice=
[ -r "$code" ] && voice="$code"
if [ -z "$voice" ];
then
echo "Could not find voice"
exit 1
fi
#
#
debug \# check help file
#
#
help=
[ -r "README.txt" ] && help="README.txt"
[ -r "$code.txt" ] && help="$code.txt"
[ -r "$code.info" ] && help="$code.info"
try=$(echo $code | tr 'a-z' 'A-Z')
[ -r "$try.txt" ] && help="$try.txt"
[ -r "$try.info" ] && help="$try.info"
try=$(echo $code | sed -e 's/^\(.\)/\u\1/')
[ -r "$try.txt" ] && help="$try.txt"
[ -r "$try.info" ] && help="$try.info"
if [ -z "$help" ];
then
echo "Could not find help file"
exit 1
fi
debug "help=\"$help\""
#
#
debug \# detect gender
#
#
gender=male
grep -q -i female $help && gender=female
debug "gender=\"$gender\""
#
#
debug \# Look for a test
#
#
testdir=
[ -d "TEST" ] && testdir="TEST"
[ -d "TEST1" ] && testdir="TEST1"
[ -d "test" ] && testdir="test"
[ -d "Test" ] && testdir="Test"
if [ -z "$testdir" ];
then
echo "Could not find testdir"
exit 1
fi
debug "testdir=\"$testdir\""
cd "$testdir"
testpho=$(ls -S *.pho *.Pho *.PHO | head -n 1)
cd - > /dev/null
if [ -z "$testpho" ];
then
echo "Could not find phoneme test file"
exit 1
fi
debug "testpho=\"$testpho\""
#
#
debug \# Try it
mbrola -e $voice "$testdir/$testpho" -.au | play -t .au - &
#
#
#
#
debug \# Ok, go !
#
#
tar cJf ../mbrola-${code}_$version.orig.tar.xz --exclude=debian --transform "s/^\./mbrola-$code-$version/" .
mkdir -p debian
mkdir -p debian/source
cat > debian/source/format << EOF
3.0 (quilt)
EOF
cat > debian/changelog << EOF
mbrola-$code ($version-1) UNRELEASED; urgency=low
* Initial release (Closes: #XXX).
-- $me $(date -R)
EOF
cat > debian/compat << EOF
9
EOF
provides="mbrola-voice-$locale_lang, mbrola-voice"
[ -n "$territory" ] && provides="mbrola-voice-$locale_lang-$territory, $provides"
cat > debian/control << EOF
Source: mbrola-$code
Section: non-free/sound
Priority: optional
Maintainer: $me
Build-Depends: debhelper (>= 10)
Standards-Version: 4.4.0
Homepage: http://tcts.fpms.ac.be/synthesis/
Package: mbrola-$code
Architecture: all
Depends: \${misc:Depends}, mbrola
Provides: $provides
Description: $language $gender voice for Mbrola
This package contains $a_language diphone database provided in the context
of the MBROLA project see: http://tcts.fpms.ac.be/synthesis/
.
It provides $a_language $gender voice to be used with the MBROLA program.
EOF
cat > debian/copyright << EOF
This package was debianized by $me
on $(date -R), based on the packageing from the Oralux
distribution (Igor B. Poretsky <master@goga.energo.ru> and Gilles Casse
<gcasse@oralux.org>)
It was downloaded from https://github.com/mbrola/mbrola-voices
Upstream Author: Faculte Polytechnique de Mons - mbrola team <mbrola@tcts.fpm
s.ac.be>
Copyright:
Copyright (C) 1996-2008 Faculte Polytechnique de Mons - mbrola team <mbrola@tcts.fpms.ac.be>
$(tr -d ' ' < $license | iconv -f latin1 -t utf-8)
EOF
cat > debian/docs << EOF
$help
EOF
[ -r sampa.txt ] && echo sampa.txt >> debian/docs
[ -r label.txt ] && echo label.txt >> debian/docs
cat > debian/examples << EOF
$testdir/*
EOF
cat > debian/README.Debian << EOF
mbrola-$code for Debian
---------------------
This package installs the diphone database into /usr/share/mbrola/$code/$code .
All examples go to /usr/share/doc/mbrola-$code/examples .
You can test your installation by running:
mbrola /usr/share/mbrola/$code/$code "/usr/share/doc/mbrola-$code/examples/$testpho" "${testpho/.pho}.wav"
which will create ${testpho/.pho}.wav in the current directory.
If you have Sox installed, you can run:
mbrola /usr/share/mbrola/$code/$code "/usr/share/doc/mbrola-$code/examples/$testpho" -.au | play -t .au -
to play it on the fly.
-- $me $(date -R)
EOF
mkdir debian/tests
cat > debian/tests/control << EOF
Depends: mbrola-$code
Test-Command: mbrola /usr/share/mbrola/$code/$code "/usr/share/doc/mbrola-$code/examples/$testpho" "\$PKGAUTOTEST_TMP/${testpho/.pho}.wav"
EOF
cat > debian/rules << EOF
#!/usr/bin/make -f
%:
dh \$@
override_dh_compress:
dh_compress -X.pho
EOF
chmod +x debian/rules
cat > debian/install << EOF
$code usr/share/mbrola/$code
EOF
cat > ../ITP-mbrola-$code << EOF
From: $me
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: ITP: mbrola-$code -- $language $gender voice for Mbrola
X-Debbugs-Cc: debian-devel@lists.debian.org
X-Debbugs-Cc: debian-accessibility@lists.debian.org
Package: wnpp
Version: N/A; reported $(date +%Y-%m-%d)
Severity: wishlist
Owner: $me
* Package name : mbrola-$code
Version : $version
Upstream Author : Faculte Polytechnique de Mons - mbrola team <mbrola@tcts.fpms.ac.be>
* URL : http://tcts.fpms.ac.be/synthesis
* License : see the file readme.txt in the source zip: non-free as in
without source code, and for non-commercial, non-military
purposes, with and only with the mbrola package made
available by the author.
Description : $language $gender voice for Mbrola
This package contains $a_language diphone database provided in the context
of the MBROLA project see: http://tcts.fpms.ac.be/synthesis/
.
It provides $a_language $gender voice to be used with the MBROLA
program.
EOF
wait
echo Warning: check that the gender was really $gender, or check on http://tcts.fpms.ac.be/synthesis/mbrola/mbrcopybin.html as the readme is sometimes bogus. If bogus, fix debian/control and ../ITP-mbrola-$code
.\" Hey, EMACS: -*- nroff -*-
.TH MBROLA 1 "May 17, 2005"
.SH NAME
mbrola \- multilingual software speech synthesizer
.SH SYNOPSIS
.B mbrola
.RI [ options ] <voice_database> <pho_file>... <output_file>
.SH DESCRIPTION
.PP
\fBmbrola\fP is a speech synthesizer based on the concatenation of
diphones. It takes a list of phonemes as input, together with prosodic
information (duration of phonemes and a piecewise linear description
of pitch), and produces speech samples on 16 bits (linear), at the
sampling frequency of the diphone database.
.PP
It is therefore NOT a Text-To-Speech (TTS) synthesizer, since it does
not accept raw text as input. In order to obtain a full TTS system,
you need to use this synthesizer in combination with a text processing
system that produces phonetic and prosodic commands.
For instance, you may use package \fBfreephone\fP to obtain complete
English TTS.
.PP
A `\-' instead of pho_file or output_file means stdin or stdout.
Extension of output_file ( raw, au, wav, aiff ) tells the wanted audio format.
.SH OPTIONS
\fBmbrola\fP understands following command line options.
.TP
.B \-h
.br
Show summary of options.
.TP
.B \-i
.br
Display the database information if any.
.TP
.B \-e
.br
Ignore fatal errors on unknown diphone.
.TP
.B \-c comment_char
Set COMMENT char (escape sequence in pho files).
.TP
.B \-F flush_command
Set FLUSH command name.
.TP
.B \-v volume
Volume ratio. Float ratio applied to output samples.
.TP
.B \-f freq_ratio
Frequency ratio. Float ratio applied to pitch points.
.TP
.B \-t time_ratio
Time ratio. Float ratio applied to phone durations.
.TP
.B \-l voice_freq
Voice frequency. Target frequency for voice quality in Hz.
.TP
.B \-R rename_list
Phoneme rename list of the form: `a A b B ...'
.TP
.B \-C clone_list
Phoneme clone list of the form: `a A b B ...'
.TP
.B \-I file
Initialization file containing one command per line.
\fBCLONE\fP, \fBRENAME\fP, \fBVOICE\fP, \fBTIME\fP, \fBFREQ\fP, \fBVOLUME\fP, \fBFLUSH\fP, \fBCOMMENT\fP,
and \fBIGNORE\fP are available.
.SH SEE ALSO
.BR freephone (1),
.BR sox (1).
.br
See /usr/share/doc/mbrola/readme.txt.gz for more info.
.SH AUTHOR
.nh
mbrola was written by Dr Thierry Dutoit <dutoit@tcts.fpms.ac.be>
.PP
This manual page was written by Igor B. Poretsky <master@goga.energo.ru>,
for the Debian project (but may be used by others).
commit 29b44d4e54c00198446a022f805d1bf4c8cb031a
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Tue Oct 30 13:13:03 2018 +0100
Use glibc-provided getopt when available
diff --git a/Standalone/synth.c b/Standalone/synth.c
index bfa742c..5137995 100644
--- a/Standalone/synth.c
+++ b/Standalone/synth.c
@@ -42,6 +42,10 @@
#include "zstring_list.h"
#include <stdio.h>
+#if defined(__GLIBC__)
+#include <getopt.h>
+#else
+
#if defined(TARGET_OS_DOS) || defined(TARGET_OS_SUN4) || defined (__STRICT_ANSI__)
#include <string.h>
#include "Posix/getopt.c"
@@ -51,6 +55,8 @@
#include <getopt.h>
#endif
+#endif
+
#include "common.h"
#include "database.h"
#include "diphone.h"
#!/usr/bin/make -f
%:
dh $@
override_dh_auto_build:
dh_auto_build
mkdir tmp
lyx -userdir tmp -E pdf tmp/doc2.pdf Documentation/LATEX/doc2.lyx
lyx -userdir tmp -E html tmp/doc2.html Documentation/LATEX/doc2.lyx
override_dh_auto_test:
true
mbrola source: depends-on-build-essential-package-without-using-version libc6-dev [build-depends: libc6-dev:i386 [amd64]]
Depends: mbrola, mbrola-fr4
Test-Command: mbrola /usr/share/mbrola/fr4/fr4 /usr/share/doc/mbrola-fr4/examples/hier.pho $AUTOPKGTEST_TMP/hier.wav
version=3
https://github.com/numediart/MBROLA/releases /numediart/MBROLA/archive/releases/([\d.]*).(?:txz|tbz2|tgz|tar\.(?:xz|bz2|gz)|zip)