Skip to content

Commit 87cfca2

Browse files
committed
chore(tts): regenerate text to speech
1 parent b44d1eb commit 87cfca2

File tree

1 file changed

+32
-31
lines changed

1 file changed

+32
-31
lines changed

ibm_watson/text_to_speech_v1.py

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# coding: utf-8
22

3-
# (C) Copyright IBM Corp. 2015, 2020.
3+
# (C) Copyright IBM Corp. 2020.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -35,7 +35,8 @@
3535
from .common import get_sdk_headers
3636
from enum import Enum
3737
from ibm_cloud_sdk_core import BaseService
38-
from ibm_cloud_sdk_core import get_authenticator_from_environment
38+
from ibm_cloud_sdk_core import DetailedResponse
39+
from ibm_cloud_sdk_core.get_authenticator import get_authenticator_from_environment
3940
from typing import Dict
4041
from typing import List
4142

@@ -82,7 +83,7 @@ def list_voices(self, **kwargs) -> 'DetailedResponse':
8283
name, language, gender, and other details about the voice. To see information
8384
about a specific voice, use the **Get a voice** method.
8485
**See also:** [Listing all available
85-
voices](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-voices#listVoices).
86+
voices](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices#listVoices).
8687
8788
:param dict headers: A `dict` containing the request headers
8889
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
@@ -114,7 +115,7 @@ def get_voice(self, voice: str, *, customization_id: str = None,
114115
the specified voice. To list information about all available voices, use the
115116
**List voices** method.
116117
**See also:** [Listing a specific
117-
voice](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-voices#listVoice).
118+
voice](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices#listVoice).
118119
119120
:param str voice: The voice for which information is to be returned.
120121
:param str customization_id: (optional) The customization ID (GUID) of a
@@ -170,7 +171,7 @@ def synthesize(self,
170171
8 KB for the URL and headers. The 5 KB limit includes any SSML tags that you
171172
specify. The service returns the synthesized audio stream as an array of bytes.
172173
**See also:** [The HTTP
173-
interface](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-usingHTTP#usingHTTP).
174+
interface](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-usingHTTP#usingHTTP).
174175
### Audio formats (accept types)
175176
The service can return audio in the following formats (MIME types).
176177
* Where indicated, you can optionally specify the sampling rate (`rate`) of the
@@ -213,7 +214,7 @@ def synthesize(self,
213214
The default sampling rate is 22,050 Hz.
214215
For more information about specifying an audio format, including additional
215216
details about some of the formats, see [Audio
216-
formats](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-audioFormats#audioFormats).
217+
formats](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-audioFormats#audioFormats).
217218
### Warning messages
218219
If a request includes invalid query parameters, the service returns a `Warnings`
219220
response header that provides messages about the invalid parameters. The warning
@@ -285,7 +286,7 @@ def get_pronunciation(self,
285286
**Note:** This method is currently a beta release. The method does not support the
286287
Arabic, Chinese, and Dutch languages.
287288
**See also:** [Querying a word from a
288-
language](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-customWords#cuWordsQueryLanguage).
289+
language](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuWordsQueryLanguage).
289290
290291
:param str text: The word for which the pronunciation is requested.
291292
:param str voice: (optional) A voice that specifies the language in which
@@ -354,7 +355,7 @@ def create_voice_model(self,
354355
**Note:** This method is currently a beta release. The service does not support
355356
voice model customization for the Arabic, Chinese, and Dutch languages.
356357
**See also:** [Creating a custom
357-
model](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-customModels#cuModelsCreate).
358+
model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customModels#cuModelsCreate).
358359
359360
:param str name: The name of the new custom voice model.
360361
:param str language: (optional) The language of the new custom voice model.
@@ -401,7 +402,7 @@ def list_voice_models(self, *, language: str = None,
401402
about it.
402403
**Note:** This method is currently a beta release.
403404
**See also:** [Querying all custom
404-
models](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-customModels#cuModelsQueryAll).
405+
models](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customModels#cuModelsQueryAll).
405406
406407
:param str language: (optional) The language for which custom voice models
407408
that are owned by the requesting credentials are to be returned. Omit the
@@ -459,11 +460,11 @@ def update_voice_model(self,
459460
**Note:** This method is currently a beta release.
460461
**See also:**
461462
* [Updating a custom
462-
model](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-customModels#cuModelsUpdate)
463+
model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customModels#cuModelsUpdate)
463464
* [Adding words to a Japanese custom
464-
model](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-customWords#cuJapaneseAdd)
465+
model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuJapaneseAdd)
465466
* [Understanding
466-
customization](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-customIntro#customIntro).
467+
customization](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customIntro#customIntro).
467468
468469
:param str customization_id: The customization ID (GUID) of the custom
469470
voice model. You must make the request with credentials for the instance of
@@ -516,7 +517,7 @@ def get_voice_model(self, customization_id: str,
516517
voice model, use the **List custom models** method.
517518
**Note:** This method is currently a beta release.
518519
**See also:** [Querying a custom
519-
model](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-customModels#cuModelsQuery).
520+
model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customModels#cuModelsQuery).
520521
521522
:param str customization_id: The customization ID (GUID) of the custom
522523
voice model. You must make the request with credentials for the instance of
@@ -553,7 +554,7 @@ def delete_voice_model(self, customization_id: str,
553554
instance of the service that owns a model to delete it.
554555
**Note:** This method is currently a beta release.
555556
**See also:** [Deleting a custom
556-
model](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-customModels#cuModelsDelete).
557+
model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customModels#cuModelsDelete).
557558
558559
:param str customization_id: The customization ID (GUID) of the custom
559560
voice model. You must make the request with credentials for the instance of
@@ -610,11 +611,11 @@ def add_words(self, customization_id: str, words: List['Word'],
610611
**Note:** This method is currently a beta release.
611612
**See also:**
612613
* [Adding multiple words to a custom
613-
model](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-customWords#cuWordsAdd)
614+
model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuWordsAdd)
614615
* [Adding words to a Japanese custom
615-
model](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-customWords#cuJapaneseAdd)
616+
model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuJapaneseAdd)
616617
* [Understanding
617-
customization](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-customIntro#customIntro).
618+
customization](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customIntro#customIntro).
618619
619620
:param str customization_id: The customization ID (GUID) of the custom
620621
voice model. You must make the request with credentials for the instance of
@@ -668,7 +669,7 @@ def list_words(self, customization_id: str, **kwargs) -> 'DetailedResponse':
668669
words.
669670
**Note:** This method is currently a beta release.
670671
**See also:** [Querying all words from a custom
671-
model](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-customWords#cuWordsQueryModel).
672+
model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuWordsQueryModel).
672673
673674
:param str customization_id: The customization ID (GUID) of the custom
674675
voice model. You must make the request with credentials for the instance of
@@ -724,11 +725,11 @@ def add_word(self,
724725
**Note:** This method is currently a beta release.
725726
**See also:**
726727
* [Adding a single word to a custom
727-
model](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-customWords#cuWordAdd)
728+
model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuWordAdd)
728729
* [Adding words to a Japanese custom
729-
model](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-customWords#cuJapaneseAdd)
730+
model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuJapaneseAdd)
730731
* [Understanding
731-
customization](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-customIntro#customIntro).
732+
customization](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customIntro#customIntro).
732733
733734
:param str customization_id: The customization ID (GUID) of the custom
734735
voice model. You must make the request with credentials for the instance of
@@ -746,7 +747,7 @@ def add_word(self,
746747
part of speech, for any word; you cannot create multiple entries with
747748
different parts of speech for the same word. For more information, see
748749
[Working with Japanese
749-
entries](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-rules#jaNotes).
750+
entries](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-rules#jaNotes).
750751
:param dict headers: A `dict` containing the request headers
751752
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
752753
:rtype: DetailedResponse
@@ -789,7 +790,7 @@ def get_word(self, customization_id: str, word: str,
789790
the instance of the service that owns a model to list its words.
790791
**Note:** This method is currently a beta release.
791792
**See also:** [Querying a single word from a custom
792-
model](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-customWords#cuWordQueryModel).
793+
model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuWordQueryModel).
793794
794795
:param str customization_id: The customization ID (GUID) of the custom
795796
voice model. You must make the request with credentials for the instance of
@@ -830,7 +831,7 @@ def delete_word(self, customization_id: str, word: str,
830831
credentials for the instance of the service that owns a model to delete its words.
831832
**Note:** This method is currently a beta release.
832833
**See also:** [Deleting a word from a custom
833-
model](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-customWords#cuWordDelete).
834+
model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuWordDelete).
834835
835836
:param str customization_id: The customization ID (GUID) of the custom
836837
voice model. You must make the request with credentials for the instance of
@@ -881,7 +882,7 @@ def delete_user_data(self, customer_id: str,
881882
You associate a customer ID with data by passing the `X-Watson-Metadata` header
882883
with a request that passes the data.
883884
**See also:** [Information
884-
security](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-information-security#information-security).
885+
security](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-information-security#information-security).
885886
886887
:param str customer_id: The customer ID for which all data is to be
887888
deleted.
@@ -1248,7 +1249,7 @@ class Translation():
12481249
word. You can create only a single entry, with or without a single part of
12491250
speech, for any word; you cannot create multiple entries with different parts of
12501251
speech for the same word. For more information, see [Working with Japanese
1251-
entries](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-rules#jaNotes).
1252+
entries](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-rules#jaNotes).
12521253
"""
12531254

12541255
def __init__(self, translation: str, *, part_of_speech: str = None) -> None:
@@ -1266,7 +1267,7 @@ def __init__(self, translation: str, *, part_of_speech: str = None) -> None:
12661267
part of speech, for any word; you cannot create multiple entries with
12671268
different parts of speech for the same word. For more information, see
12681269
[Working with Japanese
1269-
entries](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-rules#jaNotes).
1270+
entries](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-rules#jaNotes).
12701271
"""
12711272
self.translation = translation
12721273
self.part_of_speech = part_of_speech
@@ -1330,7 +1331,7 @@ class PartOfSpeechEnum(Enum):
13301331
with or without a single part of speech, for any word; you cannot create multiple
13311332
entries with different parts of speech for the same word. For more information,
13321333
see [Working with Japanese
1333-
entries](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-rules#jaNotes).
1334+
entries](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-rules#jaNotes).
13341335
"""
13351336
DOSI = "Dosi"
13361337
FUKU = "Fuku"
@@ -1824,7 +1825,7 @@ class Word():
18241825
word. You can create only a single entry, with or without a single part of
18251826
speech, for any word; you cannot create multiple entries with different parts of
18261827
speech for the same word. For more information, see [Working with Japanese
1827-
entries](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-rules#jaNotes).
1828+
entries](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-rules#jaNotes).
18281829
"""
18291830

18301831
def __init__(self,
@@ -1847,7 +1848,7 @@ def __init__(self,
18471848
part of speech, for any word; you cannot create multiple entries with
18481849
different parts of speech for the same word. For more information, see
18491850
[Working with Japanese
1850-
entries](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-rules#jaNotes).
1851+
entries](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-rules#jaNotes).
18511852
"""
18521853
self.word = word
18531854
self.translation = translation
@@ -1918,7 +1919,7 @@ class PartOfSpeechEnum(Enum):
19181919
with or without a single part of speech, for any word; you cannot create multiple
19191920
entries with different parts of speech for the same word. For more information,
19201921
see [Working with Japanese
1921-
entries](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-rules#jaNotes).
1922+
entries](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-rules#jaNotes).
19221923
"""
19231924
DOSI = "Dosi"
19241925
FUKU = "Fuku"

0 commit comments

Comments
 (0)