From 50a9d36314b472d2db7fd2fc12701f3b794000bf Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Thu, 16 Jan 2020 11:24:21 +0100 Subject: [PATCH] api/ev3.speaker: separate language and voice settings --- doc/api/hubs_ev3brick.inc | 7 ++----- pybricks/builtins.py | 10 ++++++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/api/hubs_ev3brick.inc b/doc/api/hubs_ev3brick.inc index 0bfa756..f6a173f 100644 --- a/doc/api/hubs_ev3brick.inc +++ b/doc/api/hubs_ev3brick.inc @@ -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 diff --git a/pybricks/builtins.py b/pybricks/builtins.py index 7603d4f..0734101 100644 --- a/pybricks/builtins.py +++ b/pybricks/builtins.py @@ -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