{"size": 635, "ext": "js", "max_stars_repo_path": "textToSpeech/index.js", "max_stars_repo_name": "project-anuvaad/COMET-Vendors", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "textToSpeech/index.js", "max_issues_repo_name": "project-anuvaad/COMET-Vendors", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "textToSpeech/index.js", "max_forks_repo_name": "project-anuvaad/COMET-Vendors", "max_forks_repo_forks_event_min_datetime": "2021-03-01T09:51:23.000Z", "max_forks_repo_forks_event_max_datetime": "2021-03-01T09:51:23.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 19.2424242424, "max_line_length": 59, "alphanum_fraction": 0.5952755906}
const { generateTextToSpeech } = require("./textToSpeech");
class TextToSpeechService {
  convertTextToSpeech(
    {
      speakersProfile,
      speakerNumber,
      langCode,
      text,
      audioSpeed,
      outputFormat,
    },
    audioPath
  ) {
    return new Promise((resolve, reject) => {
      generateTextToSpeech({
        speakersProfile,
        speakerNumber,
        langCode,
        text,
        audioSpeed,
        outputFormat,
        audioPath,
      })
        .then(resolve)
        .catch(reject);
    });
  }
}

const textToSpeechService = new TextToSpeechService();

module.exports = textToSpeechService;
