Skip to content

Commit 88e326a

Browse files
committed
feat: add language_code param to generate_transcript
1 parent a40e767 commit 88e326a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

videodb/video.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,17 +249,20 @@ def get_transcript_text(
249249
def generate_transcript(
250250
self,
251251
force: bool = None,
252+
language_code: Optional[str] = None,
252253
) -> str:
253254
"""Generate transcript for the video.
254255
255256
:param bool force: Force generate new transcript
257+
:param str language_code: (optional) Language code of the video
256258
:return: Full transcript text as string
257259
:rtype: str
258260
"""
259261
transcript_data = self._connection.post(
260262
path=f"{ApiPath.video}/{self.id}/{ApiPath.transcription}",
261263
data={
262264
"force": True if force else False,
265+
"language_code": language_code,
263266
},
264267
)
265268
transcript = transcript_data.get("word_timestamps", [])

0 commit comments

Comments
 (0)