flutter_tai 0.0.4

  • Readme
  • Changelog
  • Example
  • Installing
  • 42

flutter_tai #

腾讯云智聆口语评测(Smart Oral Evaluation,SOE)是腾讯云推出的语音评测产品,是基于口语类教育培训场景和腾讯云的语音处理技术,应用特征提取、声学模型和语音识别算法,为儿童和成人提供高准确度的口语发音评测。支持单词、句子和段落模式的评测,多维度反馈口语表现,可广泛应用于中文及英语口语类教学中。

Getting Started #

import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:flutter_tai/flutter_tai.dart';

import 'PermissionUtil.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  _MyAppState createState() => _MyAppState();

class _MyAppState extends State<MyApp> {
  FlutterTai _tai = FlutterTai();
  int _volume = 0;
  bool _recoding = false;
  double _progress = 0;

  void initState() {
    _tai.responseFromProgress.listen((data) {
      _volume = data.volume;
      _progress = _volume / 120;
      setState(() {});
      print("音量:${data.volume} $_progress}");
    _tai.responseFromStop.listen((data) {
      setState(() {
        _recoding = false;
    _tai.responseFromResult.listen((data) {
    _tai.responseFromEvaluationData.listen((data) {
          "EvaluationData:err:${data.err} ret:${data.ret} end:${data.end} seqId:${data.seqId} ");
  Future<void> record() async {
    _recoding = true;
    setState(() {});
//   Android SDK 参考https://cloud.tencent.com/document/product/884/31870
    try {
      await _tai.record("appId", "secretId",
          "secretKey", "how are you");
    } on PlatformException {}

  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        body: Center(
            child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
              value: _progress,
              child: Text(_recoding ? "停止录音" : "开始录音"),
              onPressed: record,
              color: Theme.of(context).primaryColor,

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

0.0.1 #

  • TODO: Describe initial release.


flutter_tai_example #

Demonstrates how to use the flutter_tai plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

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

  flutter_tai: ^0.0.4

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support 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:flutter_tai/flutter_tai.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Oct 22, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/flutter_tai.dart. (-6.31 points)

Analysis of lib/flutter_tai.dart reported 13 hints, including:

line 19 col 38: Close instances of dart.core.Sink.

line 25 col 36: Close instances of dart.core.Sink.

line 31 col 34: Close instances of dart.core.Sink.

line 36 col 44: Close instances of dart.core.Sink.

line 49 col 10: This function has a return type of 'Future', but doesn't end with a return statement.

Format lib/response.dart.

Run flutter format to format lib/response.dart.

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.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
uuid ^2.0.0 2.0.2
Transitive dependencies
charcode 1.1.2
collection 1.14.11 1.14.12
convert 2.1.1
crypto 2.1.3
meta 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies