# -*- coding: utf-8 -*-
from distutils.core import setup

packages = \
['at16k', 'at16k.api']

package_data = \
{'': ['*'], 'at16k': ['bin/*', 'blocks/*', 'core/*', 'utils/*']}

install_requires = \
['progressbar>=2.5,<3.0', 'scipy>=1.3.3,<2.0.0', 'tensorflow==1.14']

entry_points = \
{'console_scripts': ['at16k-convert = at16k.bin.speech_to_text:main']}

setup_kwargs = {
    'name': 'at16k',
    'version': '0.1.1',
    'description': 'at16k is a Python library to perform automatic speech recognition or speech to text conversion.',
    'long_description': "# at16k\nPronounced as ***at sixteen k***\n\n# What is at16k?\nat16k is a Python library to perform automatic speech recognition or speech to text conversion. The goal of this project is to provide the community with a production quality speech-to-text library.\n\n# Installation\nIt is recommended that you install at16k in a virtual environment.\n\n## Prerequisites\n- Python = 3.6 (not tested on other versions)\n- Tensorflow = 1.14\n- Scipy (for reading wav files)\n\n## Install via pip\n```\n$ pip install at16k\n```\n\n## Install from source\nRequires: [poetry](https://github.com/sdispater/poetry)\n```\n$ git clone https://github.com/at16k/at16k.git\n$ poetry env use python3.6\n$ poetry install\n```\n\n# Download models\nCurrently, two models are available for speech to text conversion.\n- en_8k (Trained on english audio recorded at 8 KHz)\n- en_16k (Trained on english audio recorded at 16 KHz)\n\nTo download all the models:\n```\n$ python -m at16k.download all\n```\nAlternatively, you can download only the model you need. For example:\n```\n$ python -m at16k.download en_8k\n$ python -m at16k.download en_16k\n```\n\n# Preprocessing audio files\nat16k accepts wav files with the following spces:\n- Channels: 1\n- Bits per sample: 16\n- Sample rate: 8000 (en_8k) or 16000 (en_16k)\n\nUse ffmpeg to convert your audio/video files to an acceptable format. For example,\n```\n# For 8 KHz\n$ ffmpeg -i <input_file> -ar 8000 -ac 1 -ab 16 <output_file>\n\n# For 16 KHz\n$ ffmpeg -i <input_file> -ar 16000 -ac 1 -ab 16 <output_file>\n```\n\n# Usage\n\n## Command line\nThere are two ways to invoke at16k speech-to-text via the command line.\n```\nat16k-convert -i <input_wav_file> -m <model_name>\n```\nAlternatively,\n```\npython -m at16k.bin.speech_to_text -i <input_wav_file> -m <model_name>\n```\n## Library API\n```\nfrom at16k.api import SpeechToText\n\n# One-time initialization\nSTT = SpeechToText('en_16k') # or en_8k\n\n# Run STT on an audio file, returns a dict\nprint(STT('./samples/test_16k.wav'))\n```\nCheck [example.py](example.py) for details on how to use the API.\n\n# Limitations\n\nThe max duration of your audio file should be less than **30 seconds** when using **en_8k**, and less than **15 seconds** when using **en_16k**. An error will not be thrown ff the duration exceeds the limits, however, your transcript may contain errors and missing text.\n",
    'author': 'Mohit Shah',
    'author_email': 'mohit@at16k.com',
    'maintainer': None,
    'maintainer_email': None,
    'url': 'https://github.com/at16k/at16k.git',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'entry_points': entry_points,
    'python_requires': '>=3.6,<4.0',
}


setup(**setup_kwargs)
