Skip to content

Commit

Permalink
Refine optional parameters section in TTS, translation examples
Browse files Browse the repository at this point in the history
- Improved the explanation of optional parameters in the text-to-speech
  (TTS) notebook, including `gender`, `age`, `polling_interval`, `debug`,
  and `output_directory`.
- Added clarifications and formatting for `gender` options in both the
  TTS and translation notebooks.
- Updated the translation notebook to include `gender` and other
  optional parameters with examples, improving the clarity of how to use
  them.
- Consolidated markdown cells for better readability and flow within the
  notebooks.
  • Loading branch information
cr2007 committed Sep 1, 2024
1 parent 1b9115e commit 3ef4b1c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
10 changes: 3 additions & 7 deletions examples/text-to-speech.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"There are some optional arguments that you can configure, such as `gender`, `age`, `polling_interval`, `debug`, `output_directory`."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"There are some optional arguments that you can configure, such as `gender`, `age`, `polling_interval`, `debug`, `output_directory`.<br>\n",
"<br>\n",
"\n",
"The (optional) Gender options allow you to set the Gender to the following options:\n",
"\n",
"- `Gender.NOT_KNOWN` (**0**)\n",
Expand Down
22 changes: 18 additions & 4 deletions examples/translation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"outputs": [],
"source": [
"import os\n",
"from cambai import CambAI"
"from cambai import CambAI, Gender"
]
},
{
Expand Down Expand Up @@ -128,16 +128,30 @@
" source_language=1, # English (United States)\n",
" target_language=87, # Italian (Italy)\n",
" age=21,\n",
" formality=1, # Optionally, you can set the formality level of the translation\n",
" save_to_file=True, # Optionally, you can save the translation to a file\n",
" debug=True # Optionally, you can print the debug information\n",
" # Optional Parameters\n",
" # formality=1, # Optional, you can set the formality level of the translation to 1 or 2\n",
" # gender=Gender.NOT_KNOWN, # Optional, you can set it to the below options\n",
" # save_to_file=False, # Optional, you can save the translation to a file\n",
" # debug=True # Optional, you can print the debug information\n",
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"There are some optional arguments that you can configure, such as `gender`, `age`, `polling_interval`, `debug`, `output_directory`.<br>\n",
"<br>\n",
"\n",
"The (optional) Gender options allow you to set the Gender to the following options:\n",
"\n",
"- `Gender.NOT_KNOWN` (**0**)\n",
"- `Gender.MALE` (**1**)\n",
"- `Gender.FEMALE` (**2**)\n",
"- `Gender.NOT_APPLICABLE` (**9**)\n",
"\n",
"---\n",
"\n",
"**NOTE:** The transcription process can take a while to complete, so depending on how long the text is, you may want to set the `polling_interval` attribute to a higher value."
]
},
Expand Down

0 comments on commit 3ef4b1c

Please sign in to comment.