whisper_dart 0.0.0 copy "whisper_dart: ^0.0.0" to clipboard
whisper_dart: ^0.0.0 copied to clipboard

outdated

Openai library whisper unofficial for recognition audio to text without heavy gpu, support server side and client side.

Whisper #

Whisper library speech to text offline,

Refrence #

  1. Whisper-Official
  2. Whisper.cpp

Install #

dart pub add whisper_dart

Compile library #

git clone https://github.com/azkadev/whisper_dart.git
cd whisper.cpp
chmod 777 compile.sh
bash ./download-ggml-model.sh base.en
./compile.sh

Tested on #

  1. OS: Ubuntu 20.4 CPU: Amd Ryzen 5500u Ram: 8gb

example #

import 'dart:convert';
import 'dart:ffi';

import 'package:ffi/ffi.dart';
import 'package:galaxeus_lib/galaxeus_lib.dart';
import 'package:whisper_dart/whisper_dart.dart';
void main(List<String> arguments) {
  Whisper whisper = Whisper(
    whisperLib: "whisper.cpp/whisper.so",
  );
  DateTime time = DateTime.now();
  try {
    var res = whisper.transcribe(
      args: WhisperArgs([
        "-m", "models/ggml-model-whisper-small.bin", "-f", "samples/indonesia.wav", "--language", "id"
      ]),
    );
    print(res.toString());
    print(convertToAgo(time.millisecondsSinceEpoch));
  } catch (e) {
    print(e);
  }
}

result

{
  "@type":"transcribe",
  "text":" Baby, aku pergi dulu ya, babai sayang. *muach*"
}

Testing #

import 'dart:convert';
import 'dart:ffi';
import 'package:ffi/ffi.dart';
import 'package:whisper_dart/whisper_dart.dart';
void main(List<String> arguments) {
  Whisper whisper = Whisper(whisperLib: "path_to/whisper.so");
  print(whisper.test);
}

result

{
  "@type":"ok",
  "text":" And so my fellow Americans, ask not what your country can do for you, ask what you can do for your country."
}

Language Support

38
likes
0
pub points
69%
popularity

Publisher

unverified uploader

Openai library whisper unofficial for recognition audio to text without heavy gpu, support server side and client side.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

ffi, galaxeus_lib, universal_io

More

Packages that depend on whisper_dart