api/ev3.speaker: separate language and voice settings

This commit is contained in:
Laurens Valk
2020-01-16 11:25:13 +01:00
parent 3e16ec2ba5
commit 50a9d36314
2 changed files with 10 additions and 7 deletions
+2 -5
View File
@@ -33,7 +33,7 @@
.. toggle-header::
:header: **Show/hide available languages and voices**
You can choose the following and voices:
You can choose the following languages:
- ``af``: Afrikaans
- ``an``: Aragonese
@@ -105,8 +105,7 @@
- ``zh``: Mandarin Chinese
- ``zh-yue``: Cantonese Chinese
The following modifiers can optionally be appended to the end
of the voice name:
You can choose the following voices:
- ``+f1``: female variant 1
- ``+f2``: female variant 2
@@ -125,8 +124,6 @@
- ``+whisperf``: female whisper
.. automethod:: pybricks.hubs::EV3Brick.speaker.set_volume
+8 -2
View File
@@ -397,8 +397,14 @@ class Speaker():
instead.
Arguments:
language (str):
Language of the text. For example, you can choose ``'en'``
(English) or ``'de'`` (German). A list of all available
languages is given below.
voice (str):
The voice to use. One of the following:
The voice to use. For example, you can choose ``'f1'`` (female
voice variant 1) or ``'m3'`` (male voice variant 3). A list of
all available voices is given below.
speed (int):
Number of words per minute.
pitch (int):
@@ -498,7 +504,7 @@ class LightArray():
Set the brightness of each light individually.
Arguments:
brightnesses (:ref:`brightness`, ..., :ref:`brightness`):
brightness (:ref:`brightness`, ..., :ref:`brightness`):
Brightness of each light.
"""
pass