mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 01:24:17 +00:00
api/builtins/Speaker: add speech
This commit is contained in:
@@ -82,9 +82,19 @@
|
||||
# Play a sound file from your project folder
|
||||
ev3.speaker.play('mysound.wav')
|
||||
|
||||
.. todo:: The following functionality is not yet implemented
|
||||
|
||||
.. automethod:: pybricks._instances.speaker.say
|
||||
|
||||
.. todo:: The following functionality is not yet implemented
|
||||
|
||||
.. automethod:: pybricks._instances.speaker.set_voice_settings
|
||||
|
||||
.. todo:: This functionality is not yet implemented
|
||||
|
||||
.. rubric:: Using the screen
|
||||
|
||||
.. todo:: SCREEN IS NOT YET UPDATED / IMPLEMENTED
|
||||
.. todo:: This functionality is not yet implemented
|
||||
|
||||
.. ::
|
||||
|
||||
|
||||
@@ -388,6 +388,30 @@ class Speaker():
|
||||
|
||||
pass
|
||||
|
||||
def say(self, text):
|
||||
"""Say a given text string.
|
||||
|
||||
Arguments:
|
||||
text (str): What to say.
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
def set_voice_settings(self, language='en', speed=150, variant='m1'):
|
||||
"""Configure voice settings used by the ``say`` method.
|
||||
|
||||
Arguments:
|
||||
language (str)::
|
||||
- ``'en'`` (English)
|
||||
- ``'nl'`` (Dutch)
|
||||
- ``'de'`` (German)
|
||||
- TODO: Add all available/supported languages
|
||||
speed (int): Number of words per minute.
|
||||
variant (str): Voice variant. You can choose female voices
|
||||
(``'f1'`` to ``'f5'``) or male voices (``'m1'`` to ``'m7'``).
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class Light():
|
||||
"""Control a single-color light."""
|
||||
|
||||
Reference in New Issue
Block a user