openapi: 3.0.0 info: title: (LEGACY) LOVO OPEN API version: "1.0" description: "THIS IS CURRENTLY UNMAINTAINED. PLEASE USE OUR NEW GENNY API → https://docs.genny.lovo.ai \n\n\nThe LOVO API is organized around REST. Our API has predictable\nresource - oriented URLs, accepts JSON - encoded request bodies,\nreturns JSON - encoded responses, and uses standard HTTP response\ncodes, authentication, and verbs.\n\n# Base URL\n\n```\nhttps://api.lovo.ai\n```\n\n# Authentication\nThe LOVO API uses API keys to authenticate requests. \nYou can view and manage your API keys in the Account tab. \nYour API keys carry many privileges, so be sure to keep them secure! \nDo not share your secret API keys in publicly accessible areas \nsuch as GitHub, client-side code, and so forth.\n\n# Errors\nLOVO uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the `2xx` range indicate success. Codes in the `4xx` range indicate an error that failed given the information provided (e.g., a required parameter was omitted, etc.). Codes in the `5xx` range indicate an error with LOVO's servers.\n\n## Attributes\n\n| Attribute Name | Type | Description |\n|---------------|------|-------------|\n| statusCode | number | Server's status code |\n| success | boolean | result of api request |\n| type | string | error types |\n| timestamp | string | server timestamp |\n| error | string | error message |\n\nErrors with status code `400` include `type` field that briefly explains the error reported. Detailed explanations of error types are described below.\n\n### Error Types\n\n| Error Type Name | Description |\n|-----------------|-------------|\n| KEY_ERROR | Invalid API Key |\n| KEY_EXPIRED_ERROR | This key is exired. |\n| KEY_EXCEEDED_FREE_TRIAL_COUNT | This key exceeded API call count for free trial (100 calls) |\n| KEY_FIND_USER_ERROR | This key can't find user. |\n| SPEED_TYPE_ERROR | The speed type must be number. |\n| SPEED_RANGE_ERROR | The speed value ranges from 0.5 to 1.5 in increments of 0.05. |\n| PAUSE_TYPE_ERROR | The pause type must be number. |\n| PAUSE_RANGE_ERROR | The pause value can be from 0 to 5.0 and be adjusted by 0.5 seconds. |\n| EMPHASIS_TYPE_ERROR | The emphasis type must be arrays of integer casted in string. ex. \"[1, 2, 3]\" |\n| EMPHASIS_RANGE_ERROR | The emphasis value is an array of indexes of the words to emphasize. |\n| VOICESKIN_ERROR | Speaker_id parameter is not valid. Please choose one voice skin at a time. |\n| TEXT_EMPTY_ERROR | Text field is empty. Please provide a string in the text field. |\n| TEXT_TYPE_ERROR | Text type must be string. |\n| TEXT_MAXLENGTH_ERROR | Text parameter is not valid. Maximum length of text is 500 characters. |\n" # contact: # email: Contact@lovo.ai # url: lovo.ai # name: LOVO termsOfService: "https://studio.lovo.ai/privacy" servers: - url: "https://api.lovo.ai" description: "LEGACY API" paths: conversion: parameters: [] post: summary: Conversion - Request Audio File description: "Converts text into human-like speech in more than 40 voices. With this easy-to-use API, you can create lifelike interactions with your users that transform customer service, device interaction, and other applications.\n\n**To test the voices, log onto LOVO Studio (https://studio.lovo.ai) ;with the same account credentials you used for LOVO API.**\n\n - **Go to the Voice Skin list on the main Workspace**\n - **Find the voice you'd like to listen to, and;**\n - **Click the \"speaker\" icon to hear the sample audio!**" operationId: post-v1-conversion x-codeSamples: - lang: cURL label: cURL source: "curl --location --request POST 'https://api.lovo.ai/v1/conversion' \\\n--header 'apiKey: YOUR_API_KEY' --header 'Content-Type: application/json' \\\n--data-raw '{\n \"text\": \"hello world! my name is Martha Sage\",\n \"speaker_id\": \"Martha Sage\",\n \"emphasis\": \"[0, 5]\",\n \"speed\": 1,\n \"pause\": 0\n}'\n" - lang: Javascript label: JS(Fetch) source: | const url = "https://api.lovo.ai/v1/conversion"; const data = { text: "hello world! my name is Martha Sage", speaker_id: "Martha Sage", emphasis: "[0, 5]", speed: 1, pause: 0, }; const option = { method: "POST", headers: { apiKey: "YOUR_API_KEY", // Your API key goes here "Content-Type": "application/json; charset=utf-8", }, body: JSON.stringify(data), }; fetch(url, option) .then((res) => res.arrayBuffer()) .then((buffer) => { // you can also download the audio file const blob = new Blob([buffer], { type: "audio/wav" }); const objUrl = URL.createObjectURL(blob); const a = document.createElement("a"); a.href = objUrl; a.download = "test.wav"; // create click event handler to revoke objectURL and remove this event handler const clickHandler = () => { setTimeout(() => { URL.revokeObjectURL(url); this.removeEventListener("click", clickHandler); }, 100); }; // add above event handler and click to download a.addEventListener("click", clickHandler); a.click(); console.log(`Audio content written to file ${filename}`) }) .catch((error) => console.log(error)); - lang: Python label: Python 3 source: | import requests import json ​ url = 'https://api.lovo.ai/v1/conversion' data = json.dumps({ "text": "hello world! my name is Martha Sage", "speaker_id": "Martha Sage", "emphasis": '[0, 5]', "speed": 1, "pause": 0 }) headers = { 'apiKey': 'YOUR_API_KEY', # Your API key goes here 'Content-Type': 'application/json; charset=utf-8' } res = requests.post(url, headers=headers, data=data) # you can also download the audio file outfile = 'test.wav' with open(outfile, 'wb') as f: f.write(res.content) ​ print(f'Audio content written to file "{outfile}"') responses: "200": description: OK content: audio/wav: schema: additionalProperties: false description: WAF file. type: object examples: SUCCESS: value: audio(.wav) file "400": description: Bad Request content: application/json: schema: type: object properties: success: type: boolean example: false description: Result of API request error: type: string description: Error message. Either requesting over 500 characters or sending invalid token type: type: string enum: - SPEED_TYPE_ERROR - SPEED_RANGE_ERROR - PAUSE_TYPE_ERROR - PAUSE_RANGE_ERROR - EMPHASIS_TYPE_ERROR - EMPHASIS_RANGE_ERROR - VOICESKIN_ERROR - TEXT_EMPTY_ERROR - TEXT_TYPE_ERROR - TEXT_MAXLENGTH_ERROR example: SPEED_TYPE_ERROR description: Error Types required: - success - error - type examples: SPEED_TYPE_ERROR: value: success: false type: SPEED_TYPE_ERROR error: The speed type must be number SPEED_RANGE_ERROR: value: success: false type: SPEED_RANGE_ERROR error: The speed value ranges from 0.5 to 1.5 in increments of 0.05. PAUSE_TYPE_ERROR: value: success: false type: PAUSE_TYPE_ERROR error: The pause type must be number. PAUSE_RANGE_ERROR: value: success: false type: PAUSE_RANGE_ERROR error: The pause value can be from 0 to 5.0 and be adjusted by 0.5 seconds. EMPHASIS_TYPE_ERROR: value: success: false type: EMPHASIS_TYPE_ERROR error: The emphasis type must be arrays of integer casted in string. ex. "[1, 2, 3]" EMPHASIS_RANGE_ERROR: value: success: false type: EMPHASIS_RANGE_ERROR error: The emphasis value is an array of indexes of the words to emphasize. VOICESKIN_ERROR: value: success: false type: VOICESKIN_ERROR error: Unavailable voice skin. TEXT_EMPTY_ERROR: value: success: false type: TEXT_EMPTY_ERROR error: Text field is empty. Please provide a string in the text field. TEXT_TYPE_ERROR: value: success: false type: TEXT_TYPE_ERROR error: Text type must be string. TEXT_MAXLENGTH_ERROR: value: success: false type: TEXT_MAXLENGTH_ERROR error: Maximum 500 characters. "401": description: Unauthorized content: application/json: schema: type: object properties: success: type: boolean error: type: string description: Error message. type: type: string description: Error Types enum: - KEY_ERROR - KEY_EXPIRED_ERROR - KEY_EXCEEDED_FREE_TRIAL_COUNT required: - success - error - type examples: KEY_ERROR: value: success: false type: KEY_ERROR error: Invalid API Key KEY_EXPIRED_ERROR: value: success: false type: KEY_EXPIRED_ERROR error: This key is expired. KEY_EXCEEDED_FREE_TRIAL_COUNT: value: success: false type: KEY_EXCEEDED_FREE_TRIAL_COUNT error: This key exceeded API call count for free trial (100 calls) "500": description: Internal Server Error content: application/json: schema: type: object properties: success: type: boolean error: type: string example: Internal Server Error. description: Error Message. type: type: string description: Errpr Types enum: - ML_SERVER_ERROR - SERVER_INTERNAL_ERROR examples: INTERNAL_SERVER_ERROR: value: success: false error: Internal Server Error. ML_SERVER_ERROR: value: success: false error: Internal Server Error. "520": description: Key Find User Error content: application/json: schema: type: object properties: success: type: boolean error: type: string description: Error message. type: type: string description: Error Types enum: - Key Find User Error required: - success - error - type examples: KEY_FIND_USER_ERROR: value: success: false type: KEY_FIND_USER_ERROR error: This key can't find user. requestBody: content: application/json: schema: type: object properties: text: type: string description: Text to be converted. Max length is 500 characters. example: hello my name is Joaquin Johnson maxLength: 500 speaker_id: type: string description: "Here is the list of Voice Skin IDs to choose from. Please choose one at a time. Only the voice skins with an asterisk(*) can accept emphasis parameter." enum: - "Shane Walter HD" - "Richard Hall" - "*Jemima Taylor HD" - "*Charlie Carter HD" - "Savannah Pérez" - "Emilia González" - "Jose López" - "Xu Mei Chen" - "Zheng Ge" - "Genji Fukurama" - "Mike Champaign" - "Claire Loveworth" - "Minji Kim" - "Minho Lee" - "Angelina Garcia" - "Sergio Casillas" - "*Rose Baker" - "*Victoria Douglas" - "*Charlie Carter" - "Shane Walter" - "*Sharon Huang" - "*Laura Agarwal" - "*Liz Olsen" - "Binh Pan" - "Hahn P." - "Danh F." - "Vi N." - "Olena H." - "Derya O." - "Hiranur B." - "Zehra M." - "Bayram C." - "Elif O." - "Ebba S." - "Jirina F." - "Lia Abakumov" - "Ivan Chkalov" - "Anna Kravchuk" - "Alexei Syomin" - "Natalia Sychyov" - "Ines G." - "Joao F." - "Christian M." - "Matilde R." - "Lupe N." - "Alicja I." - "Maja L." - "Kacper F." - "Jakub H." - "Zuzanna P." - "Anita T." - "Aksel A." - "Elisabeth O." - "Liam N." - "Berit K." - "Fang Xi" - "Chen Chen" - "Jia Qiao" - "Mingzhu Bai" - "Yong Zheng" - "Wei Chen" - "Chenhua Shen" - "Chanhee Kwon" - "Jio Lee" - "Soyoung Chun" - "Jisoo Paek" - "Ten Kenoshi" - "Daichi Gonoyashi" - "Sakura Takahashi" - "Himari Honda" - "Mario Briolio" - "Marco Petroni" - "Siena Mancini" - "Ariana Gallo" - "Gazala D." - "Kabir K." - "Harsh G." - "Fulki S." - "Jazmin Y." - "Deepa Patel" - "Chandran Dayal" - "Abeer Puri" - "Ahana Singh" - "Penelope A." - "Ilse Schäfer" - "Luca Müller" - "Ilkai Graf" - "Katrin Schmidt" - "Gunter Albrecht" - "Petra Maier" - "Manon Tourneur" - "Victor Choquet" - "Gigi Duret" - "Henry Ouvrard" - "Camille Boisselot" - "Blaise Pasquier" - "Clara Renaudin" - "Jacques Moineau" - "Alex Ponce" - "Valda M." - "Angel G." - "Sabrina Inkwell" - "Georgina Louise" - "Zac Packer" - "Kera Connor" - "Paul Zinger" - "Tom Joseph" - "Ed Bolinger" - "Ophelia Webster" - "Adama Pearson" - "Jess Thomas" - "Kena Rao" - "Nikhil Patel" - "Satchi Gokhale" - "Ayesha Chauhan" - "Keegan Oneal" - "Ava Sutton" - "Oliver Hilfinger" - "Mia King" - "Sjaan Van de Berg" - "Evi De Vries" - "Daan Bakker" - "Thijs Jansen" - "Mila De Vries" - "Ditte J." - "Jolana N." - "Ekram G." - "Abbas A." - "Aaliyah Sarraf" - "*Kenny Marlowe" - "*Jemima Taylor" - "*Joey Holland HD" - "Ryan Donnohue-James" - "Carl White" - "Bill Bosma" - "*Sally Coleman HD" - "*Kristen Hennington" - "Ian Kristopher" - "*Natasha Williams" - "Rosey Wilder" - "Amélie Lefebre" - "*Martha Sage" - "Toshio Mizuno" - "Mickay Rat" - "Chad Taylor" - "Stuart Longstaff" - "Cody Stewart" - "Austin Hopkins" - "Tim Calkney" - "Joey Holland" - "Sally Coleman" - "Kim Ferdowsi" - "Luna Sidana" - "Jeff Lee" - "Caroline Hughes" - "Saoirse O'Conor" - "Ronald Brooks" - "Glenn da Jolla" - "Ian Kensington" - "Jess Jones" - "Amy Chang" - "Bryce Stone" - "Dick Cransen" - "Tess Uberville" - "Karen Sidharta-Jones" - "Thalia LeChamp" - "Jean Reyes" - "Dajun Yoo" - "Pam Flemming" - "Joy Sembhi" - "Joaquin Johnson" - "Anita Bloch" - "Cameron Sorenson" - "Jamal Singh" - "Tonia Nguyen" - "Marc Gronski" - "Nell Diallo" example: Joaquin Johnson emphasis: type: array description: "Indexes of the words to emphasize. The index starts at 0. The index will be given to each word split by period(.), question mark(?), exclamation mark(!). You have to stringify this array before sending a request to the server." example: - 2 - 4 items: {} pause: type: number description: Speechless time(seconds) at the end of the speech. The pause value can be from 0 to 5.0 and be adjusted by 0.5 seconds. The default value is 0. example: 5 maximum: 5 minimum: 0 speed: type: number description: Speaking speed of the voice skin. The speed value ranges from 0.5 to 1.5 in increments of 0.05. The default value is 1. example: 1 minimum: 0.5 maximum: 1.5 required: - text - speaker_id examples: example: value: text: hello my name is Joaquin Johnson speaker_id: Joaquin Johnson emphasis: "[2, 4]" pause: 5 speed: 1 description: "" parameters: [] tags: - conversion components: schemas: {} securitySchemes: apiKey: name: apiKey type: apiKey in: header security: - apiKey: []