astpicotts/README.md
2018-07-27 10:23:58 +02:00

4.2 KiB

Asterisk PicoTTS Helpers

This repository collect some tools to use PicoTTS with Asterisk (in AGI context).

Requirements

  • Python
  • Sox (Debian package sox)
  • PicoTTS (Debian package libttspico-utils)
  • Python PYST (Debian package python-pyst)
  • Mplayer (for simulate mode, Debian package mplayer)

picotts.py

Simple tool to generated WAV file from text and easily playback it in Asterisk AGI context. This file is also a library use by other scripts to manage PicoTTS.

Usage: picotts.py [options]

Options:
  -h, --help            show this help message and exit
  -d, --debug           Enable debug mode
  -v, --verbose         Enable verbose mode
  --simulate            Simulate AGI mode
  --simulate-play       Simulate mode : play file using mplayer
  -r, --read            Enable read mode
  -t READ_TIMEOUT, --read-timeout=READ_TIMEOUT
                        Read timeout in ms (Default : 3000)
  -m READ_MAXDIGITS, --read-max-digits=READ_MAXDIGITS
                        Read max digits (Default : 20)
  -n VARNAME, --name=VARNAME
                        User input result variable name (Default : USER_INPUT)
  -L LOGFILE, --log-file=LOGFILE
                        pico2wave path (Default :
                        /var/log/asterisk/picotts.log)
  -l LANG, --lang=LANG  Language (Default : fr-FR)
  -i INTKEY, --intkey=INTKEY
                        Interrupt key(s) (Default : No)
  -s SPEED, --speed=SPEED
                        Speed factor (Default : 1)
  -S SAMPLERATE, --sample-rate=SAMPLERATE
                        Sample rate (Default : auto-detect)
  -c, --cache           Enable cache
  -C CACHEDIR, --cache-dir=CACHEDIR
                        Cache directory path (Default : /tmp/)
  --sox-path=SOX_PATH   sox path (Default : auto-detec in PATH)
  --pico2wave-path=PICO2WAVE_PATH
                        pico2wave path (Default : auto-detec in PATH)

conference.py

AGI script that permit to implement conference menu for confbridge.

Usage: conference.py [options]

Options:
  -h, --help            show this help message and exit
  -d, --debug           Enable debug mode
  -v, --verbose         Enable verbose mode
  --simulate            Simulate AGI mode
  --simulate-play       Simulate mode : play file using mplayer
  -t READ_TIMEOUT, --read-timeout=READ_TIMEOUT
                        Read timeout in ms (Default : 3000)
  -m READ_MAXDIGITS, --read-max-digits=READ_MAXDIGITS
                        Read max digits (Default : 20)
  -T READ_MAXTRY, --read-max-try=READ_MAXTRY
                        Read max try (Default : 3)
  --can-create          User can create a conference
  -n VARNAME, --name=VARNAME
                        User input result variable name (Default : CONFID)
  -L LOGFILE, --log-file=LOGFILE
                        pico2wave path (Default :
                        /var/log/asterisk/conference.agi.log)
  -l LANG, --lang=LANG  Language (Default : fr-FR)
  -i INTKEY, --intkey=INTKEY
                        Interrupt key(s) (Default : Any)
  -s SPEED, --speed=SPEED
                        Speed factor (Default : 1)
  -S SAMPLERATE, --sample-rate=SAMPLERATE
                        Sample rate (Default : auto-detect)
  -c, --cache           Enable cache
  -C CACHEDIR, --cache-dir=CACHEDIR
                        Cache directory path (Default :
                        /var/cache/asterisk/picotts)
  --sox-path=SOX_PATH   sox path (Default : auto-detec in PATH)
  --pico2wave-path=PICO2WAVE_PATH
                        pico2wave path (Default : auto-detec in PATH)

Copyright (c) 2018 Benjamin Renard brenard@zionetrix.net

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.