Closed jtkeyva closed 1 year ago
Hello, Thanks for you proposals !
For the timestamps I will look at the possibilities when I have available time !
For the translation there is a parameter but I didn't test it for the moment
@jtkeyva I published a new version with both of your proposals. You can use version 1.0.0
and use it like the README.md exemple :
// Prepare wav file
final Directory documentDirectory = await getApplicationDocumentsDirectory();
final ByteData documentBytes = await rootBundle.load('assets/jfk.wav');
final String jfkPath = '${documentDirectory.path}/jfk.wav';
await File(jfkPath).writeAsBytes(
documentBytes.buffer.asUint8List(),
);
// Begin whisper transcription
final Whisper whisper = Whisper(
model: WhisperModel.base,
);
final String? whisperVersion = await whisper.getVersion();
print(whisperVersion);
final String transcription = await whisper.transcribe(
transcribeRequest: TranscribeRequest(
audio: jfkPath,
isTranslate: true, // Translate result from audio lang to english text
isNoTimestamps: false, // Get segments in result
splitOnWord: true, // Split segments on each word
),
);
print(transcription);
@krikristoophe awesome thank you very much!!
Great to see this in an easy to use ready to go package!
Is it possible to output word-level timestamps etc like in the examples? How about translating? Thanks