generate static method

Future<void> generate({
  1. required String accessToken,
  2. required String text,
  3. required String filePath,
})

Generates speech from provided text and save audio to the provided file path.

If Speech generation fails, it throws an Exception.

Implementation

static Future<void> generate(
    {required String accessToken,
    required String text,
    required String filePath}) async {
  return HuggingFaceService.generateSpeech(accessToken, text, filePath);
}