UNPKG

sherpa-onnx-node

Version:

Speech-to-text, text-to-speech, speaker diarization, and speech enhancement using Next-gen Kaldi without internet connection

27 lines (23 loc) 557 B
const addon = require('./addon.js'); class OfflinePunctuation { constructor(config) { this.handle = addon.createOfflinePunctuation(config); this.config = config; } addPunct(text) { return addon.offlinePunctuationAddPunct(this.handle, text); } } class OnlinePunctuation { constructor(config) { this.handle = addon.createOnlinePunctuation(config); this.config = config; } addPunct(text) { return addon.onlinePunctuationAddPunct(this.handle, text); } } module.exports = { OfflinePunctuation, OnlinePunctuation, }