|
1 |
| -.. This file is automatically generated. Do not edit this file directly. |
| 1 | +These samples have been moved. |
2 | 2 |
|
3 |
| -Google Cloud Text-to-Speech API Python Samples |
4 |
| -=============================================================================== |
5 |
| - |
6 |
| -.. image:: https://gstatic.com/cloudssh/images/open-btn.png |
7 |
| - :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=/README.rst |
8 |
| - |
9 |
| - |
10 |
| -This directory contains samples for Google Cloud Text-to-Speech API. The `Google Cloud Text To Speech API`_ enables you to generate and customize synthesized speech from text or SSML. |
11 |
| - |
12 |
| - |
13 |
| - |
14 |
| - |
15 |
| -.. _Google Cloud Text-to-Speech API: https://cloud.google.com/text-to-speech/docs/ |
16 |
| - |
17 |
| -Setup |
18 |
| -------------------------------------------------------------------------------- |
19 |
| - |
20 |
| - |
21 |
| -Authentication |
22 |
| -++++++++++++++ |
23 |
| - |
24 |
| -This sample requires you to have authentication setup. Refer to the |
25 |
| -`Authentication Getting Started Guide`_ for instructions on setting up |
26 |
| -credentials for applications. |
27 |
| - |
28 |
| -.. _Authentication Getting Started Guide: |
29 |
| - https://cloud.google.com/docs/authentication/getting-started |
30 |
| - |
31 |
| -Install Dependencies |
32 |
| -++++++++++++++++++++ |
33 |
| - |
34 |
| -#. Clone python-docs-samples and change directory to the sample directory you want to use. |
35 |
| - |
36 |
| - .. code-block:: bash |
37 |
| -
|
38 |
| - $ git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git |
39 |
| -
|
40 |
| -#. Install `pip`_ and `virtualenv`_ if you do not already have them. You may want to refer to the `Python Development Environment Setup Guide`_ for Google Cloud Platform for instructions. |
41 |
| - |
42 |
| - .. _Python Development Environment Setup Guide: |
43 |
| - https://cloud.google.com/python/setup |
44 |
| - |
45 |
| -#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+. |
46 |
| - |
47 |
| - .. code-block:: bash |
48 |
| -
|
49 |
| - $ virtualenv env |
50 |
| - $ source env/bin/activate |
51 |
| -
|
52 |
| -#. Install the dependencies needed to run the samples. |
53 |
| - |
54 |
| - .. code-block:: bash |
55 |
| -
|
56 |
| - $ pip install -r requirements.txt |
57 |
| -
|
58 |
| -.. _pip: https://pip.pypa.io/ |
59 |
| -.. _virtualenv: https://virtualenv.pypa.io/ |
60 |
| - |
61 |
| -Samples |
62 |
| -------------------------------------------------------------------------------- |
63 |
| - |
64 |
| -Quickstart |
65 |
| -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
66 |
| - |
67 |
| -.. image:: https://gstatic.com/cloudssh/images/open-btn.png |
68 |
| - :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=/quickstart.py,/README.rst |
69 |
| - |
70 |
| - |
71 |
| - |
72 |
| - |
73 |
| -To run this sample: |
74 |
| - |
75 |
| -.. code-block:: bash |
76 |
| -
|
77 |
| - $ python quickstart.py |
78 |
| -
|
79 |
| -
|
80 |
| -List voices |
81 |
| -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
82 |
| - |
83 |
| -.. image:: https://gstatic.com/cloudssh/images/open-btn.png |
84 |
| - :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=/list_voices.py,/README.rst |
85 |
| - |
86 |
| - |
87 |
| - |
88 |
| - |
89 |
| -To run this sample: |
90 |
| - |
91 |
| -.. code-block:: bash |
92 |
| -
|
93 |
| - $ python list_voices.py |
94 |
| -
|
95 |
| -
|
96 |
| -Synthesize text |
97 |
| -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
98 |
| - |
99 |
| -.. image:: https://gstatic.com/cloudssh/images/open-btn.png |
100 |
| - :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=/synthesize_text.py,/README.rst |
101 |
| - |
102 |
| - |
103 |
| - |
104 |
| - |
105 |
| -To run this sample: |
106 |
| - |
107 |
| -.. code-block:: bash |
108 |
| -
|
109 |
| - $ python synthesize_text.py |
110 |
| -
|
111 |
| - usage: synthesize_text.py [-h] (--text TEXT | --ssml SSML) |
112 |
| -
|
113 |
| - Google Cloud Text-To-Speech API sample application . |
114 |
| -
|
115 |
| - Example usage: |
116 |
| - python synthesize_text.py --text "hello" |
117 |
| - python synthesize_text.py --ssml "<speak>Hello there.</speak>" |
118 |
| -
|
119 |
| - optional arguments: |
120 |
| - -h, --help show this help message and exit |
121 |
| - --text TEXT The text from which to synthesize speech. |
122 |
| - --ssml SSML The ssml string from which to synthesize speech. |
123 |
| -
|
124 |
| -
|
125 |
| -
|
126 |
| -Synthesize file |
127 |
| -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
128 |
| - |
129 |
| -.. image:: https://gstatic.com/cloudssh/images/open-btn.png |
130 |
| - :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=/synthesize_file.py,/README.rst |
131 |
| - |
132 |
| - |
133 |
| - |
134 |
| - |
135 |
| -To run this sample: |
136 |
| - |
137 |
| -.. code-block:: bash |
138 |
| -
|
139 |
| - $ python synthesize_file.py |
140 |
| -
|
141 |
| - usage: synthesize_file.py [-h] (--text TEXT | --ssml SSML) |
142 |
| -
|
143 |
| - Google Cloud Text-To-Speech API sample application . |
144 |
| -
|
145 |
| - Example usage: |
146 |
| - python synthesize_file.py --text resources/hello.txt |
147 |
| - python synthesize_file.py --ssml resources/hello.ssml |
148 |
| -
|
149 |
| - optional arguments: |
150 |
| - -h, --help show this help message and exit |
151 |
| - --text TEXT The text file from which to synthesize speech. |
152 |
| - --ssml SSML The ssml file from which to synthesize speech. |
153 |
| -
|
154 |
| -
|
155 |
| -
|
156 |
| -Audio profile |
157 |
| -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
158 |
| - |
159 |
| -.. image:: https://gstatic.com/cloudssh/images/open-btn.png |
160 |
| - :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=/audio_profile.py,/README.rst |
161 |
| - |
162 |
| - |
163 |
| - |
164 |
| - |
165 |
| -To run this sample: |
166 |
| - |
167 |
| -.. code-block:: bash |
168 |
| -
|
169 |
| - $ python audio_profile.py |
170 |
| -
|
171 |
| - usage: audio_profile.py [-h] [--output OUTPUT] [--text TEXT] |
172 |
| - [--effects_profile_id EFFECTS_PROFILE_ID] |
173 |
| -
|
174 |
| - Google Cloud Text-To-Speech API sample application for audio profile. |
175 |
| -
|
176 |
| - Example usage: |
177 |
| - python audio_profile.py --text "hello" --effects_profile_id |
178 |
| - "telephony-class-application" |
179 |
| -
|
180 |
| - optional arguments: |
181 |
| - -h, --help show this help message and exit |
182 |
| - --output OUTPUT The output mp3 file. |
183 |
| - --text TEXT The text from which to synthesize speech. |
184 |
| - --effects_profile_id EFFECTS_PROFILE_ID |
185 |
| - The audio effects profile id to be applied. |
186 |
| -
|
187 |
| -
|
188 |
| -
|
189 |
| -
|
190 |
| -
|
191 |
| -The client library |
192 |
| -------------------------------------------------------------------------------- |
193 |
| - |
194 |
| -This sample uses the `Google Cloud Client Library for Python`_. |
195 |
| -You can read the documentation for more details on API usage and use GitHub |
196 |
| -to `browse the source`_ and `report issues`_. |
197 |
| - |
198 |
| -.. _Google Cloud Client Library for Python: |
199 |
| - https://googlecloudplatform.github.io/google-cloud-python/ |
200 |
| -.. _browse the source: |
201 |
| - https://github.com/GoogleCloudPlatform/google-cloud-python |
202 |
| -.. _report issues: |
203 |
| - https://github.com/GoogleCloudPlatform/google-cloud-python/issues |
204 |
| - |
205 |
| - |
206 |
| -.. _Google Cloud SDK: https://cloud.google.com/sdk/ |
| 3 | +https://github.com/googleapis/python-texttospeech/tree/master/samples |
0 commit comments