Skip to main content

Generate spoken numbers mp3 files used for Memory Competitions

Project description

Generate spoken numbers mp3 files used for Memory Competitions and training.

Usage and command line options

usage: spokennumbers [-h] [-n NUMBERS] [-p INIT_SILENCE] [-c] [-s SPEED]
                    [-d SOURCE] [-e EXCLUDE] [-o OUTPUT_FILE] [-i]

Generate spoken numbers audio files.

If no options are provided, a random 100-digit mp3 file will be created.
A text file will also be created next to the mp3 file contaning the raw
numbers (used for recall).

optional arguments:
-h, --help            show this help message and exit
-n NUMBERS, --numbers NUMBERS
                        The number of random digits to generate. Defaults to
                        100. If a text file is specified, all digits it
                        contains will be used instead (parsed by regexp).
-p INIT_SILENCE, --init-silence INIT_SILENCE
                        Add some seconds of silence in the beginning of the
                        audio file. Defaults to 3 seconds.
-c, --skip-countdown  By default, a countdown sequence will be spoken at
                        start: "3 ... 2 ... 1 ... a ... b ... c ... ...". This
                        option skips the countdown.
-s SPEED, --speed SPEED
                        The pace at which numbers will be spoken in seconds.
                        Defaults to one digit per second.
-d SOURCE, --source SOURCE
                        Audio files source. The string "default" will use the
                        default audio files included in the Python package.
                        For custom audio files, you can specify the path to a
                        directory as source. The directory must contain the
                        required audio wav files: 0.wav ... 9.wav and a.wav,
                        b.wav and c.wav.
-e EXCLUDE, --exclude EXCLUDE
                        This option is used to exclude specified digits from
                        the output. For example, if `--exclude 789` is used,
                        the digits 7, 8 and 9 will not be present in the
                        output file.
-o OUTPUT_FILE, --output-file OUTPUT_FILE
                        Name of output file. Defaults to `spoken.mp3`.
-i, --skip-txt-file   Do not create the txt file containing the spoken
                        numbers next to the audio file. The txt file is used
                        for recall.

Example:
    $ spokennumbers -n 150 --speed 1.2 -o monday_training.mp3

Installation

From PyPI:

$ python3 -m pip install spokennumbers

or from source (make sure you have python3 -m pip install wheel setuptools first):

$ git clone https://github.com/Penlect/spokennumbers.git
$ cd spokennumbers
$ python3 setup.py bdist_wheel
$ python3 -m pip install ./dist/spokennumbers-*.whl

or from generated Debian package:

# Install build dependencies
$ sudo apt install python3-all python3-setuptools dh-python
$ git clone https://github.com/Penlect/spokennumbers.git
$ cd spokennumbers
$ make deb
$ sudo apt install ./python3-spokennumbers_*.deb

NOTE: This project has a dependency to pydub which requires ffmpeg to be installed. Install ffmpeg and make sure it is available in PATH.

Changelog

The changelog is maintained in the debian directory, please check there: changelog.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spokennumbers-1.0.0.tar.gz (4.0 MB view details)

Uploaded Source

Built Distribution

spokennumbers-1.0.0-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file spokennumbers-1.0.0.tar.gz.

File metadata

  • Download URL: spokennumbers-1.0.0.tar.gz
  • Upload date:
  • Size: 4.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

File hashes

Hashes for spokennumbers-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0a766352036f3141e9772ec5e18695eaaff53e457c06e4d4478141bd1006e7d8
MD5 61c219a5e649ebe428a6206354310428
BLAKE2b-256 3c0d59375080e097e735a10be5f33c89d656ed55f893280e24b6ecbc35f4d414

See more details on using hashes here.

File details

Details for the file spokennumbers-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: spokennumbers-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.0

File hashes

Hashes for spokennumbers-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a8f53e3d828c0db98cb94e84eaa8db592214e5fb1246a30e6f82e1cd792fd55f
MD5 94c4332ce5f37897aaadffceeb21c488
BLAKE2b-256 973a184571ce3ad4aa22fae351c925814d994ee4a51d0f1496d94f3d4c75751a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page