{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Installation" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Using PIP" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Simply use PIP to install malaya-speech,\n", "\n", "```bash\n", "pip3 install malaya-speech\n", "```\n", "\n", "It will automatically all dependencies except for Tensorflow and PyTorch. So you can choose your own Tensorflow CPU / GPU version and PyTorch CPU / GPU version.\n", "\n", "Make sure **Tensorflow >= 1.15.0**, and **PyTorch >= 1.10**." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Getting started" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import malaya_speech" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If no error or warning, you are good to go!" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Simple ASR" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "y, sr = malaya_speech.load('speech/example-speaker/husein-zolkepli.wav')" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "stt = malaya_speech.stt.deep_transducer()" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/plain": [ "['testing nama saya husin bin zulkifli']" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "stt.greedy_decoder([y])" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.7" }, "varInspector": { "cols": { "lenName": 16, "lenType": 16, "lenVar": 40 }, "kernels_config": { "python": { "delete_cmd_postfix": "", "delete_cmd_prefix": "del ", "library": "var_list.py", "varRefreshCmd": "print(var_dic_list())" }, "r": { "delete_cmd_postfix": ") ", "delete_cmd_prefix": "rm(", "library": "var_list.r", "varRefreshCmd": "cat(var_dic_list()) " } }, "types_to_exclude": [ "module", "function", "builtin_function_or_method", "instance", "_Feature" ], "window_display": false } }, "nbformat": 4, "nbformat_minor": 4 }