v1TextToVoiceCreatePreviewsPost method
Future<Response<VoicePreviewsResponseModel> >
v1TextToVoiceCreatePreviewsPost({
- V1TextToVoiceCreatePreviewsPostOutputFormat? outputFormat,
- String? xiApiKey,
- required VoicePreviewsRequestModel? body,
Generate A Voice Preview From Description @param output_format Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. @param xi-api-key Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website.
Implementation
Future<chopper.Response<VoicePreviewsResponseModel>>
v1TextToVoiceCreatePreviewsPost({
enums.V1TextToVoiceCreatePreviewsPostOutputFormat? outputFormat,
String? xiApiKey,
required VoicePreviewsRequestModel? body,
}) {
generatedMapping.putIfAbsent(
VoicePreviewsResponseModel,
() => VoicePreviewsResponseModel.fromJsonFactory,
);
return _v1TextToVoiceCreatePreviewsPost(
outputFormat: outputFormat?.value?.toString(),
xiApiKey: xiApiKey?.toString(),
body: body,
);
}