whisper.rn 0.5.2 → 0.5.4

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.
Files changed (68) hide show
  1. package/README.md +1 -1
  2. package/cpp/ggml-alloc.c +11 -4
  3. package/cpp/ggml-backend-reg.cpp +8 -0
  4. package/cpp/ggml-backend.cpp +0 -2
  5. package/cpp/ggml-cpu/arch/arm/quants.c +428 -26
  6. package/cpp/ggml-cpu/ggml-cpu-impl.h +3 -1
  7. package/cpp/ggml-cpu/ggml-cpu.c +50 -21
  8. package/cpp/ggml-cpu/ops.cpp +458 -349
  9. package/cpp/ggml-cpu/ops.h +4 -4
  10. package/cpp/ggml-cpu/repack.cpp +143 -29
  11. package/cpp/ggml-cpu/simd-mappings.h +25 -25
  12. package/cpp/ggml-cpu/unary-ops.cpp +16 -0
  13. package/cpp/ggml-cpu/unary-ops.h +2 -0
  14. package/cpp/ggml-cpu/vec.cpp +17 -0
  15. package/cpp/ggml-cpu/vec.h +10 -0
  16. package/cpp/ggml-impl.h +17 -1
  17. package/cpp/ggml-metal/ggml-metal-context.m +5 -6
  18. package/cpp/ggml-metal/ggml-metal-device.cpp +101 -4
  19. package/cpp/ggml-metal/ggml-metal-device.h +8 -1
  20. package/cpp/ggml-metal/ggml-metal-device.m +216 -14
  21. package/cpp/ggml-metal/ggml-metal-impl.h +90 -2
  22. package/cpp/ggml-metal/ggml-metal-ops.cpp +346 -85
  23. package/cpp/ggml-metal/ggml-metal-ops.h +2 -0
  24. package/cpp/ggml-metal/ggml-metal.cpp +5 -0
  25. package/cpp/ggml-metal/ggml-metal.metal +12436 -0
  26. package/cpp/ggml.c +154 -5
  27. package/cpp/ggml.h +73 -0
  28. package/cpp/whisper.cpp +6 -2
  29. package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Headers/ggml-impl.h +17 -1
  30. package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Headers/ggml.h +73 -0
  31. package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Info.plist +0 -0
  32. package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/ggml-metal.metal +12436 -0
  33. package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/rnwhisper +0 -0
  34. package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-impl.h +17 -1
  35. package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml.h +73 -0
  36. package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/Info.plist +0 -0
  37. package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/_CodeSignature/CodeResources +1 -1
  38. package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/ggml-metal.metal +12436 -0
  39. package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/rnwhisper +0 -0
  40. package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Headers/ggml-impl.h +17 -1
  41. package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Headers/ggml.h +73 -0
  42. package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Info.plist +0 -0
  43. package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/ggml-metal.metal +12436 -0
  44. package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/rnwhisper +0 -0
  45. package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-impl.h +17 -1
  46. package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml.h +73 -0
  47. package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/Info.plist +0 -0
  48. package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/_CodeSignature/CodeResources +1 -1
  49. package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/ggml-metal.metal +12436 -0
  50. package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/rnwhisper +0 -0
  51. package/lib/commonjs/realtime-transcription/RealtimeTranscriber.js +156 -12
  52. package/lib/commonjs/realtime-transcription/RealtimeTranscriber.js.map +1 -1
  53. package/lib/module/realtime-transcription/RealtimeTranscriber.js +155 -12
  54. package/lib/module/realtime-transcription/RealtimeTranscriber.js.map +1 -1
  55. package/lib/typescript/realtime-transcription/RealtimeTranscriber.d.ts +29 -0
  56. package/lib/typescript/realtime-transcription/RealtimeTranscriber.d.ts.map +1 -1
  57. package/lib/typescript/realtime-transcription/types.d.ts +7 -0
  58. package/lib/typescript/realtime-transcription/types.d.ts.map +1 -1
  59. package/package.json +1 -1
  60. package/src/realtime-transcription/RealtimeTranscriber.ts +179 -9
  61. package/src/realtime-transcription/types.ts +9 -0
  62. package/whisper-rn.podspec +1 -1
  63. package/cpp/ggml-metal/ggml-whisper-sim.metallib +0 -0
  64. package/cpp/ggml-metal/ggml-whisper.metallib +0 -0
  65. package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/ggml-whisper.metallib +0 -0
  66. package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/ggml-whisper-sim.metallib +0 -0
  67. package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/ggml-whisper.metallib +0 -0
  68. package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/ggml-whisper-sim.metallib +0 -0
@@ -52,6 +52,7 @@ int wsp_ggml_metal_op_unary (wsp_ggml_metal_op_t ctx, int idx);
52
52
  int wsp_ggml_metal_op_glu (wsp_ggml_metal_op_t ctx, int idx);
53
53
  int wsp_ggml_metal_op_sum (wsp_ggml_metal_op_t ctx, int idx);
54
54
  int wsp_ggml_metal_op_sum_rows (wsp_ggml_metal_op_t ctx, int idx);
55
+ int wsp_ggml_metal_op_cumsum (wsp_ggml_metal_op_t ctx, int idx);
55
56
  int wsp_ggml_metal_op_get_rows (wsp_ggml_metal_op_t ctx, int idx);
56
57
  int wsp_ggml_metal_op_set_rows (wsp_ggml_metal_op_t ctx, int idx);
57
58
  int wsp_ggml_metal_op_soft_max (wsp_ggml_metal_op_t ctx, int idx);
@@ -70,6 +71,7 @@ int wsp_ggml_metal_op_group_norm (wsp_ggml_metal_op_t ctx, int idx);
70
71
  int wsp_ggml_metal_op_norm (wsp_ggml_metal_op_t ctx, int idx);
71
72
  int wsp_ggml_metal_op_rope (wsp_ggml_metal_op_t ctx, int idx);
72
73
  int wsp_ggml_metal_op_im2col (wsp_ggml_metal_op_t ctx, int idx);
74
+ int wsp_ggml_metal_op_conv_2d (wsp_ggml_metal_op_t ctx, int idx);
73
75
  int wsp_ggml_metal_op_conv_transpose_1d (wsp_ggml_metal_op_t ctx, int idx);
74
76
  int wsp_ggml_metal_op_conv_transpose_2d (wsp_ggml_metal_op_t ctx, int idx);
75
77
  int wsp_ggml_metal_op_upscale (wsp_ggml_metal_op_t ctx, int idx);
@@ -197,6 +197,11 @@ static size_t wsp_ggml_backend_metal_buffer_type_get_alloc_size(wsp_ggml_backend
197
197
  res += wsp_ggml_metal_op_flash_attn_ext_extra_blk(tensor);
198
198
  res += wsp_ggml_metal_op_flash_attn_ext_extra_tmp(tensor);
199
199
  } break;
200
+ case WSP_GGML_OP_CUMSUM:
201
+ case WSP_GGML_OP_ARGSORT:
202
+ {
203
+ res *= 2;
204
+ } break;
200
205
  default:
201
206
  break;
202
207
  }