@@ -57,6 +57,30 @@ and `custom_vocabulary_id` as optional parameters.
57
57
58
58
The url submission option also supports authentication headers by using the ` source_config ` option.
59
59
60
+ You can request transcript summary.
61
+
62
+ ``` python
63
+ # submitting a human transcription jobs
64
+ job = client.submit_job_url(" https://example.com/file-to-transcribe.mp3" ,
65
+ language = ' en' ,
66
+ summarization_config = SummarizationOptions(
67
+ formatting_type = SummarizationFormattingOptions.BULLETS
68
+ ))
69
+ ```
70
+
71
+ You can request transcript translation into up to five languages.
72
+
73
+ ``` javascript
74
+ job = client .submit_job_url (" https://example.com/file-to-transcribe.mp3" ,
75
+ language= ' en' ,
76
+ translation_config= TranslationOptions (
77
+ target_languages: [
78
+ TranslationLanguageOptions (" es" , NlpModel .PREMIUM ),
79
+ TranslationLanguageOptions (" de" )
80
+ ]
81
+ ));
82
+ ```
83
+
60
84
All options are described in the request body of the
61
85
[ Submit Job] ( https://docs.rev.ai/api/asynchronous/reference/#operation/SubmitTranscriptionJob ) endpoint.
62
86
@@ -131,20 +155,42 @@ transcript_json = client.get_transcript_json(job.id)
131
155
132
156
# or as a python object
133
157
transcript_object = client.get_transcript_object(job.id)
158
+
159
+ # or if you requested transcript translation(s)
160
+ transcript_object = client.get_translated_transcript_object(job.id,' es' )
134
161
```
135
162
136
163
Both the json and object forms contain all the formation outlined in the response
137
164
of the [ Get Transcript] ( https://docs.rev.ai/api/asynchronous/reference/#operation/GetTranscriptById ) endpoint
138
165
when using the json response schema. While the text output is a string containing
139
166
just the text of your transcript
140
167
168
+ ### Getting transcript summary
169
+
170
+ If you requested transcript summary, you can retrieve it as plain text or structured object:
171
+
172
+ ``` python
173
+ # as text
174
+ summary = client.get_transcript_summary_text(job.id)
175
+
176
+ # as json
177
+ summary = client.get_transcript_summary_json(job.id)
178
+
179
+ # or as a python object
180
+ summary = client.get_transcript_summary_object(job.id)
181
+
182
+ ```
141
183
### Getting captions output
142
184
143
185
You can also get captions output from the SDK. We offer both SRT and VTT caption formats.
144
186
If you submitted your job as speaker channel audio then you must also provide a ` channel_id ` to be captioned:
145
187
146
188
``` python
147
189
captions = client.get_captions(job.id, content_type = CaptionType.SRT , channel_id = None )
190
+
191
+ # or if you requested transcript translation(s)
192
+ captions = client.get_translated_captions(job.id, ' es' )
193
+
148
194
```
149
195
150
196
### Streamed outputs
0 commit comments