Skip to content

Commit 08ae177

Browse files
committed
chore(TTS): Generate text to speech
1 parent 33712c0 commit 08ae177

1 file changed

Lines changed: 30 additions & 27 deletions

File tree

watson_developer_cloud/text_to_speech_v1.py

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def get_voice(self, voice, customization_id=None, **kwargs):
111111
obtain information for that custom voice model of the specified voice. To list
112112
information about all available voices, use the **List voices** method.
113113
**See also:** [Specifying a
114-
voice](/docs/services/text-to-speech/http.html#voices).
114+
voice](https://cloud.ibm.com/docs/services/text-to-speech/http.html#voices).
115115
116116
:param str voice: The voice for which information is to be returned.
117117
:param str customization_id: The customization ID (GUID) of a custom voice model
@@ -150,7 +150,7 @@ def list_voices(self, **kwargs):
150150
name, language, gender, and other details about the voice. To see information
151151
about a specific voice, use the **Get a voice** method.
152152
**See also:** [Specifying a
153-
voice](/docs/services/text-to-speech/http.html#voices).
153+
voice](https://cloud.ibm.com/docs/services/text-to-speech/http.html#voices).
154154
155155
:param dict headers: A `dict` containing the request headers
156156
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
@@ -185,7 +185,7 @@ def synthesize(self,
185185
The service returns the synthesized audio stream as an array of bytes. You can
186186
pass a maximum of 5 KB of text to the service.
187187
**See also:** [Synthesizing text to
188-
audio](/docs/services/text-to-speech/http.html#synthesize).
188+
audio](https://cloud.ibm.com/docs/services/text-to-speech/http.html#synthesize).
189189
### Audio formats (accept types)
190190
The service can return audio in the following formats (MIME types).
191191
* Where indicated, you can optionally specify the sampling rate (`rate`) of the
@@ -236,7 +236,7 @@ def synthesize(self,
236236
22,050 Hz.
237237
For more information about specifying an audio format, including additional
238238
details about some of the formats, see [Specifying an audio
239-
format](/docs/services/text-to-speech/http.html#format).
239+
format](https://cloud.ibm.com/docs/services/text-to-speech/http.html#format).
240240
### Warning messages
241241
If a request includes invalid query parameters, the service returns a `Warnings`
242242
response header that provides messages about the invalid parameters. The warning
@@ -303,7 +303,7 @@ def get_pronunciation(self,
303303
for a specific custom voice model to see the translation for that voice model.
304304
**Note:** This method is currently a beta release.
305305
**See also:** [Querying a word from a
306-
language](/docs/services/text-to-speech/custom-entries.html#cuWordsQueryLanguage).
306+
language](https://cloud.ibm.com/docs/services/text-to-speech/custom-entries.html#cuWordsQueryLanguage).
307307
308308
:param str text: The word for which the pronunciation is requested.
309309
:param str voice: A voice that specifies the language in which the pronunciation
@@ -364,7 +364,7 @@ def create_voice_model(self,
364364
used to create it.
365365
**Note:** This method is currently a beta release.
366366
**See also:** [Creating a custom
367-
model](/docs/services/text-to-speech/custom-models.html#cuModelsCreate).
367+
model](https://cloud.ibm.com/docs/services/text-to-speech/custom-models.html#cuModelsCreate).
368368
369369
:param str name: The name of the new custom voice model.
370370
:param str language: The language of the new custom voice model. Omit the
@@ -402,7 +402,7 @@ def delete_voice_model(self, customization_id, **kwargs):
402402
instance of the service that owns a model to delete it.
403403
**Note:** This method is currently a beta release.
404404
**See also:** [Deleting a custom
405-
model](/docs/services/text-to-speech/custom-models.html#cuModelsDelete).
405+
model](https://cloud.ibm.com/docs/services/text-to-speech/custom-models.html#cuModelsDelete).
406406
407407
:param str customization_id: The customization ID (GUID) of the custom voice
408408
model. You must make the request with service credentials created for the instance
@@ -435,7 +435,7 @@ def get_voice_model(self, customization_id, **kwargs):
435435
voice model, use the **List custom models** method.
436436
**Note:** This method is currently a beta release.
437437
**See also:** [Querying a custom
438-
model](/docs/services/text-to-speech/custom-models.html#cuModelsQuery).
438+
model](https://cloud.ibm.com/docs/services/text-to-speech/custom-models.html#cuModelsQuery).
439439
440440
:param str customization_id: The customization ID (GUID) of the custom voice
441441
model. You must make the request with service credentials created for the instance
@@ -470,7 +470,7 @@ def list_voice_models(self, language=None, **kwargs):
470470
about it.
471471
**Note:** This method is currently a beta release.
472472
**See also:** [Querying all custom
473-
models](/docs/services/text-to-speech/custom-models.html#cuModelsQueryAll).
473+
models](https://cloud.ibm.com/docs/services/text-to-speech/custom-models.html#cuModelsQueryAll).
474474
475475
:param str language: The language for which custom voice models that are owned by
476476
the requesting service credentials are to be returned. Omit the parameter to see
@@ -523,10 +523,11 @@ def update_voice_model(self,
523523
**Note:** This method is currently a beta release.
524524
**See also:**
525525
* [Updating a custom
526-
model](/docs/services/text-to-speech/custom-models.html#cuModelsUpdate)
526+
model](https://cloud.ibm.com/docs/services/text-to-speech/custom-models.html#cuModelsUpdate)
527527
* [Adding words to a Japanese custom
528-
model](/docs/services/text-to-speech/custom-entries.html#cuJapaneseAdd)
529-
* [Understanding customization](/docs/services/text-to-speech/custom-intro.html).
528+
model](https://cloud.ibm.com/docs/services/text-to-speech/custom-entries.html#cuJapaneseAdd)
529+
* [Understanding
530+
customization](https://cloud.ibm.com/docs/services/text-to-speech/custom-intro.html).
530531
531532
:param str customization_id: The customization ID (GUID) of the custom voice
532533
model. You must make the request with service credentials created for the instance
@@ -593,10 +594,11 @@ def add_word(self,
593594
**Note:** This method is currently a beta release.
594595
**See also:**
595596
* [Adding a single word to a custom
596-
model](/docs/services/text-to-speech/custom-entries.html#cuWordAdd)
597+
model](https://cloud.ibm.com/docs/services/text-to-speech/custom-entries.html#cuWordAdd)
597598
* [Adding words to a Japanese custom
598-
model](/docs/services/text-to-speech/custom-entries.html#cuJapaneseAdd)
599-
* [Understanding customization](/docs/services/text-to-speech/custom-intro.html).
599+
model](https://cloud.ibm.com/docs/services/text-to-speech/custom-entries.html#cuJapaneseAdd)
600+
* [Understanding
601+
customization](https://cloud.ibm.com/docs/services/text-to-speech/custom-intro.html).
600602
601603
:param str customization_id: The customization ID (GUID) of the custom voice
602604
model. You must make the request with service credentials created for the instance
@@ -612,7 +614,7 @@ def add_word(self,
612614
create only a single entry, with or without a single part of speech, for any word;
613615
you cannot create multiple entries with different parts of speech for the same
614616
word. For more information, see [Working with Japanese
615-
entries](/docs/services/text-to-speech/custom-rules.html#jaNotes).
617+
entries](https://cloud.ibm.com/docs/services/text-to-speech/custom-rules.html#jaNotes).
616618
:param dict headers: A `dict` containing the request headers
617619
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
618620
:rtype: DetailedResponse
@@ -659,10 +661,11 @@ def add_words(self, customization_id, words, **kwargs):
659661
**Note:** This method is currently a beta release.
660662
**See also:**
661663
* [Adding multiple words to a custom
662-
model](/docs/services/text-to-speech/custom-entries.html#cuWordsAdd)
664+
model](https://cloud.ibm.com/docs/services/text-to-speech/custom-entries.html#cuWordsAdd)
663665
* [Adding words to a Japanese custom
664-
model](/docs/services/text-to-speech/custom-entries.html#cuJapaneseAdd)
665-
* [Understanding customization](/docs/services/text-to-speech/custom-intro.html).
666+
model](https://cloud.ibm.com/docs/services/text-to-speech/custom-entries.html#cuJapaneseAdd)
667+
* [Understanding
668+
customization](https://cloud.ibm.com/docs/services/text-to-speech/custom-intro.html).
666669
667670
:param str customization_id: The customization ID (GUID) of the custom voice
668671
model. You must make the request with service credentials created for the instance
@@ -709,7 +712,7 @@ def delete_word(self, customization_id, word, **kwargs):
709712
credentials for the instance of the service that owns a model to delete its words.
710713
**Note:** This method is currently a beta release.
711714
**See also:** [Deleting a word from a custom
712-
model](/docs/services/text-to-speech/custom-entries.html#cuWordDelete).
715+
model](https://cloud.ibm.com/docs/services/text-to-speech/custom-entries.html#cuWordDelete).
713716
714717
:param str customization_id: The customization ID (GUID) of the custom voice
715718
model. You must make the request with service credentials created for the instance
@@ -744,7 +747,7 @@ def get_word(self, customization_id, word, **kwargs):
744747
the instance of the service that owns a model to list its words.
745748
**Note:** This method is currently a beta release.
746749
**See also:** [Querying a single word from a custom
747-
model](/docs/services/text-to-speech/custom-entries.html#cuWordQueryModel).
750+
model](https://cloud.ibm.com/docs/services/text-to-speech/custom-entries.html#cuWordQueryModel).
748751
749752
:param str customization_id: The customization ID (GUID) of the custom voice
750753
model. You must make the request with service credentials created for the instance
@@ -780,7 +783,7 @@ def list_words(self, customization_id, **kwargs):
780783
words.
781784
**Note:** This method is currently a beta release.
782785
**See also:** [Querying all words from a custom
783-
model](/docs/services/text-to-speech/custom-entries.html#cuWordsQueryModel).
786+
model](https://cloud.ibm.com/docs/services/text-to-speech/custom-entries.html#cuWordsQueryModel).
784787
785788
:param str customization_id: The customization ID (GUID) of the custom voice
786789
model. You must make the request with service credentials created for the instance
@@ -819,7 +822,7 @@ def delete_user_data(self, customer_id, **kwargs):
819822
You associate a customer ID with data by passing the `X-Watson-Metadata` header
820823
with a request that passes the data.
821824
**See also:** [Information
822-
security](/docs/services/text-to-speech/information-security.html).
825+
security](https://cloud.ibm.com/docs/services/text-to-speech/information-security.html).
823826
824827
:param str customer_id: The customer ID for which all data is to be deleted.
825828
:param dict headers: A `dict` containing the request headers
@@ -985,7 +988,7 @@ class Translation(object):
985988
can create only a single entry, with or without a single part of speech, for any word;
986989
you cannot create multiple entries with different parts of speech for the same word.
987990
For more information, see [Working with Japanese
988-
entries](/docs/services/text-to-speech/custom-rules.html#jaNotes).
991+
entries](https://cloud.ibm.com/docs/services/text-to-speech/custom-rules.html#jaNotes).
989992
"""
990993

991994
def __init__(self, translation, part_of_speech=None):
@@ -1001,7 +1004,7 @@ def __init__(self, translation, part_of_speech=None):
10011004
word. You can create only a single entry, with or without a single part of speech,
10021005
for any word; you cannot create multiple entries with different parts of speech
10031006
for the same word. For more information, see [Working with Japanese
1004-
entries](/docs/services/text-to-speech/custom-rules.html#jaNotes).
1007+
entries](https://cloud.ibm.com/docs/services/text-to-speech/custom-rules.html#jaNotes).
10051008
"""
10061009
self.translation = translation
10071010
self.part_of_speech = part_of_speech
@@ -1441,7 +1444,7 @@ class Word(object):
14411444
can create only a single entry, with or without a single part of speech, for any word;
14421445
you cannot create multiple entries with different parts of speech for the same word.
14431446
For more information, see [Working with Japanese
1444-
entries](/docs/services/text-to-speech/custom-rules.html#jaNotes).
1447+
entries](https://cloud.ibm.com/docs/services/text-to-speech/custom-rules.html#jaNotes).
14451448
"""
14461449

14471450
def __init__(self, word, translation, part_of_speech=None):
@@ -1459,7 +1462,7 @@ def __init__(self, word, translation, part_of_speech=None):
14591462
word. You can create only a single entry, with or without a single part of speech,
14601463
for any word; you cannot create multiple entries with different parts of speech
14611464
for the same word. For more information, see [Working with Japanese
1462-
entries](/docs/services/text-to-speech/custom-rules.html#jaNotes).
1465+
entries](https://cloud.ibm.com/docs/services/text-to-speech/custom-rules.html#jaNotes).
14631466
"""
14641467
self.word = word
14651468
self.translation = translation

0 commit comments

Comments
 (0)