voicetext 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 46

voicetext.dart #

pub package Build Status

Usage #

A simple usage example:

import 'package:voicetext/voicetext.dart';

main() {
  var api = VoiceTextApi('YOUR API KEY');
  var data = await api.postTts('サンプルテキスト', 'hikari');
}

1.0.0 #

  • Initial version

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);
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  voicetext: ^1.0.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:voicetext/voicetext.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
46
Learn more about scoring.

We analyzed this package on Jul 10, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
http ^0.12.0+4 0.12.1
Transitive dependencies
charcode 1.1.3
collection 1.14.13 1.15.0-nullsafety
http_parser 3.1.4
meta 1.2.2 1.3.0-nullsafety
path 1.7.0
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.2.0 1.3.0-nullsafety
Dev dependencies
pedantic ^1.8.0 1.9.2
test ^1.6.0