voicetext 1.0.0 copy "voicetext: ^1.0.0" to clipboard
voicetext: ^1.0.0 copied to clipboard

VoiceText Web API library for Dart-lang.

example/voicetext_example.dart

import 'dart:io';

import 'package:voicetext/voicetext.dart';

void main() async {
  var key = Platform.environment['VOICETEXT_API_KEY'];
  if (key == null) {
    throw Exception('VOICETEXT_API_KEY is empty!!');
  }
  var api = VoiceTextApi(key);

  var text = 'Dart言語を使ったVoiceTextのAPIライブラリのサンプルコードです。';

  try {
    var audio = await api.postTts(text, 'hikari');
    File('example.wav').writeAsBytesSync(audio);
    print('Saved file "exsample.wav"');
  } catch (e) {
    print(e);
  }
}
1
likes
30
pub points
0%
popularity

Publisher

unverified uploader

VoiceText Web API library for Dart-lang.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

http

More

Packages that depend on voicetext