Repository navigation
Releases
Releases · atasoglu/seda
v1.4.0
Added
- Speech synthesis:
Synthesizer.from_pretrained("atasoglu/seda-tts-v0.1")(orSynthesizer(model_dir)),.synthesize(text)and.stream(text)run a seda VITS model with onnxruntime (no PyTorch). It takes a speaker, an emotion and a style, offers only the voices, styles and emotions a model'sconfig.jsonreleases, and uses each style's own settings (defaults_for,emotions_for; a whisper needs more variation than normal speech). Short sentences are read together up to 120 characters, the longest the model was trained on, with a short pause between longer pieces. It decodes in chunks, so the first samples arrive after one BERT pass, the encoder and half a chunk. Numbers, dates, currency and abbreviations are first written out in words with normalizer-tr (expand=True, Python 3.11 or newer). Needs the newttsextra. - Speech synthesis demo (
python -m sedalib.demo.tts; downloads seda-tts-v0.1,SEDA_TTS_MODELpicks a local directory or another repo): the audio plays on top in a waveform player, with the time to the first chunk and the RTF of each request; text, style and emotion below it (the speaker too when a model releases more than one), then one table of example sentences for the emotions and the whisper that sets the text, style and emotion together; the variation controls are under Advanced. A style switches to its own emotions and settings. write_wavwrites mono float samples as a 16-bit PCM WAV file.
Full Changelog: v1.3.0...v1.4.0
v1.3.0
Added
Stream.endpoint_silence: the pause that ends an utterance can be read and changed while the stream runs, for example from a setting in the application. It needs the VAD.- Keyword spotting demo: a Pause slider (0.05 to 1.5 s, default 0.25 s) that works while recording; the real-time factor (RTF) of each match and of the session; the legend, the model link and the recording clock moved or restyled; the page is laid out around a centered main column.
SEDA_PACKET_SECONDSsets how often the browser sends audio (default 0.05 s).
Changed
- The default
endpoint_silencewith the VAD is 0.75 s, up from 0.25 s, because of the fix below: the pause that was effective in 1.2.0 was about 0.75 s (the hangover plus 0.25 s), so by default nothing changes. Measured on FLEURS dev, with the old and the new default, the VAD reports the end of speech 1.00 s and 0.98 s after it (median of 100 recordings) and single-word keyword recall of the fast and balanced modes is the same (0.796 and 0.859). Shorter pauses are now really shorter: 0.6 s reports the end after 0.83 s, 0.25 s after 0.48 s, at the price of recall: 0.780 and 0.847 at 0.6 s, 0.754 and 0.812 at 0.25 s. Passendpoint_silenceor setStream.endpoint_silenceto choose.
Fixed
endpoint_silencewas not the pause it said: sherpa-onnx's Silero model keeps its own 0.5 s hangover (min_silence_duration), which was added to it. Nowendpoint_silenceis the whole pause.
Full Changelog: v1.2.0...v1.3.0
v1.2.0
Added
- Keyword spotting:
KeywordSpotter(recognizer, keywords).find(samples)for files and.stream()for live audio returnDetection(keyword, text, start, end, score, confidence). Matching is on spoken-form words; the last word may carry Turkish suffixes ("kamp" finds "kampa", not "kampanya").min_confidence(default 0.5) drops unsure detections. - Word timestamps and confidence:
Recognizer.transcribe_words()andUtterance.wordsreturnWord(text, start, end, score, confidence)in spoken form. Times count from the start of the stream acrosscut().confidenceis the probability that the word is right, calibrated per decoding setup on held-out speech; it isNonefor models without acalibration.jsonor for a setup it does not cover. seda-v0.2 and seda-v0.2-tiny cover thefast,balancedandaccuratemodes and the 0.16 and 0.32 s chunks (chunk=8and16), with and without the LM. - Keyword spotting demo (
python -m sedalib.demo.keywords): keywords as tags, live microphone with a waveform and a recording clock, and matches in a scrolling panel with their confidence. Two modes on seda-v0.2-tiny with 0.16 s steps: Low latency (greedy) gives a keyword's confidence as soon as the next word starts, since a word greedy search has written does not change; High accuracy (beam search + LM) gives it at the pause. A keyword shows up greyed out as soon as it is heard, and each match shows how soon after it was shown and final. Keywords and the minimum confidence can be changed while recording; a keyword counts from the moment it is added.SEDA_MODEL,SEDA_CHUNKandSEDA_ENDPOINT_SILENCEchange the defaults.
Full Changelog: v1.1.0...v1.2.0
v1.1.0
Added
- Support for the new seda-v0.2-tiny model: 4.5M parameters (seda-v0.2: 66M), distilled from seda-v0.2 for slow CPUs, phones and the browser. 10.51 WER on FLEURS-TR test in the
accuratemode, 11.24 inbalanced(Whisper small: 11.87). All modes work with it. chunk=8andchunk=16: 0.16 and 0.32 s streaming steps, for the lowest latency. seda-v0.2 and seda-v0.2-tiny ship them.- The demo can switch between seda-v0.2 and seda-v0.2-tiny in the options panel. Options a model does not support are reported instead of applied.
Changed
- Model tests allow one word error in the transcript (the tiny model's greedy search), and compare the other checks with the model's own transcript.
What's Changed
New Contributors
Full Changelog: v1.0.0...v1.1.0
v1.0.0
Added
- Support for the new seda-v0.2 model, now the default: 6.38 WER on FLEURS-TR test in the
accuratemode, 7.26 inbalanced(seda-v0.1: 11.60). modepresets:fast,balanced(default) andaccurate, plususe_lm,two_passandchunkto override them.- Second pass (
two_pass, part ofaccurate): each utterance is decoded again with 20 s of left context and beam search + LM. It runs in a background thread while the utterance is spoken, so the final text arrives about 0.4 s after the speech. - End of speech by Silero VAD v6 (
vad, on by default when the model ships it), after a pause ofendpoint_silenceseconds (default 0.25 s). Stream.end_utterance()returns the final text and starts the next utterance.Stream.cut()returns anUtterancewhosefinalize()can run in another thread while the stream keeps accepting audio.- Optional formatter (
punctuate=True, needs theformatextra): digits, punctuation, casing and apostrophes.sedalib.itnconverts spoken numbers to digits without the extra. Streammethods may be called from different threads.- The demo has a control panel for all options with an Apply button that loads and warms up the models. It shows live formatted text and how long the final text took after the speech ended.
- Tests (
uv run pytest), run in CI after lint against seda-v0.2 and seda-v0.1.
Changed
use_lm=Falsenow uses greedy search instead of beam search without the LM, which is faster.Stream.reset()also drops audio that was accepted but not decoded yet. It used to leak into the next utterance.- The silence appended at the end of an utterance depends on the chunk size (0.9 s for 0.64 s chunks, 1.5 s for 1.28 s chunks).
Fixed
- Without the VAD, a long silence before any speech no longer counts as an endpoint, and it no longer splits the utterance that follows.
Compatibility
- seda-v0.1 still works in the
balancedmode, with or withoutuse_lm. It lacks the files forfast,accurate, the VAD and the formatter. - sedalib 0.1 and 0.2 work with seda-v0.2 as before: they load the 1.28 s streaming model at the repo root. sedalib 0.1.0 pads too little silence for 1.28 s chunks and may drop the last word, so upgrade.
Full Changelog: v0.2.1...v1.0.0
v0.2.1
Changed
- The default model is back to seda-v0.1, because seda-v0.2 is not public yet. 0.2.0 pointed to seda-v0.2 by default and fails to download the model; upgrade to 0.2.1.
Full Changelog: v0.2.0...v0.2.1
v0.2.0
Changed
- The default model is now seda-v0.2: 8.89 WER on FLEURS (seda-v0.1: 11.52) and much more robust to noise, reverb and telephone audio. It uses 1.28 s chunks. Pass
"atasoglu/seda-v0.1"toRecognizer.from_pretrainedto keep the old model.
Fixed
Stream.finish()(andRecognizer.transcribe) now appends 1.5 s of silence instead of 0.66 s, so the last word is not dropped when the audio ends right after the speech.
Full Changelog: v0.1.0...v0.2.0
v0.1.0
Added
- Streaming Turkish speech recognition with
RecognizerandStream, built on sherpa-onnx. - Support for the seda-v0.1 model, downloaded and cached from the Hugging Face Hub, with an optional language model.
read_wavhelper for loading 16-bit PCM WAV files.- Microphone streaming example (
examples/streaming.py). - Gradio demo with live microphone streaming, file transcription and performance stats, available via the
demoextra.
Full Changelog: https://github.com/atasoglu/seda/commits/v0.1.0