public class TlpApi
void | __construct(mixed apiUser, mixed apiKey, mixed apiExpire) TlpApi Class constructor method |
void | gen_speech_editor_url(string id, string lang, string authorId, string authorName, int authorConf, int expire) Returns a valid URL link for calling TLP Player given input parameters. |
void | gen_text_editor_url(string id, string lang, string authorId, string authorName, int authorConf, int expire) Returns a valid URL link for calling TLP Player given input parameters. |
void | speech_edit_history(string id, mixed hash) Returns a list of all edit sessions carried out over an specific Media ID. |
void | speech_end_session(string id, string sessionId, string authorId, string authorName, int authorConf, int force, int regenerate, mixed hash) Ends an editing session. |
void | speech_get(string id, string lang, int format, int session_id, int seg_filt_policy, int sel_data_policy, mixed hash) Returns a subtitles file for a given media ID and language in different formats. |
void | speech_ingest_cancel(string id, mixed hash) Cancel an upload file being processed |
void | speech_ingest_delete(string id, mixed hash) Delete existing media |
void | speech_ingest_new(string title, string id, string lang, array requested_langs, mixed mediaFile, array slidesFile, array subtitlesFile, array attachmentFiles, date date, bool from_webui) Creates a Media Package in a temporal directory and sends it to /ingest/new API interface. |
void | speech_ingest_update(string id, mixed manifest_json, mixed hash) Update existing media - Re-generate trancriptions/translations - Request new translations |
void | speech_langs(string id, mixed hash) Returns a list of subtitles and languages available for a given media ID in JSON format. |
void | Returns a list with information of all existing media in JSON format. |
void | speech_metadata(string id, mixed hash) Returns metadata information of a given media ID in JSON format. |
void | speech_mod(string id, string sessionId, string authorId, string authorName, int authorConf, array mods, mixed hash) Modifies the captions of a given media ID and language with the changes provided. |
void | Returns a list of all edit sessions for all API user's media files that are pending to be revised. |
void | speech_session_status(string id, string sessionId, string authorId, string authorName, int authorConf, int alive, mixed hash) Gets the status of an editing session. |
void | speech_start_session(string id, string authorId, string authorName, int authorConf, str sessionType, mixed hash) Starts an editing session. |
void | speech_status(string upload_id) Returns the status of an uploaded media in JSON format. |
void | Returns a list with all available ASR, MT and TTS systems in JSON format. |
void | Returns a list with information of all uploaded media in JSON format. |
void | text_edit_history(string id) Returns a list of all edit sessions carried out over an specific Document ID. |
void | text_end_session(string id, string sessionId, string authorId, string authorName, int authorConf, int force, string expire) Ends an opened editing session. |
void | text_get(string id, string lang, int format, int session_id, int sel_data_policy, string expire) Returns a translation file for a given document ID and language in different formats. |
void | text_ingest_cancel(string id) Cancel an upload file being processed |
void | text_ingest_delete(string id) Delete existing media |
void | text_ingest_new(array titles, array ids, string lang, array requested_langs, array docFiles, bool from_webui) Creates a Document Package in a temporal directory and sends it to /ingest/new API interface. |
void | text_langs(string id) Returns a list of translations available for a given document ID in JSON format. |
void | Returns a list with information of all existing documents in JSON format. |
void | text_metadata(string id) Returns metadata information of a given document ID in JSON format. |
void | text_mod(string id, string sessionId, string authorId, string authorName, int authorConf, array mods, string expire) Send and commit modifications of a translation file made by a user under a session ID returned by /start_session interface. |
void | Returns a list of all edit sessions for all API user's document files that are pending to be revised. |
void | text_session_status(string id, string sessionId, string authorId, string authorName, int authorConf, int alive, string expire) Returns the current status of the given session ID. |
void | text_start_session(string id, string authorId, string authorName, int authorConf, string expire) Starts an editing session to send and commit modifications of a translated document file. |
void | text_status(string upload_id) Returns the status of an uploaded document in JSON format. |
void | Returns a list with all available MT systems in JSON format. |
void | Returns a list with information of all uploaded documents in JSON format. |
public void __construct(mixed apiUser, mixed apiKey, mixed apiExpire)
TlpApi Class constructor method
public void gen_speech_editor_url(string id, string lang, string authorId, string authorName, int authorConf, int expire)
Returns a valid URL link for calling TLP Player given input parameters.
Parameters | id - the ID of the media. | lang - the language code of the captions. | authorId - user name of user doing the changes. | authorName - name of user doing the changes. | authorConf - integer from 0 to 100 indicating the user confidence. | expire - expire date of this URL in UNIX timestamp format. |
---|
public void gen_text_editor_url(string id, string lang, string authorId, string authorName, int authorConf, int expire)
Returns a valid URL link for calling TLP Player given input parameters.
Parameters | id - the ID of the media. | lang - the language code of the captions. | authorId - user name of user doing the changes. | authorName - name of user doing the changes. | authorConf - integer from 0 to 100 indicating the user confidence. | expire - expire date of this URL in UNIX timestamp format. |
---|
public void speech_edit_history(string id, mixed hash)
Returns a list of all edit sessions carried out over an specific Media ID.
Parameters | id - the media ID of the media. |
---|
public void speech_end_session(string id, string sessionId, string authorId, string authorName, int authorConf, int force, int regenerate, mixed hash)
Ends an editing session.
Parameters | id - the ID of the media for which the API should modify the captions. | sessionId - session ID. | authorId - user name of user submitting the changes. | authorName - name of user submitting the changes. | authorConf - integer from 0 to 100 indicating the user confidence. | force - force end session when user and/or author_id are not the owners. | regenerate - request regeneration of subtitles and/or synthesized audiotracks immediately after closing the session. |
---|
public void speech_get(string id, string lang, int format, int session_id, int seg_filt_policy, int sel_data_policy, mixed hash)
Returns a subtitles file for a given media ID and language in different formats.
Parameters | id - the ID of the media for which the API should return the captions. | lang - the language code of the captions. | format - the format ID of the captions (check documentation) | session_id - subtitle modifications from the given session ID (check documentation) | seg_filt_policy - segment text filtering policy (check documentation) | sel_data_policy - subtitle contents to be returned (check documentation) |
---|
public void speech_ingest_cancel(string id, mixed hash)
Cancel an upload file being processed
Parameters | id - the Upload ID returned by the /ingest interface of the media to be canceled. |
---|
public void speech_ingest_delete(string id, mixed hash)
Delete existing media
Parameters | id - the media ID of the media to be deleted. |
---|
public void speech_ingest_new(string title, string id, string lang, array requested_langs, mixed mediaFile, array slidesFile, array subtitlesFile, array attachmentFiles, date date, bool from_webui)
Creates a Media Package in a temporal directory and sends it to /ingest/new API interface.
Returns a string if an error ocurred, or a JSON string (/ingest/new response text) if the ingest process was successful.
Parameters | title - title of the media being ingested. | id - ID media will have once ingested. | lang - language code of the media audio. | requested_langs - list of languages for which captions will be generated. | mediaFile - DOLLAR_FILES PHP variable with uploaded media file or media file URL string. | slidesFile - DOLLAR_FILES PHP variable with uploaded slides file (optional). | subtitlesFile - DOLLAR_FILES PHP variable with uploaded subtitles file (optional). | attachmentFiles - DOLLAR_FILES PHP variable with multiple attachment files (optional). | date - ingestion date in d/m/y format. |
---|
public void speech_ingest_update(string id, mixed manifest_json, mixed hash)
Update existing media - Re-generate trancriptions/translations - Request new translations
Parameters | id - the media ID of the media to be updated. |
---|
public void speech_langs(string id, mixed hash)
Returns a list of subtitles and languages available for a given media ID in JSON format.
Parameters | id - the ID of the media for which the API should return a list of available captions. |
---|
public void speech_list()
Returns a list with information of all existing media in JSON format.
public void speech_metadata(string id, mixed hash)
Returns metadata information of a given media ID in JSON format.
Parameters | id - the ID of the media for which the API should return metadata information. |
---|
public void speech_mod(string id, string sessionId, string authorId, string authorName, int authorConf, array mods, mixed hash)
Modifies the captions of a given media ID and language with the changes provided.
Parameters | id - the ID of the media for which the API should modify the captions. | sessionId - the editing session ID. | authorId - user name of user submitting the changes. | authorName - name of user submitting the changes. | authorConf - integer from 0 to 100 indicating the user confidence. | mods - list of changes (check documentation) |
---|
public void speech_revisions()
Returns a list of all edit sessions for all API user's media files that are pending to be revised.
public void speech_session_status(string id, string sessionId, string authorId, string authorName, int authorConf, int alive, mixed hash)
Gets the status of an editing session.
Parameters | id - the ID of the media for which the API should modify the captions. | sessionId - session ID. | authorId - user name of user submitting the changes. | authorName - name of user submitting the changes. | authorConf - integer from 0 to 100 indicating the user confidence. | alive - 0 for only retrieving, 1 to also update session status |
---|
public void speech_start_session(string id, string authorId, string authorName, int authorConf, str sessionType, mixed hash)
Starts an editing session.
Parameters | id - the ID of the media for which the API should modify the captions. | authorId - user name of user submitting the changes. | authorName - name of user submitting the changes. | authorConf - integer from 0 to 100 indicating the user confidence. |
---|
public void speech_status(string upload_id)
Returns the status of an uploaded media in JSON format.
Parameters | upload_id - the ID of the uploaded media for which the API should return media status. |
---|
public void speech_systems()
Returns a list with all available ASR, MT and TTS systems in JSON format.
public void speech_uploadslist()
Returns a list with information of all uploaded media in JSON format.
public void text_edit_history(string id)
Returns a list of all edit sessions carried out over an specific Document ID.
Parameters | id - the document ID. |
---|
public void text_end_session(string id, string sessionId, string authorId, string authorName, int authorConf, int force, string expire)
Ends an opened editing session.
Parameters | id - the ID of the media for which the API should modify the captions. | sessionId - session ID. | authorId - user name of user submitting the changes. | authorName - name of user submitting the changes. | authorConf - integer from 0 to 100 indicating the user confidence. | force - force end session when user and/or author_id are not the owners. | expire - expiration date UNIX timestamp of the request. |
---|
public void text_get(string id, string lang, int format, int session_id, int sel_data_policy, string expire)
Returns a translation file for a given document ID and language in different formats.
Parameters | id - the document ID | lang - the language code of the translation. | format - the format ID of the document (check documentation) | session_id - translation modifications from the given session ID (check documentation) | sel_data_policy - translation contents to be returned (check documentation) | expire - expire date in UNIX timestamp format. |
---|
public void text_ingest_cancel(string id)
Cancel an upload file being processed
Parameters | id - the Upload ID returned by the /ingest interface of the document to be canceled. |
---|
public void text_ingest_delete(string id)
Delete existing media
Parameters | id - the document ID. |
---|
public void text_ingest_new(array titles, array ids, string lang, array requested_langs, array docFiles, bool from_webui)
Creates a Document Package in a temporal directory and sends it to /ingest/new API interface.
Returns a string if an error ocurred, or a JSON string (/ingest/new response text) if the ingest process was successful.
Parameters | titles - titles of the documents being ingested. | ids - IDs documents will have once ingested. | lang - language code of ingested documents. | requested_langs - list of languages for which translations will be generated. | docFiles - array of DOLLAR_FILES PHP variable with uploaded document files or file URL strings. |
---|
public void text_langs(string id)
Returns a list of translations available for a given document ID in JSON format.
Parameters | id - the ID of the document for which the API should return a list of available translations. |
---|
public void text_list()
Returns a list with information of all existing documents in JSON format.
public void text_metadata(string id)
Returns metadata information of a given document ID in JSON format.
Parameters | id - the ID of the document for which the API should return metadata information. |
---|
public void text_mod(string id, string sessionId, string authorId, string authorName, int authorConf, array mods, string expire)
Send and commit modifications of a translation file made by a user under a session ID returned by /start_session interface.
Parameters | id - the ID of the media for which the API should modify the captions. | sessionId - the editing session ID. | authorId - user name of user submitting the changes. | authorName - name of user submitting the changes. | authorConf - integer from 0 to 100 indicating the user confidence. | mods - list of changes (check documentation) | expire - expire date of the request in UNIX timestamp. |
---|
public void text_revisions()
Returns a list of all edit sessions for all API user's document files that are pending to be revised.
public void text_session_status(string id, string sessionId, string authorId, string authorName, int authorConf, int alive, string expire)
Returns the current status of the given session ID. If it is alive, it updates the last alive timestamp (last_update output key). This interface is commonly used to avoid the automatic end of session due to user inactivity.
Parameters | id - the ID of the media for which the API should modify the captions. | sessionId - session ID. | authorId - user name of user submitting the changes. | authorName - name of user submitting the changes. | authorConf - integer from 0 to 100 indicating the user confidence. | alive - alive message type. | expire - expiration date UNIX timestamp of the request. |
---|
public void text_start_session(string id, string authorId, string authorName, int authorConf, string expire)
Starts an editing session to send and commit modifications of a translated document file.
Parameters | id - the ID of the media for which the API should modify the captions. | authorId - user name of user submitting the changes. | authorName - name of user submitting the changes. | authorConf - integer from 0 to 100 indicating the user confidence. | expire - expiration date UNIX timestamp of the request. |
---|
public void text_status(string upload_id)
Returns the status of an uploaded document in JSON format.
Parameters | upload_id - the ID of the uploaded document for which the API should return current status. |
---|
public void text_systems()
Returns a list with all available MT systems in JSON format.
public void text_uploadslist()
Returns a list with information of all uploaded documents in JSON format.
TlpApi class