cohere-transcribe 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +21 -0
- data/LICENSE.txt +201 -0
- data/NOTICE +5 -0
- data/README.md +265 -0
- data/THIRD_PARTY_NOTICES.md +67 -0
- data/exe/cohere-transcribe +8 -0
- data/exe/cohere-transcribe-doctor +8 -0
- data/ext/cohere_transcribe_native/CMakeLists.txt +262 -0
- data/ext/cohere_transcribe_native/README.md +26 -0
- data/ext/cohere_transcribe_native/audio_abi.cpp +1416 -0
- data/ext/cohere_transcribe_native/audio_exports.macos +5 -0
- data/ext/cohere_transcribe_native/audio_exports.map +10 -0
- data/ext/cohere_transcribe_native/cohere_abi.cpp +1209 -0
- data/ext/cohere_transcribe_native/exports.macos +40 -0
- data/ext/cohere_transcribe_native/exports.map +45 -0
- data/ext/cohere_transcribe_native/extconf.rb +89 -0
- data/ext/cohere_transcribe_native/test/abi_smoke.rb +232 -0
- data/ext/cohere_transcribe_native/test/audio_matrix_smoke.cpp +121 -0
- data/ext/cohere_transcribe_native/test/audio_reliability_smoke.cpp +198 -0
- data/ext/cohere_transcribe_native/test/native_abi_reliability_smoke.cpp +186 -0
- data/ext/cohere_transcribe_native/test/native_batch_projection_probe.rb +81 -0
- data/ext/cohere_transcribe_native/test/native_cancellation_smoke.cpp +194 -0
- data/lib/cohere/transcribe/alignment/ATTRIBUTION.md +23 -0
- data/lib/cohere/transcribe/alignment/LICENSE.ctc-forced-aligner +407 -0
- data/lib/cohere/transcribe/alignment/LICENSE.torchaudio +25 -0
- data/lib/cohere/transcribe/alignment/LICENSE.uroman +26 -0
- data/lib/cohere/transcribe/alignment/aligner.rb +476 -0
- data/lib/cohere/transcribe/alignment/ctc.rb +224 -0
- data/lib/cohere/transcribe/alignment/text.rb +237 -0
- data/lib/cohere/transcribe/alignment/uroman_data.rb +4950 -0
- data/lib/cohere/transcribe/api.rb +173 -0
- data/lib/cohere/transcribe/asr/batching.rb +472 -0
- data/lib/cohere/transcribe/asr/failure_policy.rb +112 -0
- data/lib/cohere/transcribe/asr/native.rb +676 -0
- data/lib/cohere/transcribe/audio/ATTRIBUTION.md +8 -0
- data/lib/cohere/transcribe/audio/LICENSE.auditok +21 -0
- data/lib/cohere/transcribe/audio/decoder.rb +315 -0
- data/lib/cohere/transcribe/audio/ffmpeg_native.rb +248 -0
- data/lib/cohere/transcribe/audio/segmentation.rb +260 -0
- data/lib/cohere/transcribe/cli.rb +727 -0
- data/lib/cohere/transcribe/configuration.rb +282 -0
- data/lib/cohere/transcribe/constants.rb +14 -0
- data/lib/cohere/transcribe/dense_converter.rb +548 -0
- data/lib/cohere/transcribe/doctor.rb +576 -0
- data/lib/cohere/transcribe/errors.rb +57 -0
- data/lib/cohere/transcribe/gguf_writer.rb +268 -0
- data/lib/cohere/transcribe/hub.rb +436 -0
- data/lib/cohere/transcribe/input.rb +110 -0
- data/lib/cohere/transcribe/licenses/crispasr.txt +21 -0
- data/lib/cohere/transcribe/loader.rb +128 -0
- data/lib/cohere/transcribe/model_identity.rb +440 -0
- data/lib/cohere/transcribe/output/publication.rb +1118 -0
- data/lib/cohere/transcribe/output/rendering.rb +105 -0
- data/lib/cohere/transcribe/output/timing.rb +86 -0
- data/lib/cohere/transcribe/python_text.rb +70 -0
- data/lib/cohere/transcribe/pytorch_checkpoint.rb +1180 -0
- data/lib/cohere/transcribe/runtime/engine.rb +1676 -0
- data/lib/cohere/transcribe/runtime/model_provider.rb +390 -0
- data/lib/cohere/transcribe/runtime/precision.rb +57 -0
- data/lib/cohere/transcribe/runtime/preparation.rb +215 -0
- data/lib/cohere/transcribe/runtime/resources.rb +165 -0
- data/lib/cohere/transcribe/runtime/word_pipeline.rb +364 -0
- data/lib/cohere/transcribe/safetensors.rb +579 -0
- data/lib/cohere/transcribe/state/checkpoint.rb +224 -0
- data/lib/cohere/transcribe/state/contracts.rb +141 -0
- data/lib/cohere/transcribe/state/io.rb +727 -0
- data/lib/cohere/transcribe/state/locking.rb +211 -0
- data/lib/cohere/transcribe/state/manifest.rb +155 -0
- data/lib/cohere/transcribe/state.rb +7 -0
- data/lib/cohere/transcribe/types.rb +535 -0
- data/lib/cohere/transcribe/vad/ATTRIBUTION.md +14 -0
- data/lib/cohere/transcribe/vad/LICENSE.faster-whisper +21 -0
- data/lib/cohere/transcribe/vad/LICENSE.silero-vad +21 -0
- data/lib/cohere/transcribe/vad/silero.rb +344 -0
- data/lib/cohere/transcribe/vad/silero_vad_v6.onnx +0 -0
- data/lib/cohere/transcribe/vad/timestamps.rb +219 -0
- data/lib/cohere/transcribe/version.rb +7 -0
- data/lib/cohere/transcribe.rb +26 -0
- data/sig/cohere/transcribe.rbs +250 -0
- data/vendor/crispasr/AUTHORS +510 -0
- data/vendor/crispasr/LICENSE +21 -0
- data/vendor/crispasr/UPSTREAM.md +9 -0
- data/vendor/crispasr/VERSION +1 -0
- data/vendor/crispasr/ggml/AUTHORS +335 -0
- data/vendor/crispasr/ggml/CMakeLists.txt +512 -0
- data/vendor/crispasr/ggml/LICENSE +21 -0
- data/vendor/crispasr/ggml/README.md +49 -0
- data/vendor/crispasr/ggml/cmake/FindNCCL.cmake +36 -0
- data/vendor/crispasr/ggml/cmake/GitVars.cmake +22 -0
- data/vendor/crispasr/ggml/cmake/common.cmake +50 -0
- data/vendor/crispasr/ggml/cmake/ggml-config.cmake.in +191 -0
- data/vendor/crispasr/ggml/ggml.pc.in +10 -0
- data/vendor/crispasr/ggml/include/ggml-alloc.h +85 -0
- data/vendor/crispasr/ggml/include/ggml-backend.h +431 -0
- data/vendor/crispasr/ggml/include/ggml-blas.h +25 -0
- data/vendor/crispasr/ggml/include/ggml-cann.h +123 -0
- data/vendor/crispasr/ggml/include/ggml-cpp.h +39 -0
- data/vendor/crispasr/ggml/include/ggml-cpu.h +151 -0
- data/vendor/crispasr/ggml/include/ggml-cuda.h +50 -0
- data/vendor/crispasr/ggml/include/ggml-hexagon.h +19 -0
- data/vendor/crispasr/ggml/include/ggml-metal.h +61 -0
- data/vendor/crispasr/ggml/include/ggml-opencl.h +26 -0
- data/vendor/crispasr/ggml/include/ggml-openvino.h +37 -0
- data/vendor/crispasr/ggml/include/ggml-opt.h +256 -0
- data/vendor/crispasr/ggml/include/ggml-rpc.h +35 -0
- data/vendor/crispasr/ggml/include/ggml-sycl.h +49 -0
- data/vendor/crispasr/ggml/include/ggml-virtgpu.h +14 -0
- data/vendor/crispasr/ggml/include/ggml-vulkan.h +29 -0
- data/vendor/crispasr/ggml/include/ggml-webgpu.h +19 -0
- data/vendor/crispasr/ggml/include/ggml-zdnn.h +17 -0
- data/vendor/crispasr/ggml/include/ggml-zendnn.h +22 -0
- data/vendor/crispasr/ggml/include/ggml.h +2887 -0
- data/vendor/crispasr/ggml/include/gguf.h +204 -0
- data/vendor/crispasr/ggml/src/CMakeLists.txt +493 -0
- data/vendor/crispasr/ggml/src/ggml-alloc.c +1323 -0
- data/vendor/crispasr/ggml/src/ggml-backend-dl.cpp +48 -0
- data/vendor/crispasr/ggml/src/ggml-backend-dl.h +44 -0
- data/vendor/crispasr/ggml/src/ggml-backend-impl.h +275 -0
- data/vendor/crispasr/ggml/src/ggml-backend-meta.cpp +2145 -0
- data/vendor/crispasr/ggml/src/ggml-backend-reg.cpp +586 -0
- data/vendor/crispasr/ggml/src/ggml-backend.cpp +2437 -0
- data/vendor/crispasr/ggml/src/ggml-common.h +1900 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/CMakeLists.txt +718 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/amx/amx.cpp +249 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/amx/amx.h +8 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/amx/common.h +115 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/amx/mmq.cpp +2512 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/amx/mmq.h +10 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/arch/arm/cpu-feats.cpp +98 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/arch/arm/quants.c +4244 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/arch/arm/repack.cpp +5156 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/arch/loongarch/quants.c +2158 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/arch/powerpc/cpu-feats.cpp +82 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/arch/powerpc/quants.c +2304 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/arch/riscv/cpu-feats.cpp +38 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/arch/riscv/quants.c +4455 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/arch/riscv/repack.cpp +1703 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/arch/s390/cpu-feats.cpp +50 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/arch/s390/quants.c +1465 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/arch/wasm/quants.c +1220 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/arch/x86/cpu-feats.cpp +327 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/arch/x86/quants.c +3970 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/arch/x86/repack.cpp +6407 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/arch-fallback.h +349 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/binary-ops.cpp +154 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/binary-ops.h +16 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/cmake/FindSIMD.cmake +100 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/common.h +95 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/ggml-cpu-impl.h +539 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/ggml-cpu.c +3791 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/ggml-cpu.cpp +703 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/hbm.cpp +55 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/hbm.h +8 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/kleidiai/kernels.cpp +939 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/kleidiai/kernels.h +90 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/kleidiai/kleidiai.cpp +1513 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/kleidiai/kleidiai.h +17 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/llamafile/sgemm.cpp +4051 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/llamafile/sgemm.h +25 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/ops.cpp +11662 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/ops.h +121 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/quants.c +1288 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/quants.h +103 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/repack.cpp +4836 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/repack.h +245 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/simd-gemm.h +226 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/simd-mappings.h +1329 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/spacemit/ime.cpp +1025 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/spacemit/ime.h +13 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/spacemit/ime1_kernels.cpp +3196 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/spacemit/ime_kernels.h +26 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/traits.cpp +36 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/traits.h +38 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/unary-ops.cpp +336 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/unary-ops.h +35 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/vec.cpp +681 -0
- data/vendor/crispasr/ggml/src/ggml-cpu/vec.h +1606 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/CMakeLists.txt +272 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/acc.cu +61 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/acc.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/add-id.cu +58 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/add-id.cuh +3 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/arange.cu +34 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/arange.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/argmax.cu +91 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/argmax.cuh +3 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/argsort.cu +265 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/argsort.cuh +19 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/binbcast.cu +534 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/binbcast.cuh +12 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/clamp.cu +45 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/clamp.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/col2im-1d.cu +81 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/col2im-1d.cuh +3 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/common.cuh +1489 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/concat.cu +204 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/concat.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/conv-transpose-1d.cu +97 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/conv-transpose-1d.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/conv2d-dw.cu +161 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/conv2d-dw.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/conv2d-transpose.cu +115 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/conv2d-transpose.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/conv2d.cu +166 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/conv2d.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/convert.cu +892 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/convert.cuh +66 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/count-equal.cu +64 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/count-equal.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/cp-async.cuh +57 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/cpy-utils.cuh +217 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/cpy.cu +581 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/cpy.cuh +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/cross-entropy-loss.cu +177 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/cross-entropy-loss.cuh +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/cumsum.cu +307 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/cumsum.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/dequantize.cuh +99 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/diag.cu +77 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/diag.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/diagmask.cu +40 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/diagmask.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/fattn-common.cuh +1212 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/fattn-mma-f16.cuh +1860 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/fattn-tile.cu +57 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/fattn-tile.cuh +1309 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/fattn-vec.cuh +600 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/fattn-wmma-f16.cu +696 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/fattn-wmma-f16.cuh +51 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/fattn.cu +620 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/fattn.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/fill.cu +37 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/fill.cuh +3 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/gated_delta_net.cu +273 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/gated_delta_net.cuh +4 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/getrows.cu +332 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/getrows.cuh +15 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/ggml-cuda.cu +5580 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/gla.cu +93 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/gla.cuh +3 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/im2col.cu +274 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/im2col.cuh +6 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/mean.cu +75 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/mean.cuh +3 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/mma.cuh +1333 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/mmf.cu +191 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/mmf.cuh +908 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/mmid.cu +164 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/mmid.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/mmq.cu +372 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/mmq.cuh +4175 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/mmvf.cu +862 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/mmvf.cuh +14 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/mmvq.cu +1161 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/mmvq.cuh +16 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/norm.cu +756 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/norm.cuh +20 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/opt-step-adamw.cu +78 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/opt-step-adamw.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/opt-step-sgd.cu +49 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/opt-step-sgd.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/out-prod.cu +68 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/out-prod.cuh +3 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/pad.cu +106 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/pad.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/pad_reflect_1d.cu +91 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/pad_reflect_1d.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/pool2d.cu +94 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/pool2d.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/quantize.cu +443 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/quantize.cuh +41 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/reduce_rows.cuh +39 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/roll.cu +67 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/roll.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/rope.cu +665 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/rope.cuh +9 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/scale.cu +34 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/scale.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/set-rows.cu +330 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/set-rows.cuh +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/set.cu +39 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/set.cuh +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/softcap.cu +34 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/softcap.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/softmax.cu +472 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/softmax.cuh +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/solve_tri.cu +275 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/solve_tri.cuh +3 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/ssm-conv.cu +197 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/ssm-conv.cuh +3 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/ssm-scan.cu +342 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/ssm-scan.cuh +3 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/sum.cu +41 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/sum.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/sumrows.cu +43 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/sumrows.cuh +4 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-mma-f16-instance-ncols1_1-ncols2_16.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-mma-f16-instance-ncols1_1-ncols2_32.cu +6 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-mma-f16-instance-ncols1_1-ncols2_8.cu +11 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-mma-f16-instance-ncols1_16-ncols2_1.cu +10 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-mma-f16-instance-ncols1_16-ncols2_2.cu +10 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-mma-f16-instance-ncols1_16-ncols2_4.cu +12 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-mma-f16-instance-ncols1_2-ncols2_16.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-mma-f16-instance-ncols1_2-ncols2_32.cu +6 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-mma-f16-instance-ncols1_2-ncols2_4.cu +12 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-mma-f16-instance-ncols1_2-ncols2_8.cu +11 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-mma-f16-instance-ncols1_32-ncols2_1.cu +10 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-mma-f16-instance-ncols1_32-ncols2_2.cu +10 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-mma-f16-instance-ncols1_4-ncols2_16.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-mma-f16-instance-ncols1_4-ncols2_2.cu +10 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-mma-f16-instance-ncols1_4-ncols2_4.cu +12 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-mma-f16-instance-ncols1_4-ncols2_8.cu +11 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-mma-f16-instance-ncols1_64-ncols2_1.cu +10 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-mma-f16-instance-ncols1_8-ncols2_1.cu +10 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-mma-f16-instance-ncols1_8-ncols2_2.cu +10 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-mma-f16-instance-ncols1_8-ncols2_4.cu +12 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-mma-f16-instance-ncols1_8-ncols2_8.cu +11 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-tile-instance-dkq112-dv112.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-tile-instance-dkq128-dv128.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-tile-instance-dkq256-dv256.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-tile-instance-dkq320-dv256.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-tile-instance-dkq40-dv40.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-tile-instance-dkq512-dv512.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-tile-instance-dkq576-dv512.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-tile-instance-dkq64-dv64.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-tile-instance-dkq72-dv72.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-tile-instance-dkq80-dv80.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-tile-instance-dkq96-dv96.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-bf16-bf16.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-bf16-f16.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-bf16-q4_0.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-bf16-q4_1.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-bf16-q5_0.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-bf16-q5_1.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-bf16-q8_0.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-f16-bf16.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-f16-f16.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-f16-q4_0.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-f16-q4_1.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-f16-q5_0.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-f16-q5_1.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-f16-q8_0.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q4_0-bf16.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q4_0-f16.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q4_0-q4_0.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q4_0-q4_1.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q4_0-q5_0.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q4_0-q5_1.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q4_0-q8_0.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q4_1-bf16.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q4_1-f16.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q4_1-q4_0.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q4_1-q4_1.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q4_1-q5_0.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q4_1-q5_1.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q4_1-q8_0.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q5_0-bf16.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q5_0-f16.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q5_0-q4_0.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q5_0-q4_1.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q5_0-q5_0.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q5_0-q5_1.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q5_0-q8_0.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q5_1-bf16.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q5_1-f16.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q5_1-q4_0.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q5_1-q4_1.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q5_1-q5_0.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q5_1-q5_1.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q5_1-q8_0.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q8_0-bf16.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q8_0-f16.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q8_0-q4_0.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q8_0-q4_1.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q8_0-q5_0.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q8_0-q5_1.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/fattn-vec-instance-q8_0-q8_0.cu +7 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmf-instance-ncols_1.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmf-instance-ncols_10.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmf-instance-ncols_11.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmf-instance-ncols_12.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmf-instance-ncols_13.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmf-instance-ncols_14.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmf-instance-ncols_15.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmf-instance-ncols_16.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmf-instance-ncols_2.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmf-instance-ncols_3.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmf-instance-ncols_4.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmf-instance-ncols_5.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmf-instance-ncols_6.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmf-instance-ncols_7.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmf-instance-ncols_8.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmf-instance-ncols_9.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmq-instance-iq1_s.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmq-instance-iq2_s.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmq-instance-iq2_xs.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmq-instance-iq2_xxs.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmq-instance-iq3_s.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmq-instance-iq3_xxs.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmq-instance-iq4_nl.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmq-instance-iq4_xs.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmq-instance-mxfp4.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmq-instance-nvfp4.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmq-instance-q1_0.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmq-instance-q2_k.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmq-instance-q3_k.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmq-instance-q4_0.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmq-instance-q4_1.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmq-instance-q4_k.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmq-instance-q5_0.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmq-instance-q5_1.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmq-instance-q5_k.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmq-instance-q6_k.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/template-instances/mmq-instance-q8_0.cu +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/top-k.cu +95 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/top-k.cuh +3 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/topk-moe.cu +415 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/topk-moe.cuh +27 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/tri.cu +136 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/tri.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/tsembd.cu +47 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/tsembd.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/unary.cu +644 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/unary.cuh +116 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/upscale.cu +293 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/upscale.cuh +5 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/vecdotq.cuh +1317 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/vendors/cuda.h +28 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/vendors/hip.h +306 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/vendors/musa.h +148 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/wkv.cu +199 -0
- data/vendor/crispasr/ggml/src/ggml-cuda/wkv.cuh +7 -0
- data/vendor/crispasr/ggml/src/ggml-impl.h +783 -0
- data/vendor/crispasr/ggml/src/ggml-metal/CMakeLists.txt +124 -0
- data/vendor/crispasr/ggml/src/ggml-metal/ggml-metal-common.cpp +457 -0
- data/vendor/crispasr/ggml/src/ggml-metal/ggml-metal-common.h +52 -0
- data/vendor/crispasr/ggml/src/ggml-metal/ggml-metal-context.h +41 -0
- data/vendor/crispasr/ggml/src/ggml-metal/ggml-metal-context.m +778 -0
- data/vendor/crispasr/ggml/src/ggml-metal/ggml-metal-device.cpp +2117 -0
- data/vendor/crispasr/ggml/src/ggml-metal/ggml-metal-device.h +299 -0
- data/vendor/crispasr/ggml/src/ggml-metal/ggml-metal-device.m +2093 -0
- data/vendor/crispasr/ggml/src/ggml-metal/ggml-metal-impl.h +1267 -0
- data/vendor/crispasr/ggml/src/ggml-metal/ggml-metal-ops.cpp +5023 -0
- data/vendor/crispasr/ggml/src/ggml-metal/ggml-metal-ops.h +111 -0
- data/vendor/crispasr/ggml/src/ggml-metal/ggml-metal.cpp +954 -0
- data/vendor/crispasr/ggml/src/ggml-metal/ggml-metal.metal +11756 -0
- data/vendor/crispasr/ggml/src/ggml-opt.cpp +1094 -0
- data/vendor/crispasr/ggml/src/ggml-quants.c +5491 -0
- data/vendor/crispasr/ggml/src/ggml-quants.h +112 -0
- data/vendor/crispasr/ggml/src/ggml-threading.cpp +12 -0
- data/vendor/crispasr/ggml/src/ggml-threading.h +14 -0
- data/vendor/crispasr/ggml/src/ggml.c +7925 -0
- data/vendor/crispasr/ggml/src/ggml.cpp +26 -0
- data/vendor/crispasr/ggml/src/gguf.cpp +1556 -0
- data/vendor/crispasr/src/cohere-arch.h +137 -0
- data/vendor/crispasr/src/cohere.cpp +5642 -0
- data/vendor/crispasr/src/cohere.h +327 -0
- data/vendor/crispasr/src/cohere_batch_planner.h +82 -0
- data/vendor/crispasr/src/cohere_chunking.h +64 -0
- data/vendor/crispasr/src/cohere_decoder_batch_layout.h +60 -0
- data/vendor/crispasr/src/cohere_encoder_padded_layout.h +27 -0
- data/vendor/crispasr/src/cohere_frontend.cpp +189 -0
- data/vendor/crispasr/src/cohere_frontend.h +31 -0
- data/vendor/crispasr/src/cohere_ragged_controller.h +149 -0
- data/vendor/crispasr/src/cohere_token_renderer.h +181 -0
- data/vendor/crispasr/src/core/attention.h +924 -0
- data/vendor/crispasr/src/core/audio_chunking.h +97 -0
- data/vendor/crispasr/src/core/beam_decode.h +486 -0
- data/vendor/crispasr/src/core/cpu_ops.h +135 -0
- data/vendor/crispasr/src/core/gguf_loader.cpp +1021 -0
- data/vendor/crispasr/src/core/gguf_loader.h +216 -0
- data/vendor/crispasr/src/core/gpu_backend_pref.h +119 -0
- data/vendor/crispasr/src/core/mel.cpp +519 -0
- data/vendor/crispasr/src/core/mel.h +265 -0
- data/vendor/crispasr/src/core/ngram_loop_fix.h +173 -0
- data/vendor/crispasr/src/core/repetition_loop_guard.h +54 -0
- data/vendor/crispasr/src/crispasr_imatrix.cpp +255 -0
- data/vendor/crispasr/src/crispasr_imatrix.h +38 -0
- metadata +596 -0
|
@@ -0,0 +1,535 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cohere
|
|
4
|
+
module Transcribe
|
|
5
|
+
module TypesSupport
|
|
6
|
+
DEFAULT_ASR_MODEL_ID = "CohereLabs/cohere-transcribe-arabic-07-2026"
|
|
7
|
+
OUTPUT_FORMATS = %w[txt srt vtt json].freeze
|
|
8
|
+
EXISTING_POLICIES = %w[error overwrite skip].freeze
|
|
9
|
+
|
|
10
|
+
module KeywordOnlyConstructor
|
|
11
|
+
def new(*arguments, **keywords, &)
|
|
12
|
+
raise ArgumentError, "#{self} accepts keyword arguments only" unless arguments.empty?
|
|
13
|
+
|
|
14
|
+
super(**keywords, &)
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
module_function
|
|
19
|
+
|
|
20
|
+
def immutable(value)
|
|
21
|
+
case value
|
|
22
|
+
when String
|
|
23
|
+
value.dup.freeze
|
|
24
|
+
when Pathname
|
|
25
|
+
Pathname.new(value.to_s).freeze
|
|
26
|
+
when Array
|
|
27
|
+
value.map { |item| immutable(item) }.freeze
|
|
28
|
+
when Hash
|
|
29
|
+
value.to_h do |key, item|
|
|
30
|
+
[immutable(key), immutable(item)]
|
|
31
|
+
end.freeze
|
|
32
|
+
else
|
|
33
|
+
value
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def tuple(value, field:)
|
|
38
|
+
array = if value.is_a?(String)
|
|
39
|
+
value.each_char.to_a
|
|
40
|
+
elsif value.respond_to?(:to_ary)
|
|
41
|
+
value.to_ary
|
|
42
|
+
elsif value.respond_to?(:each)
|
|
43
|
+
value.to_a
|
|
44
|
+
else
|
|
45
|
+
raise TypeError, "#{field} must be enumerable"
|
|
46
|
+
end
|
|
47
|
+
immutable(array)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def path(value)
|
|
51
|
+
source = value.respond_to?(:to_path) ? value.to_path : value
|
|
52
|
+
pathname = Pathname.new(source)
|
|
53
|
+
text = pathname.to_s
|
|
54
|
+
absolute = text.start_with?("/")
|
|
55
|
+
prefix = if text.start_with?("//") && !text.start_with?("///")
|
|
56
|
+
"//"
|
|
57
|
+
elsif absolute
|
|
58
|
+
"/"
|
|
59
|
+
else
|
|
60
|
+
""
|
|
61
|
+
end
|
|
62
|
+
components = text.split("/").reject { |component| component.empty? || component == "." }
|
|
63
|
+
normalized = prefix + components.join("/")
|
|
64
|
+
normalized = "." if normalized.empty?
|
|
65
|
+
Pathname.new(normalized).freeze
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
private_constant :TypesSupport
|
|
69
|
+
|
|
70
|
+
# Optional durable output settings for a transcription run.
|
|
71
|
+
PublicationOptions = Data.define(:formats, :output_dir, :existing, :profile_json) do
|
|
72
|
+
def initialize(formats: nil, output_dir: nil, existing: "error", profile_json: nil)
|
|
73
|
+
unless formats.nil?
|
|
74
|
+
formats = TypesSupport.tuple(formats, field: "formats").uniq.freeze
|
|
75
|
+
raise ArgumentError, "formats must contain at least one output format" if formats.empty?
|
|
76
|
+
|
|
77
|
+
unsupported = formats.reject { |format| TypesSupport::OUTPUT_FORMATS.include?(format) }
|
|
78
|
+
unless unsupported.empty?
|
|
79
|
+
rendered = unsupported.map(&:to_s).sort.join(", ")
|
|
80
|
+
raise ArgumentError, "Unsupported output format(s): #{rendered}"
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
raise ArgumentError, "existing must be 'error', 'overwrite', or 'skip'" unless TypesSupport::EXISTING_POLICIES.include?(existing)
|
|
84
|
+
|
|
85
|
+
super(
|
|
86
|
+
formats: formats,
|
|
87
|
+
output_dir: output_dir.nil? ? nil : TypesSupport.path(output_dir),
|
|
88
|
+
existing: TypesSupport.immutable(existing),
|
|
89
|
+
profile_json: profile_json.nil? ? nil : TypesSupport.path(profile_json)
|
|
90
|
+
)
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Complete transcription configuration shared with the command-line interface.
|
|
95
|
+
TranscriptionOptions = Data.define(
|
|
96
|
+
:model,
|
|
97
|
+
:model_revision,
|
|
98
|
+
:adapter,
|
|
99
|
+
:adapter_revision,
|
|
100
|
+
:language,
|
|
101
|
+
:text_only,
|
|
102
|
+
:recursive,
|
|
103
|
+
:device,
|
|
104
|
+
:dtype,
|
|
105
|
+
:audio_backend,
|
|
106
|
+
:audio_memory_gb,
|
|
107
|
+
:preprocess_workers,
|
|
108
|
+
:pipeline_preparation,
|
|
109
|
+
:vad,
|
|
110
|
+
:vad_engine,
|
|
111
|
+
:vad_batch_size,
|
|
112
|
+
:vad_block_frames,
|
|
113
|
+
:vad_threads,
|
|
114
|
+
:vad_merge,
|
|
115
|
+
:min_dur,
|
|
116
|
+
:max_dur,
|
|
117
|
+
:max_silence,
|
|
118
|
+
:energy_threshold,
|
|
119
|
+
:vad_threshold,
|
|
120
|
+
:min_silence_ms,
|
|
121
|
+
:speech_pad_ms,
|
|
122
|
+
:batch_size,
|
|
123
|
+
:batch_max_size,
|
|
124
|
+
:batch_audio_seconds,
|
|
125
|
+
:batch_vram_target,
|
|
126
|
+
:adaptive_batch,
|
|
127
|
+
:pin_memory,
|
|
128
|
+
:max_new_tokens,
|
|
129
|
+
:max_retry_tokens,
|
|
130
|
+
:truncation_policy,
|
|
131
|
+
:stop_repetition_loops,
|
|
132
|
+
:alignment,
|
|
133
|
+
:align_batch_size,
|
|
134
|
+
:align_dtype,
|
|
135
|
+
:max_chars,
|
|
136
|
+
:max_cue_dur,
|
|
137
|
+
:max_gap,
|
|
138
|
+
:publication
|
|
139
|
+
) do
|
|
140
|
+
def initialize(
|
|
141
|
+
model: TypesSupport::DEFAULT_ASR_MODEL_ID,
|
|
142
|
+
model_revision: nil,
|
|
143
|
+
adapter: nil,
|
|
144
|
+
adapter_revision: nil,
|
|
145
|
+
language: "ar",
|
|
146
|
+
text_only: false,
|
|
147
|
+
recursive: true,
|
|
148
|
+
device: "auto",
|
|
149
|
+
dtype: "auto",
|
|
150
|
+
audio_backend: "auto",
|
|
151
|
+
audio_memory_gb: 4.0,
|
|
152
|
+
preprocess_workers: nil,
|
|
153
|
+
pipeline_preparation: true,
|
|
154
|
+
vad: "silero",
|
|
155
|
+
vad_engine: "auto",
|
|
156
|
+
vad_batch_size: 16,
|
|
157
|
+
vad_block_frames: 512,
|
|
158
|
+
vad_threads: nil,
|
|
159
|
+
vad_merge: false,
|
|
160
|
+
min_dur: 0.5,
|
|
161
|
+
max_dur: 30.0,
|
|
162
|
+
max_silence: 0.6,
|
|
163
|
+
energy_threshold: 50.0,
|
|
164
|
+
vad_threshold: 0.5,
|
|
165
|
+
min_silence_ms: 300,
|
|
166
|
+
speech_pad_ms: 60,
|
|
167
|
+
batch_size: nil,
|
|
168
|
+
batch_max_size: nil,
|
|
169
|
+
batch_audio_seconds: nil,
|
|
170
|
+
batch_vram_target: 0.9,
|
|
171
|
+
adaptive_batch: false,
|
|
172
|
+
pin_memory: false,
|
|
173
|
+
max_new_tokens: 445,
|
|
174
|
+
max_retry_tokens: 896,
|
|
175
|
+
truncation_policy: "retry",
|
|
176
|
+
stop_repetition_loops: true,
|
|
177
|
+
alignment: "segment",
|
|
178
|
+
align_batch_size: 4,
|
|
179
|
+
align_dtype: "fp32",
|
|
180
|
+
max_chars: 80,
|
|
181
|
+
max_cue_dur: 6.0,
|
|
182
|
+
max_gap: 0.6,
|
|
183
|
+
publication: nil
|
|
184
|
+
)
|
|
185
|
+
super(
|
|
186
|
+
model: TypesSupport.immutable(model),
|
|
187
|
+
model_revision: TypesSupport.immutable(model_revision),
|
|
188
|
+
adapter: TypesSupport.immutable(adapter),
|
|
189
|
+
adapter_revision: TypesSupport.immutable(adapter_revision),
|
|
190
|
+
language: TypesSupport.immutable(language),
|
|
191
|
+
text_only: text_only,
|
|
192
|
+
recursive: recursive,
|
|
193
|
+
device: TypesSupport.immutable(device),
|
|
194
|
+
dtype: TypesSupport.immutable(dtype),
|
|
195
|
+
audio_backend: TypesSupport.immutable(audio_backend),
|
|
196
|
+
audio_memory_gb: audio_memory_gb,
|
|
197
|
+
preprocess_workers: preprocess_workers,
|
|
198
|
+
pipeline_preparation: pipeline_preparation,
|
|
199
|
+
vad: TypesSupport.immutable(vad),
|
|
200
|
+
vad_engine: TypesSupport.immutable(vad_engine),
|
|
201
|
+
vad_batch_size: vad_batch_size,
|
|
202
|
+
vad_block_frames: vad_block_frames,
|
|
203
|
+
vad_threads: vad_threads,
|
|
204
|
+
vad_merge: vad_merge,
|
|
205
|
+
min_dur: min_dur,
|
|
206
|
+
max_dur: max_dur,
|
|
207
|
+
max_silence: max_silence,
|
|
208
|
+
energy_threshold: energy_threshold,
|
|
209
|
+
vad_threshold: vad_threshold,
|
|
210
|
+
min_silence_ms: min_silence_ms,
|
|
211
|
+
speech_pad_ms: speech_pad_ms,
|
|
212
|
+
batch_size: batch_size,
|
|
213
|
+
batch_max_size: batch_max_size,
|
|
214
|
+
batch_audio_seconds: batch_audio_seconds,
|
|
215
|
+
batch_vram_target: batch_vram_target,
|
|
216
|
+
adaptive_batch: adaptive_batch,
|
|
217
|
+
pin_memory: pin_memory,
|
|
218
|
+
max_new_tokens: max_new_tokens,
|
|
219
|
+
max_retry_tokens: max_retry_tokens,
|
|
220
|
+
truncation_policy: TypesSupport.immutable(truncation_policy),
|
|
221
|
+
stop_repetition_loops: stop_repetition_loops,
|
|
222
|
+
alignment: TypesSupport.immutable(alignment),
|
|
223
|
+
align_batch_size: align_batch_size,
|
|
224
|
+
align_dtype: TypesSupport.immutable(align_dtype),
|
|
225
|
+
max_chars: max_chars,
|
|
226
|
+
max_cue_dur: max_cue_dur,
|
|
227
|
+
max_gap: max_gap,
|
|
228
|
+
publication: publication
|
|
229
|
+
)
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Text generated for one ASR input segment.
|
|
234
|
+
TranscriptionSegment = Data.define(:index, :start, :end, :text) do
|
|
235
|
+
def initialize(index:, start:, end:, text:)
|
|
236
|
+
super(index: index, start: start, end: binding.local_variable_get(:end), text: TypesSupport.immutable(text))
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# One word with either CTC or approximate timing.
|
|
241
|
+
TranscriptionWord = Data.define(
|
|
242
|
+
:start,
|
|
243
|
+
:end,
|
|
244
|
+
:text,
|
|
245
|
+
:segment_index,
|
|
246
|
+
:segment_word_index,
|
|
247
|
+
:timing_source
|
|
248
|
+
) do
|
|
249
|
+
def initialize(start:, end:, text:, segment_index:, segment_word_index:, timing_source:)
|
|
250
|
+
super(
|
|
251
|
+
start: start,
|
|
252
|
+
end: binding.local_variable_get(:end),
|
|
253
|
+
text: TypesSupport.immutable(text),
|
|
254
|
+
segment_index: segment_index,
|
|
255
|
+
segment_word_index: segment_word_index,
|
|
256
|
+
timing_source: TypesSupport.immutable(timing_source)
|
|
257
|
+
)
|
|
258
|
+
end
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
# One rendered subtitle cue.
|
|
262
|
+
SubtitleCue = Data.define(:start, :end, :text) do
|
|
263
|
+
def initialize(start:, end:, text:)
|
|
264
|
+
super(start: start, end: binding.local_variable_get(:end), text: TypesSupport.immutable(text))
|
|
265
|
+
end
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
# Per-file decoder, VAD, generation, and alignment provenance.
|
|
269
|
+
TranscriptionProvenance = Data.define(
|
|
270
|
+
:model_id,
|
|
271
|
+
:model_revision,
|
|
272
|
+
:model_format,
|
|
273
|
+
:adapter_id,
|
|
274
|
+
:adapter_revision,
|
|
275
|
+
:decode_backend,
|
|
276
|
+
:decode_fallback_reason,
|
|
277
|
+
:vad_engine_requested,
|
|
278
|
+
:vad_engine_actual,
|
|
279
|
+
:vad_provider,
|
|
280
|
+
:vad_fallback_reason,
|
|
281
|
+
:fallback_alignment_segments,
|
|
282
|
+
:repetition_stopped_segments,
|
|
283
|
+
:truncation_retried_segments,
|
|
284
|
+
:token_limit_segments,
|
|
285
|
+
:generated_tokens_by_segment,
|
|
286
|
+
:resumed_from_asr_checkpoint,
|
|
287
|
+
:published
|
|
288
|
+
) do
|
|
289
|
+
def initialize(
|
|
290
|
+
model_id: nil,
|
|
291
|
+
model_revision: nil,
|
|
292
|
+
model_format: nil,
|
|
293
|
+
adapter_id: nil,
|
|
294
|
+
adapter_revision: nil,
|
|
295
|
+
decode_backend: nil,
|
|
296
|
+
decode_fallback_reason: nil,
|
|
297
|
+
vad_engine_requested: nil,
|
|
298
|
+
vad_engine_actual: nil,
|
|
299
|
+
vad_provider: nil,
|
|
300
|
+
vad_fallback_reason: nil,
|
|
301
|
+
fallback_alignment_segments: 0,
|
|
302
|
+
repetition_stopped_segments: [],
|
|
303
|
+
truncation_retried_segments: [],
|
|
304
|
+
token_limit_segments: [],
|
|
305
|
+
generated_tokens_by_segment: [],
|
|
306
|
+
resumed_from_asr_checkpoint: false,
|
|
307
|
+
published: false
|
|
308
|
+
)
|
|
309
|
+
super(
|
|
310
|
+
model_id: TypesSupport.immutable(model_id),
|
|
311
|
+
model_revision: TypesSupport.immutable(model_revision),
|
|
312
|
+
model_format: TypesSupport.immutable(model_format),
|
|
313
|
+
adapter_id: TypesSupport.immutable(adapter_id),
|
|
314
|
+
adapter_revision: TypesSupport.immutable(adapter_revision),
|
|
315
|
+
decode_backend: TypesSupport.immutable(decode_backend),
|
|
316
|
+
decode_fallback_reason: TypesSupport.immutable(decode_fallback_reason),
|
|
317
|
+
vad_engine_requested: TypesSupport.immutable(vad_engine_requested),
|
|
318
|
+
vad_engine_actual: TypesSupport.immutable(vad_engine_actual),
|
|
319
|
+
vad_provider: TypesSupport.immutable(vad_provider),
|
|
320
|
+
vad_fallback_reason: TypesSupport.immutable(vad_fallback_reason),
|
|
321
|
+
fallback_alignment_segments: fallback_alignment_segments,
|
|
322
|
+
repetition_stopped_segments: TypesSupport.tuple(
|
|
323
|
+
repetition_stopped_segments,
|
|
324
|
+
field: "repetition_stopped_segments"
|
|
325
|
+
),
|
|
326
|
+
truncation_retried_segments: TypesSupport.tuple(
|
|
327
|
+
truncation_retried_segments,
|
|
328
|
+
field: "truncation_retried_segments"
|
|
329
|
+
),
|
|
330
|
+
token_limit_segments: TypesSupport.tuple(token_limit_segments, field: "token_limit_segments"),
|
|
331
|
+
generated_tokens_by_segment: TypesSupport.tuple(
|
|
332
|
+
generated_tokens_by_segment,
|
|
333
|
+
field: "generated_tokens_by_segment"
|
|
334
|
+
),
|
|
335
|
+
resumed_from_asr_checkpoint: resumed_from_asr_checkpoint,
|
|
336
|
+
published: published
|
|
337
|
+
)
|
|
338
|
+
end
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
# Immutable result for one expanded input audio file.
|
|
342
|
+
TranscriptionResult = Data.define(
|
|
343
|
+
:path,
|
|
344
|
+
:relative_path,
|
|
345
|
+
:status,
|
|
346
|
+
:text,
|
|
347
|
+
:duration,
|
|
348
|
+
:segments,
|
|
349
|
+
:words,
|
|
350
|
+
:cues,
|
|
351
|
+
:outputs,
|
|
352
|
+
:error,
|
|
353
|
+
:provenance
|
|
354
|
+
) do
|
|
355
|
+
def initialize(
|
|
356
|
+
path:,
|
|
357
|
+
relative_path:,
|
|
358
|
+
status:,
|
|
359
|
+
text:,
|
|
360
|
+
duration:,
|
|
361
|
+
segments: [],
|
|
362
|
+
words: [],
|
|
363
|
+
cues: [],
|
|
364
|
+
outputs: [],
|
|
365
|
+
error: nil,
|
|
366
|
+
provenance: TranscriptionProvenance.new
|
|
367
|
+
)
|
|
368
|
+
super(
|
|
369
|
+
path: TypesSupport.immutable(path),
|
|
370
|
+
relative_path: TypesSupport.immutable(relative_path),
|
|
371
|
+
status: TypesSupport.immutable(status),
|
|
372
|
+
text: TypesSupport.immutable(text),
|
|
373
|
+
duration: duration,
|
|
374
|
+
segments: TypesSupport.tuple(segments, field: "segments"),
|
|
375
|
+
words: TypesSupport.tuple(words, field: "words"),
|
|
376
|
+
cues: TypesSupport.tuple(cues, field: "cues"),
|
|
377
|
+
outputs: TypesSupport.tuple(outputs, field: "outputs"),
|
|
378
|
+
error: TypesSupport.immutable(error),
|
|
379
|
+
provenance: provenance
|
|
380
|
+
)
|
|
381
|
+
end
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
# Stable high-level performance and resource statistics for one run.
|
|
385
|
+
TranscriptionStatistics = Data.define(
|
|
386
|
+
:elapsed_seconds,
|
|
387
|
+
:successful_audio_seconds,
|
|
388
|
+
:real_time_factor_x,
|
|
389
|
+
:runtime_import_seconds,
|
|
390
|
+
:serialization_wait_seconds,
|
|
391
|
+
:input_validation_seconds,
|
|
392
|
+
:decode_seconds,
|
|
393
|
+
:vad_seconds,
|
|
394
|
+
:asr_load_seconds,
|
|
395
|
+
:asr_seconds,
|
|
396
|
+
:aligner_load_seconds,
|
|
397
|
+
:emissions_seconds,
|
|
398
|
+
:viterbi_seconds,
|
|
399
|
+
:peak_cuda_allocated_gib,
|
|
400
|
+
:peak_cuda_reserved_gib,
|
|
401
|
+
:asr_batches,
|
|
402
|
+
:asr_processor_rows,
|
|
403
|
+
:generated_tokens,
|
|
404
|
+
:oom_retries,
|
|
405
|
+
:truncation_retries
|
|
406
|
+
) do
|
|
407
|
+
def initialize(
|
|
408
|
+
elapsed_seconds:,
|
|
409
|
+
successful_audio_seconds:,
|
|
410
|
+
real_time_factor_x:,
|
|
411
|
+
runtime_import_seconds:,
|
|
412
|
+
serialization_wait_seconds:,
|
|
413
|
+
input_validation_seconds:,
|
|
414
|
+
decode_seconds:,
|
|
415
|
+
vad_seconds:,
|
|
416
|
+
asr_load_seconds:,
|
|
417
|
+
asr_seconds:,
|
|
418
|
+
aligner_load_seconds:,
|
|
419
|
+
emissions_seconds:,
|
|
420
|
+
viterbi_seconds:,
|
|
421
|
+
peak_cuda_allocated_gib:,
|
|
422
|
+
peak_cuda_reserved_gib:,
|
|
423
|
+
asr_batches:,
|
|
424
|
+
asr_processor_rows:,
|
|
425
|
+
generated_tokens:,
|
|
426
|
+
oom_retries:,
|
|
427
|
+
truncation_retries:
|
|
428
|
+
)
|
|
429
|
+
super
|
|
430
|
+
end
|
|
431
|
+
end
|
|
432
|
+
|
|
433
|
+
# A serialized message or bounded progress update from a run.
|
|
434
|
+
ProgressEvent = Data.define(:stage, :message, :current, :total) do
|
|
435
|
+
def initialize(stage:, message: nil, current: nil, total: nil)
|
|
436
|
+
super(
|
|
437
|
+
stage: TypesSupport.immutable(stage),
|
|
438
|
+
message: TypesSupport.immutable(message),
|
|
439
|
+
current: current,
|
|
440
|
+
total: total
|
|
441
|
+
)
|
|
442
|
+
end
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
# Immutable, sequence-like result of one API call.
|
|
446
|
+
TranscriptionRun = Data.define(
|
|
447
|
+
:results,
|
|
448
|
+
:requested_options,
|
|
449
|
+
:resolved_options,
|
|
450
|
+
:statistics,
|
|
451
|
+
:errors
|
|
452
|
+
) do
|
|
453
|
+
include Enumerable
|
|
454
|
+
|
|
455
|
+
def initialize(results:, requested_options:, resolved_options:, statistics:, errors: [])
|
|
456
|
+
super(
|
|
457
|
+
results: TypesSupport.tuple(results, field: "results"),
|
|
458
|
+
requested_options: requested_options,
|
|
459
|
+
resolved_options: resolved_options,
|
|
460
|
+
statistics: statistics,
|
|
461
|
+
errors: TypesSupport.tuple(errors, field: "errors")
|
|
462
|
+
)
|
|
463
|
+
end
|
|
464
|
+
|
|
465
|
+
def each(&block)
|
|
466
|
+
return results.each unless block
|
|
467
|
+
|
|
468
|
+
results.each(&block)
|
|
469
|
+
end
|
|
470
|
+
|
|
471
|
+
# Enumerable#to_h otherwise shadows Data#to_h and interprets results as
|
|
472
|
+
# key-value pairs instead of returning this value object's fields.
|
|
473
|
+
def to_h
|
|
474
|
+
{
|
|
475
|
+
results: results,
|
|
476
|
+
requested_options: requested_options,
|
|
477
|
+
resolved_options: resolved_options,
|
|
478
|
+
statistics: statistics,
|
|
479
|
+
errors: errors
|
|
480
|
+
}
|
|
481
|
+
end
|
|
482
|
+
|
|
483
|
+
def length
|
|
484
|
+
results.length
|
|
485
|
+
end
|
|
486
|
+
alias_method :size, :length
|
|
487
|
+
|
|
488
|
+
def [](*)
|
|
489
|
+
selected = results[*]
|
|
490
|
+
selected.is_a?(Array) ? selected.freeze : selected
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
def single
|
|
494
|
+
unless results.length == 1
|
|
495
|
+
raise ArgumentError,
|
|
496
|
+
"Expected exactly one expanded audio file, found #{results.length}"
|
|
497
|
+
end
|
|
498
|
+
|
|
499
|
+
results.first
|
|
500
|
+
end
|
|
501
|
+
|
|
502
|
+
def successful
|
|
503
|
+
results.select { |result| result.status == "completed" }.freeze
|
|
504
|
+
end
|
|
505
|
+
|
|
506
|
+
def failed
|
|
507
|
+
results.select { |result| result.status == "failed" }.freeze
|
|
508
|
+
end
|
|
509
|
+
|
|
510
|
+
def skipped
|
|
511
|
+
results.select { |result| result.status == "skipped" }.freeze
|
|
512
|
+
end
|
|
513
|
+
|
|
514
|
+
def ok?
|
|
515
|
+
failed.empty? && errors.empty?
|
|
516
|
+
end
|
|
517
|
+
alias_method :ok, :ok?
|
|
518
|
+
end
|
|
519
|
+
|
|
520
|
+
[
|
|
521
|
+
PublicationOptions,
|
|
522
|
+
TranscriptionOptions,
|
|
523
|
+
TranscriptionSegment,
|
|
524
|
+
TranscriptionWord,
|
|
525
|
+
SubtitleCue,
|
|
526
|
+
TranscriptionProvenance,
|
|
527
|
+
TranscriptionResult,
|
|
528
|
+
TranscriptionStatistics,
|
|
529
|
+
ProgressEvent,
|
|
530
|
+
TranscriptionRun
|
|
531
|
+
].each do |value_class|
|
|
532
|
+
value_class.singleton_class.prepend(TypesSupport::KeywordOnlyConstructor)
|
|
533
|
+
end
|
|
534
|
+
end
|
|
535
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Silero VAD ONNX asset
|
|
2
|
+
|
|
3
|
+
`silero_vad_v6.onnx` is the sequence-form Silero VAD v6 export distributed by faster-whisper. It evaluates many 512-sample frames per ONNX Runtime call while preserving Silero's recurrent state and timestamp rules.
|
|
4
|
+
|
|
5
|
+
- Source revision: `SYSTRAN/faster-whisper@ed9a06cd89a93e47838f564998a6c09b655d7f43`
|
|
6
|
+
- Source path: `faster_whisper/assets/silero_vad_v6.onnx`
|
|
7
|
+
- Runtime reference: `faster_whisper/vad.py`
|
|
8
|
+
- SHA-256: `914fd98ac0a73d69ba1e70c9b1d66acb740eff90500dfde08b89a961b168a6a9`
|
|
9
|
+
- Upstream model: <https://github.com/snakers4/silero-vad>
|
|
10
|
+
- Distributor: <https://github.com/SYSTRAN/faster-whisper>
|
|
11
|
+
|
|
12
|
+
The asset, Ruby timestamp state machine, and sequence-runner behavior are MIT-licensed. `LICENSE.silero-vad` covers the model and upstream timestamp behavior, while `LICENSE.faster-whisper` covers the repository distributing this exact sequence export and its integration behavior. Both notices accompany the packaged code and asset.
|
|
13
|
+
|
|
14
|
+
The Ruby runner deliberately avoids two boundary errors: exactly divisible waveforms do not gain an extra frame, and constructing a first row's zero context never mutates the preceding audio frame. Direct sequence ONNX/JIT compatibility uses bounded 256-frame calls. The packed `auto`/`torch` compatibility path instead honors the validated `vad_block_frames` ceiling exactly while carrying recurrent state between calls.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 SYSTRAN
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020-present Silero Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|