f"Couldn't save created transcription entity in local cache: {e}"
)
returntranscription_ent
deflist_transcription_entities(
self,
transcription:str,
page:int=None,
page_size:int=None,
worker_version=None,
):
"""
List transcriptions on entities
This method not work with the cache
:param transcription str: UUID of the existing transcription.
:param page int: A page number within the paginated result set.
:param page_size int: Number of results to return per page.
:param worker_version str or bool: Restrict to entities created by a worker version with this UUID. Set to False to look for manually created transcriptions.
"""
params={}
asserttranscriptionandisinstance(
transcription,str
),"transcription shouldn't be null and should be of type str"
ifpageisnotNone:
assertpageandisinstance(
page,int
),"page shouldn't be null and should be of type integer"
params[page]=page
ifpage_sizeisnotNone:
assertpage_sizeandisinstance(
page_size,int
),"page_size shouldn't be null and should be of type integer"
params[page_size]=page_size
ifworker_versionisnotNone:
assertisinstance(
worker_version,(str,bool)
),"worker_version should be of type str or bool"
ifisinstance(worker_version,bool):
assert (
worker_versionisFalse
),"if of type bool, worker_version can only be set to False"