Hugo-Dz / on-device-transcription

A ready-to-use, minimal app that converts any speech into text.
MIT License
334 stars 26 forks source link

Error processing video #4

Closed rahul-proximity closed 1 month ago

rahul-proximity commented 1 month ago

I was trying to process a file, but I keep seeing this error in the console.

ratchet-web.js:1152 panicked at crates/ratchet-core/src/ops/reindex/slice.rs:43:17:
assertion failed: range.end <= dim

Stack:

Error
    at imports.wbg.__wbg_new_abda76e883ba8a5f (http://localhost:5173/src/lib/ratchet/ratchet-web.js:1136:21)
    at http://localhost:5173/pkg/ratchet-web/ratchet-web_bg.wasm:wasm-function[4092]:0x2fb6d1
    at http://localhost:5173/pkg/ratchet-web/ratchet-web_bg.wasm:wasm-function[1789]:0x294555
    at http://localhost:5173/pkg/ratchet-web/ratchet-web_bg.wasm:wasm-function[2745]:0x2ce08b
    at http://localhost:5173/pkg/ratchet-web/ratchet-web_bg.wasm:wasm-function[2922]:0x2d2525
    at http://localhost:5173/pkg/ratchet-web/ratchet-web_bg.wasm:wasm-function[1129]:0x248690
    at http://localhost:5173/pkg/ratchet-web/ratchet-web_bg.wasm:wasm-function[578]:0x18a073
    at http://localhost:5173/pkg/ratchet-web/ratchet-web_bg.wasm:wasm-function[989]:0x216190
    at http://localhost:5173/pkg/ratchet-web/ratchet-web_bg.wasm:wasm-function[1118]:0x2462ab
    at http://localhost:5173/pkg/ratchet-web/ratchet-web_bg.wasm:wasm-function[3476]:0x2db6cd

adding the logs before the error:

Loading ffmpeg...
+page.svelte:104 FFMPEG loaded.
+page.svelte:160 Options:  {task: 'Transcribe', language: {…}, temperature: 0, sample_len: undefined, best_of: undefined, …}beam_size: undefinedbest_of: undefinedlanguage: {String: 'en'}length_penalty: undefinedmax_initial_timestamp: 1patience: undefinedprefix: undefinedprompt: undefinedsample_len: undefinedsuppress_blank: truesuppress_tokens: [-1]0: -1length: 1[[Prototype]]: Array(0)task: "Transcribe"temperature: 0time_offset: undefinedwithout_timestamps: false[[Prototype]]: Objectconstructor: ƒ Object()hasOwnProperty: ƒ hasOwnProperty()isPrototypeOf: ƒ isPrototypeOf()propertyIsEnumerable: ƒ propertyIsEnumerable()toLocaleString: ƒ toLocaleString()toString: ƒ toString()valueOf: ƒ valueOf()__defineGetter__: ƒ __defineGetter__()__defineSetter__: ƒ __defineSetter__()__lookupGetter__: ƒ __lookupGetter__()__lookupSetter__: ƒ __lookupSetter__()__proto__: (...)get __proto__: ƒ __proto__()set __proto__: ƒ __proto__()
ratchet-web.js:2043 INFO /Users/fleetwood/Code/ratchet/crates/ratchet-models/src/whisper/transcribe.rs:126 [2024-07-21][02:29:32][ratchet_models::whisper::transcribe][INFO] Processing segment: 0 -> 3000
ratchet-web.js:2043 INFO /Users/fleetwood/Code/ratchet/crates/ratchet-models/src/whisper/transcribe.rs:126 [2024-07-21][02:29:34][ratchet_models::whisper::transcribe][INFO] Processing segment: 2600 -> 5600
ratchet-web.js:2043 INFO /Users/fleetwood/Code/ratchet/crates/ratchet-models/src/whisper/transcribe.rs:126 [2024-07-21][02:29:38][ratchet_models::whisper::transcribe][INFO] Processing segment: 5500 -> 8500
ratchet-web.js:2043 INFO /Users/fleetwood/Code/ratchet/crates/ratchet-models/src/whisper/transcribe.rs:126 [2024-07-21][02:29:41][ratchet_models::whisper::transcribe][INFO] Processing segment: 8200 -> 11200
ratchet-web.js:2043 INFO /Users/fleetwood/Code/ratchet/crates/ratchet-models/src/whisper/transcribe.rs:126 [2024-07-21][02:29:45][ratchet_models::whisper::transcribe][INFO] Processing segment: 11000 -> 14000
ratchet-web.js:2043 INFO /Users/fleetwood/Code/ratchet/crates/ratchet-models/src/whisper/transcribe.rs:126 [2024-07-21][02:29:48][ratchet_models::whisper::transcribe][INFO] Processing segment: 13700 -> 16700
FL33TW00D commented 1 month ago

@rahul-proximity deep issue there, have to wait for the next release.

rahul-proximity commented 1 month ago

No worries @FL33TW00D , @Hugo-Dz .

Update: I separated the audio channel and tried processing the same file. Had an mp4 file. Was able to get it to work like this.