From b7d8561d8187c5560fab8ff19b03fa72e49848b7 Mon Sep 17 00:00:00 2001 From: sugoidogo Date: Mon, 27 Jan 2025 16:11:10 +0000 Subject: [PATCH] add jsdoc types for voices --- static/twitch-polly.mjs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/static/twitch-polly.mjs b/static/twitch-polly.mjs index 6cced41..036f120 100644 --- a/static/twitch-polly.mjs +++ b/static/twitch-polly.mjs @@ -1,3 +1,14 @@ +/** + * @typedef {Object} Voice + * @property {Array | null} AdditionalLanguageCodes + * @property {String} Gender + * @property {String} Id + * @property {String} LanguageCode + * @property {String} LanguageName + * @property {String} Name + * @property {Array} SupportedEngines + */ + /** Returns the list of voices that are available for use when requesting speech synthesis. Each voice speaks a specified language, is either male or female, and is identified by an ID, which is the ASCII version of the voice name. @@ -20,7 +31,7 @@ For instance, if you request all languages that use US English (es-US), and there is an Italian voice that speaks both Italian (it-IT) and US English, that voice will be included if you specify yes but not if you specify no. @param {dict} auth_headers your application's authorization headers used when making Twitch API requests -@returns {Promise} An array of dicts with the following properties: +@returns {Promise} An array of dicts with the following properties: Gender (string) – Gender of the voice.