{ "cells": [ { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[{'string': 'ni',\n", " 'pos': '*',\n", " 'pos_group1': '*',\n", " 'pos_group2': '*',\n", " 'pos_group3': '*',\n", " 'ctype': '*',\n", " 'cform': '*',\n", " 'orig': 'ニ',\n", " 'read': 'ニ',\n", " 'pron': 'ニ',\n", " 'acc': 0,\n", " 'mora_size': 1,\n", " 'chain_rule': '*',\n", " 'chain_flag': -1},\n", " {'string': 'ce',\n", " 'pos': '*',\n", " 'pos_group1': '*',\n", " 'pos_group2': '*',\n", " 'pos_group3': '*',\n", " 'ctype': '*',\n", " 'cform': '*',\n", " 'orig': 'セイイ',\n", " 'read': 'セイイ',\n", " 'pron': 'セイイ',\n", " 'acc': 0,\n", " 'mora_size': 3,\n", " 'chain_rule': '*',\n", " 'chain_flag': 1}]" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import os\n", "import json\n", "import pyopenjtalk\n", "cwd = os.getcwd()\n", "if os.path.exists(os.path.join(cwd,'user.dic')):\n", " pyopenjtalk.update_global_jtalk_with_user_dict(os.path.join(cwd, 'user.dic'))\n", "pyopenjtalk.run_frontend('nice')" ] } ], "metadata": { "kernelspec": { "display_name": "vits", "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.10.0" } }, "nbformat": 4, "nbformat_minor": 2 }