We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a40e767 commit 88e326aCopy full SHA for 88e326a
1 file changed
videodb/video.py
@@ -249,17 +249,20 @@ def get_transcript_text(
249
def generate_transcript(
250
self,
251
force: bool = None,
252
+ language_code: Optional[str] = None,
253
) -> str:
254
"""Generate transcript for the video.
255
256
:param bool force: Force generate new transcript
257
+ :param str language_code: (optional) Language code of the video
258
:return: Full transcript text as string
259
:rtype: str
260
"""
261
transcript_data = self._connection.post(
262
path=f"{ApiPath.video}/{self.id}/{ApiPath.transcription}",
263
data={
264
"force": True if force else False,
265
+ "language_code": language_code,
266
},
267
)
268
transcript = transcript_data.get("word_timestamps", [])
0 commit comments