henryNdubuaku commited on
Commit
f84005f
·
verified ·
1 Parent(s): 27c0a9a

Replace binaries from production build

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +8 -0
  2. android-arm64/libneedle.a +2 -2
  3. android-arm64/needle +2 -2
  4. android-arm64/needle.h +62 -15
  5. android-armv7/libneedle.a +2 -2
  6. android-armv7/needle +2 -2
  7. android-armv7/needle.h +62 -15
  8. android-riscv64/libneedle.a +2 -2
  9. android-riscv64/needle +2 -2
  10. android-riscv64/needle.h +62 -15
  11. assets/deploy.svg +2 -2
  12. config.json +1 -1
  13. ios-arm64/libneedle.a +2 -2
  14. ios-arm64/needle.h +62 -15
  15. ios-sim-arm64/libneedle.a +2 -2
  16. ios-sim-arm64/needle.h +62 -15
  17. linux-arm64/libneedle.a +2 -2
  18. linux-arm64/needle +2 -2
  19. linux-arm64/needle.h +62 -15
  20. linux-armv7/libneedle.a +2 -2
  21. linux-armv7/needle +2 -2
  22. linux-armv7/needle.h +62 -15
  23. linux-mipsel/libneedle.a +2 -2
  24. linux-mipsel/needle +2 -2
  25. linux-mipsel/needle.h +62 -15
  26. linux-riscv64/libneedle.a +2 -2
  27. linux-riscv64/needle +2 -2
  28. linux-riscv64/needle.h +62 -15
  29. linux-x86_64/libneedle.a +2 -2
  30. linux-x86_64/needle +2 -2
  31. linux-x86_64/needle.h +62 -15
  32. macos-arm64/libneedle.a +2 -2
  33. macos-arm64/needle +2 -2
  34. macos-arm64/needle.h +62 -15
  35. python/cactus_needle-3.1.0-py3-none-macosx_11_0_arm64.whl +3 -0
  36. python/cactus_needle-3.1.0-py3-none-macosx_11_0_x86_64.whl +3 -0
  37. python/cactus_needle-3.1.0-py3-none-manylinux2014_aarch64.whl +3 -0
  38. python/cactus_needle-3.1.0-py3-none-manylinux2014_x86_64.whl +3 -0
  39. python/cactus_needle-3.1.0-py3-none-musllinux_1_2_aarch64.whl +3 -0
  40. python/cactus_needle-3.1.0-py3-none-musllinux_1_2_x86_64.whl +3 -0
  41. python/cactus_needle-3.1.0-py3-none-win_amd64.whl +3 -0
  42. python/cactus_needle-3.1.0-py3-none-win_arm64.whl +3 -0
  43. tvos-arm64/libneedle.a +2 -2
  44. tvos-arm64/needle.h +62 -15
  45. wasm-component/needle.component.wasm +2 -2
  46. wasm/needle.h +62 -15
  47. wasm/needle.js +0 -0
  48. wasm/needle.wasm +2 -2
  49. watchos-arm64/libneedle.a +2 -2
  50. watchos-arm64/needle.h +62 -15
.gitattributes CHANGED
@@ -86,3 +86,11 @@ python/cactus_needle-3.0.2-py3-none-musllinux_1_2_aarch64.whl filter=lfs diff=lf
86
  python/cactus_needle-3.0.2-py3-none-musllinux_1_2_x86_64.whl filter=lfs diff=lfs merge=lfs -text
87
  python/cactus_needle-3.0.2-py3-none-win_amd64.whl filter=lfs diff=lfs merge=lfs -text
88
  python/cactus_needle-3.0.2-py3-none-win_arm64.whl filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
86
  python/cactus_needle-3.0.2-py3-none-musllinux_1_2_x86_64.whl filter=lfs diff=lfs merge=lfs -text
87
  python/cactus_needle-3.0.2-py3-none-win_amd64.whl filter=lfs diff=lfs merge=lfs -text
88
  python/cactus_needle-3.0.2-py3-none-win_arm64.whl filter=lfs diff=lfs merge=lfs -text
89
+ python/cactus_needle-3.1.0-py3-none-macosx_11_0_arm64.whl filter=lfs diff=lfs merge=lfs -text
90
+ python/cactus_needle-3.1.0-py3-none-macosx_11_0_x86_64.whl filter=lfs diff=lfs merge=lfs -text
91
+ python/cactus_needle-3.1.0-py3-none-manylinux2014_aarch64.whl filter=lfs diff=lfs merge=lfs -text
92
+ python/cactus_needle-3.1.0-py3-none-manylinux2014_x86_64.whl filter=lfs diff=lfs merge=lfs -text
93
+ python/cactus_needle-3.1.0-py3-none-musllinux_1_2_aarch64.whl filter=lfs diff=lfs merge=lfs -text
94
+ python/cactus_needle-3.1.0-py3-none-musllinux_1_2_x86_64.whl filter=lfs diff=lfs merge=lfs -text
95
+ python/cactus_needle-3.1.0-py3-none-win_amd64.whl filter=lfs diff=lfs merge=lfs -text
96
+ python/cactus_needle-3.1.0-py3-none-win_arm64.whl filter=lfs diff=lfs merge=lfs -text
android-arm64/libneedle.a CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b8e73952054686f68e4319dcf69ad72a3de57faab73b73d9a67898f2c9d66110
3
- size 1664680
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:16752fb75adea7af89bbc435a97d1cda7e71bc74d04578d551d0d3bbd5f9e633
3
+ size 2128166
android-arm64/needle CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:894f7859b92ec7693de721dc60812ce6a4317cdd7f8c31021c4eb1ab27345105
3
- size 1192864
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4a8f2090c5dc7d21ca52b9d167682d5ccb51f730fa21f4c6a700b320c858a17b
3
+ size 1468888
android-arm64/needle.h CHANGED
@@ -5,42 +5,89 @@
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
 
 
 
8
  #ifdef __cplusplus
9
  extern "C" {
10
  #endif
11
 
12
- /* One process-global, non-thread-safe model. Negative returns indicate failure.
13
- needle_init returns the tokenized static-prefix length on success. It can fail
14
- when the system prompt plus statically-declared tools do not fit the model's
15
- context window; call needle_last_error() for the specific reason. */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  NEEDLE_API int needle_init(
17
  const char* system_prompt,
18
  const char* tools_json,
19
  const char* tool_index_path
20
  );
21
 
22
- /* Last process-global error, owned by the runtime and valid until the next API call. */
23
- NEEDLE_API const char* needle_last_error(void);
24
-
 
25
  NEEDLE_API int needle_complete(
26
  const char* input,
 
 
27
  int max_new_tokens,
28
  char* out,
29
  int out_capacity
30
  );
31
 
32
- /* A null output returns the model's embedding dimension without computing. */
33
- NEEDLE_API int needle_embed(
34
- const char* input,
35
- float* out,
36
- int out_capacity
 
 
37
  );
38
 
39
  NEEDLE_API void needle_reset(void);
40
 
41
- NEEDLE_API int needle_load(
42
- const unsigned char* cact,
43
- unsigned long long n
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  );
45
 
46
  #ifdef __cplusplus
 
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
8
+ #define NEEDLE_TEXT 1
9
+ #define NEEDLE_SPEECH 2
10
+
11
  #ifdef __cplusplus
12
  extern "C" {
13
  #endif
14
 
15
+ /* One process-global, non-thread-safe model per kind, text and speech.
16
+ Negative returns indicate failure; call needle_last_error() for the specific
17
+ reason. needle_load reads whichever kind the .cact holds and keeps the other,
18
+ so a build with both models takes one call per model. */
19
+ NEEDLE_API int needle_load(
20
+ const unsigned char* cact,
21
+ unsigned long long n
22
+ );
23
+
24
+ /* NEEDLE_TEXT, NEEDLE_SPEECH or both, for the models this process has loaded. */
25
+ NEEDLE_API int needle_models(void);
26
+
27
+ /* Last process-global error, owned by the runtime and valid until the next API call. */
28
+ NEEDLE_API const char* needle_last_error(void);
29
+
30
+ /* needle_init returns the tokenized static-prefix length on success. It can fail
31
+ when the system prompt plus statically-declared tools exceed the context
32
+ window, and reports the measured token count when it does. */
33
  NEEDLE_API int needle_init(
34
  const char* system_prompt,
35
  const char* tools_json,
36
  const char* tool_index_path
37
  );
38
 
39
+ /* Answers text or speech: exactly one of input and pcm is non-null. Given pcm,
40
+ the engine transcribes the clip with the loaded speech model, answers the
41
+ transcript, and merges the speech fields into the same JSON object under an
42
+ audio_ prefix. needle_set_audio chooses how that transcription runs. */
43
  NEEDLE_API int needle_complete(
44
  const char* input,
45
+ const float* pcm,
46
+ int samples,
47
  int max_new_tokens,
48
  char* out,
49
  int out_capacity
50
  );
51
 
52
+ /* Language, keywords and word timestamps for the transcription needle_complete
53
+ runs for itself, with the meanings they have in needle_transcribe. The
54
+ strings are copied. Defaults: detect the language, no keywords, no times. */
55
+ NEEDLE_API void needle_set_audio(
56
+ const char* language,
57
+ const char* keywords,
58
+ int word_timestamps
59
  );
60
 
61
  NEEDLE_API void needle_reset(void);
62
 
63
+ /* Transcribes 16 kHz mono float PCM in [-1, 1], at most 30 s, and returns the
64
+ number of tokens generated. language is "en", "de", "fr", "es", "it", "nl" or
65
+ "pl", or NULL to detect it. keywords is NULL or newline-separated words and
66
+ phrases for keyword biasing. out receives JSON with the transcript, the
67
+ language used, the milliseconds to the first token and the decoder's tokens
68
+ per second after it; silence and steady noise give an empty text and language:
69
+ {"text":"...","language":"en","ttft_ms":0.0,"decode_tps":0.0}
70
+ A non-zero word_timestamps adds each word with times in seconds:
71
+ "words":[{"word":"...","start":0.00,"end":0.00,"probability":0.000}] */
72
+ NEEDLE_API int needle_transcribe(
73
+ const float* pcm,
74
+ int samples,
75
+ const char* language,
76
+ const char* keywords,
77
+ int word_timestamps,
78
+ char* out,
79
+ int out_capacity
80
+ );
81
+
82
+ /* Embeds text or speech: exactly one of input and pcm is non-null. Text returns
83
+ the model's embedding dimension, speech one row of that width per 80 ms frame,
84
+ flattened. A null output returns the float count without computing. */
85
+ NEEDLE_API int needle_embed(
86
+ const char* input,
87
+ const float* pcm,
88
+ int samples,
89
+ float* out,
90
+ int out_capacity
91
  );
92
 
93
  #ifdef __cplusplus
android-armv7/libneedle.a CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:162d98ef1e9d91db670ccc2f40d0de5a45d4184bf62995f4ae62a9dea52d862c
3
- size 1291188
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8cb5af3c2a7e6ad55a1fe94cb9b6c012b40ae921aae2981594362389872fa7c0
3
+ size 1646250
android-armv7/needle CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:eeafc203dfb3b3f4e51d842df94af85df2cc99c79e5477582da501e05922d3e3
3
- size 703536
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eab77b1712b5127201d7e9cbb700f03b3645566347be0446c4818002deeab9d3
3
+ size 893692
android-armv7/needle.h CHANGED
@@ -5,42 +5,89 @@
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
 
 
 
8
  #ifdef __cplusplus
9
  extern "C" {
10
  #endif
11
 
12
- /* One process-global, non-thread-safe model. Negative returns indicate failure.
13
- needle_init returns the tokenized static-prefix length on success. It can fail
14
- when the system prompt plus statically-declared tools do not fit the model's
15
- context window; call needle_last_error() for the specific reason. */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  NEEDLE_API int needle_init(
17
  const char* system_prompt,
18
  const char* tools_json,
19
  const char* tool_index_path
20
  );
21
 
22
- /* Last process-global error, owned by the runtime and valid until the next API call. */
23
- NEEDLE_API const char* needle_last_error(void);
24
-
 
25
  NEEDLE_API int needle_complete(
26
  const char* input,
 
 
27
  int max_new_tokens,
28
  char* out,
29
  int out_capacity
30
  );
31
 
32
- /* A null output returns the model's embedding dimension without computing. */
33
- NEEDLE_API int needle_embed(
34
- const char* input,
35
- float* out,
36
- int out_capacity
 
 
37
  );
38
 
39
  NEEDLE_API void needle_reset(void);
40
 
41
- NEEDLE_API int needle_load(
42
- const unsigned char* cact,
43
- unsigned long long n
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  );
45
 
46
  #ifdef __cplusplus
 
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
8
+ #define NEEDLE_TEXT 1
9
+ #define NEEDLE_SPEECH 2
10
+
11
  #ifdef __cplusplus
12
  extern "C" {
13
  #endif
14
 
15
+ /* One process-global, non-thread-safe model per kind, text and speech.
16
+ Negative returns indicate failure; call needle_last_error() for the specific
17
+ reason. needle_load reads whichever kind the .cact holds and keeps the other,
18
+ so a build with both models takes one call per model. */
19
+ NEEDLE_API int needle_load(
20
+ const unsigned char* cact,
21
+ unsigned long long n
22
+ );
23
+
24
+ /* NEEDLE_TEXT, NEEDLE_SPEECH or both, for the models this process has loaded. */
25
+ NEEDLE_API int needle_models(void);
26
+
27
+ /* Last process-global error, owned by the runtime and valid until the next API call. */
28
+ NEEDLE_API const char* needle_last_error(void);
29
+
30
+ /* needle_init returns the tokenized static-prefix length on success. It can fail
31
+ when the system prompt plus statically-declared tools exceed the context
32
+ window, and reports the measured token count when it does. */
33
  NEEDLE_API int needle_init(
34
  const char* system_prompt,
35
  const char* tools_json,
36
  const char* tool_index_path
37
  );
38
 
39
+ /* Answers text or speech: exactly one of input and pcm is non-null. Given pcm,
40
+ the engine transcribes the clip with the loaded speech model, answers the
41
+ transcript, and merges the speech fields into the same JSON object under an
42
+ audio_ prefix. needle_set_audio chooses how that transcription runs. */
43
  NEEDLE_API int needle_complete(
44
  const char* input,
45
+ const float* pcm,
46
+ int samples,
47
  int max_new_tokens,
48
  char* out,
49
  int out_capacity
50
  );
51
 
52
+ /* Language, keywords and word timestamps for the transcription needle_complete
53
+ runs for itself, with the meanings they have in needle_transcribe. The
54
+ strings are copied. Defaults: detect the language, no keywords, no times. */
55
+ NEEDLE_API void needle_set_audio(
56
+ const char* language,
57
+ const char* keywords,
58
+ int word_timestamps
59
  );
60
 
61
  NEEDLE_API void needle_reset(void);
62
 
63
+ /* Transcribes 16 kHz mono float PCM in [-1, 1], at most 30 s, and returns the
64
+ number of tokens generated. language is "en", "de", "fr", "es", "it", "nl" or
65
+ "pl", or NULL to detect it. keywords is NULL or newline-separated words and
66
+ phrases for keyword biasing. out receives JSON with the transcript, the
67
+ language used, the milliseconds to the first token and the decoder's tokens
68
+ per second after it; silence and steady noise give an empty text and language:
69
+ {"text":"...","language":"en","ttft_ms":0.0,"decode_tps":0.0}
70
+ A non-zero word_timestamps adds each word with times in seconds:
71
+ "words":[{"word":"...","start":0.00,"end":0.00,"probability":0.000}] */
72
+ NEEDLE_API int needle_transcribe(
73
+ const float* pcm,
74
+ int samples,
75
+ const char* language,
76
+ const char* keywords,
77
+ int word_timestamps,
78
+ char* out,
79
+ int out_capacity
80
+ );
81
+
82
+ /* Embeds text or speech: exactly one of input and pcm is non-null. Text returns
83
+ the model's embedding dimension, speech one row of that width per 80 ms frame,
84
+ flattened. A null output returns the float count without computing. */
85
+ NEEDLE_API int needle_embed(
86
+ const char* input,
87
+ const float* pcm,
88
+ int samples,
89
+ float* out,
90
+ int out_capacity
91
  );
92
 
93
  #ifdef __cplusplus
android-riscv64/libneedle.a CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:92396186b83ed15dd385d4e2084fdb722f0f4ab434096ae7c3de02bb1055959d
3
- size 3715858
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5580972d83ea6eb466c0989d605935233360564b24f20ef7f671c08e0e8f7482
3
+ size 4634608
android-riscv64/needle CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:78acd7a7b34afdbc33fa8940aecb564eb3701bb0ac27fe26aa73ff727981761f
3
- size 1040256
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:846948100f440c014f046c4615a2ff0cc9febeabef0768fda9db5a4e98f7e82f
3
+ size 1277992
android-riscv64/needle.h CHANGED
@@ -5,42 +5,89 @@
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
 
 
 
8
  #ifdef __cplusplus
9
  extern "C" {
10
  #endif
11
 
12
- /* One process-global, non-thread-safe model. Negative returns indicate failure.
13
- needle_init returns the tokenized static-prefix length on success. It can fail
14
- when the system prompt plus statically-declared tools do not fit the model's
15
- context window; call needle_last_error() for the specific reason. */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  NEEDLE_API int needle_init(
17
  const char* system_prompt,
18
  const char* tools_json,
19
  const char* tool_index_path
20
  );
21
 
22
- /* Last process-global error, owned by the runtime and valid until the next API call. */
23
- NEEDLE_API const char* needle_last_error(void);
24
-
 
25
  NEEDLE_API int needle_complete(
26
  const char* input,
 
 
27
  int max_new_tokens,
28
  char* out,
29
  int out_capacity
30
  );
31
 
32
- /* A null output returns the model's embedding dimension without computing. */
33
- NEEDLE_API int needle_embed(
34
- const char* input,
35
- float* out,
36
- int out_capacity
 
 
37
  );
38
 
39
  NEEDLE_API void needle_reset(void);
40
 
41
- NEEDLE_API int needle_load(
42
- const unsigned char* cact,
43
- unsigned long long n
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  );
45
 
46
  #ifdef __cplusplus
 
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
8
+ #define NEEDLE_TEXT 1
9
+ #define NEEDLE_SPEECH 2
10
+
11
  #ifdef __cplusplus
12
  extern "C" {
13
  #endif
14
 
15
+ /* One process-global, non-thread-safe model per kind, text and speech.
16
+ Negative returns indicate failure; call needle_last_error() for the specific
17
+ reason. needle_load reads whichever kind the .cact holds and keeps the other,
18
+ so a build with both models takes one call per model. */
19
+ NEEDLE_API int needle_load(
20
+ const unsigned char* cact,
21
+ unsigned long long n
22
+ );
23
+
24
+ /* NEEDLE_TEXT, NEEDLE_SPEECH or both, for the models this process has loaded. */
25
+ NEEDLE_API int needle_models(void);
26
+
27
+ /* Last process-global error, owned by the runtime and valid until the next API call. */
28
+ NEEDLE_API const char* needle_last_error(void);
29
+
30
+ /* needle_init returns the tokenized static-prefix length on success. It can fail
31
+ when the system prompt plus statically-declared tools exceed the context
32
+ window, and reports the measured token count when it does. */
33
  NEEDLE_API int needle_init(
34
  const char* system_prompt,
35
  const char* tools_json,
36
  const char* tool_index_path
37
  );
38
 
39
+ /* Answers text or speech: exactly one of input and pcm is non-null. Given pcm,
40
+ the engine transcribes the clip with the loaded speech model, answers the
41
+ transcript, and merges the speech fields into the same JSON object under an
42
+ audio_ prefix. needle_set_audio chooses how that transcription runs. */
43
  NEEDLE_API int needle_complete(
44
  const char* input,
45
+ const float* pcm,
46
+ int samples,
47
  int max_new_tokens,
48
  char* out,
49
  int out_capacity
50
  );
51
 
52
+ /* Language, keywords and word timestamps for the transcription needle_complete
53
+ runs for itself, with the meanings they have in needle_transcribe. The
54
+ strings are copied. Defaults: detect the language, no keywords, no times. */
55
+ NEEDLE_API void needle_set_audio(
56
+ const char* language,
57
+ const char* keywords,
58
+ int word_timestamps
59
  );
60
 
61
  NEEDLE_API void needle_reset(void);
62
 
63
+ /* Transcribes 16 kHz mono float PCM in [-1, 1], at most 30 s, and returns the
64
+ number of tokens generated. language is "en", "de", "fr", "es", "it", "nl" or
65
+ "pl", or NULL to detect it. keywords is NULL or newline-separated words and
66
+ phrases for keyword biasing. out receives JSON with the transcript, the
67
+ language used, the milliseconds to the first token and the decoder's tokens
68
+ per second after it; silence and steady noise give an empty text and language:
69
+ {"text":"...","language":"en","ttft_ms":0.0,"decode_tps":0.0}
70
+ A non-zero word_timestamps adds each word with times in seconds:
71
+ "words":[{"word":"...","start":0.00,"end":0.00,"probability":0.000}] */
72
+ NEEDLE_API int needle_transcribe(
73
+ const float* pcm,
74
+ int samples,
75
+ const char* language,
76
+ const char* keywords,
77
+ int word_timestamps,
78
+ char* out,
79
+ int out_capacity
80
+ );
81
+
82
+ /* Embeds text or speech: exactly one of input and pcm is non-null. Text returns
83
+ the model's embedding dimension, speech one row of that width per 80 ms frame,
84
+ flattened. A null output returns the float count without computing. */
85
+ NEEDLE_API int needle_embed(
86
+ const char* input,
87
+ const float* pcm,
88
+ int samples,
89
+ float* out,
90
+ int out_capacity
91
  );
92
 
93
  #ifdef __cplusplus
assets/deploy.svg CHANGED
config.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "model_type": "needle",
3
- "engine_version": "3.0.2",
4
  "architectures": [
5
  "NeedleForToolCalling"
6
  ],
 
1
  {
2
  "model_type": "needle",
3
+ "engine_version": "3.1.0",
4
  "architectures": [
5
  "NeedleForToolCalling"
6
  ],
ios-arm64/libneedle.a CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9cbacdf197c997b126962bedc8852b970ee73c7367b5f605123d318f04423cc6
3
- size 1137864
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e507b914d32cfe7dfbc9be8de65dc899451d8cbd38a63b2e47bfddaca73373ac
3
+ size 1465680
ios-arm64/needle.h CHANGED
@@ -5,42 +5,89 @@
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
 
 
 
8
  #ifdef __cplusplus
9
  extern "C" {
10
  #endif
11
 
12
- /* One process-global, non-thread-safe model. Negative returns indicate failure.
13
- needle_init returns the tokenized static-prefix length on success. It can fail
14
- when the system prompt plus statically-declared tools do not fit the model's
15
- context window; call needle_last_error() for the specific reason. */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  NEEDLE_API int needle_init(
17
  const char* system_prompt,
18
  const char* tools_json,
19
  const char* tool_index_path
20
  );
21
 
22
- /* Last process-global error, owned by the runtime and valid until the next API call. */
23
- NEEDLE_API const char* needle_last_error(void);
24
-
 
25
  NEEDLE_API int needle_complete(
26
  const char* input,
 
 
27
  int max_new_tokens,
28
  char* out,
29
  int out_capacity
30
  );
31
 
32
- /* A null output returns the model's embedding dimension without computing. */
33
- NEEDLE_API int needle_embed(
34
- const char* input,
35
- float* out,
36
- int out_capacity
 
 
37
  );
38
 
39
  NEEDLE_API void needle_reset(void);
40
 
41
- NEEDLE_API int needle_load(
42
- const unsigned char* cact,
43
- unsigned long long n
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  );
45
 
46
  #ifdef __cplusplus
 
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
8
+ #define NEEDLE_TEXT 1
9
+ #define NEEDLE_SPEECH 2
10
+
11
  #ifdef __cplusplus
12
  extern "C" {
13
  #endif
14
 
15
+ /* One process-global, non-thread-safe model per kind, text and speech.
16
+ Negative returns indicate failure; call needle_last_error() for the specific
17
+ reason. needle_load reads whichever kind the .cact holds and keeps the other,
18
+ so a build with both models takes one call per model. */
19
+ NEEDLE_API int needle_load(
20
+ const unsigned char* cact,
21
+ unsigned long long n
22
+ );
23
+
24
+ /* NEEDLE_TEXT, NEEDLE_SPEECH or both, for the models this process has loaded. */
25
+ NEEDLE_API int needle_models(void);
26
+
27
+ /* Last process-global error, owned by the runtime and valid until the next API call. */
28
+ NEEDLE_API const char* needle_last_error(void);
29
+
30
+ /* needle_init returns the tokenized static-prefix length on success. It can fail
31
+ when the system prompt plus statically-declared tools exceed the context
32
+ window, and reports the measured token count when it does. */
33
  NEEDLE_API int needle_init(
34
  const char* system_prompt,
35
  const char* tools_json,
36
  const char* tool_index_path
37
  );
38
 
39
+ /* Answers text or speech: exactly one of input and pcm is non-null. Given pcm,
40
+ the engine transcribes the clip with the loaded speech model, answers the
41
+ transcript, and merges the speech fields into the same JSON object under an
42
+ audio_ prefix. needle_set_audio chooses how that transcription runs. */
43
  NEEDLE_API int needle_complete(
44
  const char* input,
45
+ const float* pcm,
46
+ int samples,
47
  int max_new_tokens,
48
  char* out,
49
  int out_capacity
50
  );
51
 
52
+ /* Language, keywords and word timestamps for the transcription needle_complete
53
+ runs for itself, with the meanings they have in needle_transcribe. The
54
+ strings are copied. Defaults: detect the language, no keywords, no times. */
55
+ NEEDLE_API void needle_set_audio(
56
+ const char* language,
57
+ const char* keywords,
58
+ int word_timestamps
59
  );
60
 
61
  NEEDLE_API void needle_reset(void);
62
 
63
+ /* Transcribes 16 kHz mono float PCM in [-1, 1], at most 30 s, and returns the
64
+ number of tokens generated. language is "en", "de", "fr", "es", "it", "nl" or
65
+ "pl", or NULL to detect it. keywords is NULL or newline-separated words and
66
+ phrases for keyword biasing. out receives JSON with the transcript, the
67
+ language used, the milliseconds to the first token and the decoder's tokens
68
+ per second after it; silence and steady noise give an empty text and language:
69
+ {"text":"...","language":"en","ttft_ms":0.0,"decode_tps":0.0}
70
+ A non-zero word_timestamps adds each word with times in seconds:
71
+ "words":[{"word":"...","start":0.00,"end":0.00,"probability":0.000}] */
72
+ NEEDLE_API int needle_transcribe(
73
+ const float* pcm,
74
+ int samples,
75
+ const char* language,
76
+ const char* keywords,
77
+ int word_timestamps,
78
+ char* out,
79
+ int out_capacity
80
+ );
81
+
82
+ /* Embeds text or speech: exactly one of input and pcm is non-null. Text returns
83
+ the model's embedding dimension, speech one row of that width per 80 ms frame,
84
+ flattened. A null output returns the float count without computing. */
85
+ NEEDLE_API int needle_embed(
86
+ const char* input,
87
+ const float* pcm,
88
+ int samples,
89
+ float* out,
90
+ int out_capacity
91
  );
92
 
93
  #ifdef __cplusplus
ios-sim-arm64/libneedle.a CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7a6692dc58b9e4b49d7c1cc0223e3b36dcb7ad4ab613579773939536a3668d66
3
- size 1155504
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a75a67f98c057cef82977e5e1e3d505b57fed131710a5ae89683ad9d0d74d849
3
+ size 1503120
ios-sim-arm64/needle.h CHANGED
@@ -5,42 +5,89 @@
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
 
 
 
8
  #ifdef __cplusplus
9
  extern "C" {
10
  #endif
11
 
12
- /* One process-global, non-thread-safe model. Negative returns indicate failure.
13
- needle_init returns the tokenized static-prefix length on success. It can fail
14
- when the system prompt plus statically-declared tools do not fit the model's
15
- context window; call needle_last_error() for the specific reason. */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  NEEDLE_API int needle_init(
17
  const char* system_prompt,
18
  const char* tools_json,
19
  const char* tool_index_path
20
  );
21
 
22
- /* Last process-global error, owned by the runtime and valid until the next API call. */
23
- NEEDLE_API const char* needle_last_error(void);
24
-
 
25
  NEEDLE_API int needle_complete(
26
  const char* input,
 
 
27
  int max_new_tokens,
28
  char* out,
29
  int out_capacity
30
  );
31
 
32
- /* A null output returns the model's embedding dimension without computing. */
33
- NEEDLE_API int needle_embed(
34
- const char* input,
35
- float* out,
36
- int out_capacity
 
 
37
  );
38
 
39
  NEEDLE_API void needle_reset(void);
40
 
41
- NEEDLE_API int needle_load(
42
- const unsigned char* cact,
43
- unsigned long long n
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  );
45
 
46
  #ifdef __cplusplus
 
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
8
+ #define NEEDLE_TEXT 1
9
+ #define NEEDLE_SPEECH 2
10
+
11
  #ifdef __cplusplus
12
  extern "C" {
13
  #endif
14
 
15
+ /* One process-global, non-thread-safe model per kind, text and speech.
16
+ Negative returns indicate failure; call needle_last_error() for the specific
17
+ reason. needle_load reads whichever kind the .cact holds and keeps the other,
18
+ so a build with both models takes one call per model. */
19
+ NEEDLE_API int needle_load(
20
+ const unsigned char* cact,
21
+ unsigned long long n
22
+ );
23
+
24
+ /* NEEDLE_TEXT, NEEDLE_SPEECH or both, for the models this process has loaded. */
25
+ NEEDLE_API int needle_models(void);
26
+
27
+ /* Last process-global error, owned by the runtime and valid until the next API call. */
28
+ NEEDLE_API const char* needle_last_error(void);
29
+
30
+ /* needle_init returns the tokenized static-prefix length on success. It can fail
31
+ when the system prompt plus statically-declared tools exceed the context
32
+ window, and reports the measured token count when it does. */
33
  NEEDLE_API int needle_init(
34
  const char* system_prompt,
35
  const char* tools_json,
36
  const char* tool_index_path
37
  );
38
 
39
+ /* Answers text or speech: exactly one of input and pcm is non-null. Given pcm,
40
+ the engine transcribes the clip with the loaded speech model, answers the
41
+ transcript, and merges the speech fields into the same JSON object under an
42
+ audio_ prefix. needle_set_audio chooses how that transcription runs. */
43
  NEEDLE_API int needle_complete(
44
  const char* input,
45
+ const float* pcm,
46
+ int samples,
47
  int max_new_tokens,
48
  char* out,
49
  int out_capacity
50
  );
51
 
52
+ /* Language, keywords and word timestamps for the transcription needle_complete
53
+ runs for itself, with the meanings they have in needle_transcribe. The
54
+ strings are copied. Defaults: detect the language, no keywords, no times. */
55
+ NEEDLE_API void needle_set_audio(
56
+ const char* language,
57
+ const char* keywords,
58
+ int word_timestamps
59
  );
60
 
61
  NEEDLE_API void needle_reset(void);
62
 
63
+ /* Transcribes 16 kHz mono float PCM in [-1, 1], at most 30 s, and returns the
64
+ number of tokens generated. language is "en", "de", "fr", "es", "it", "nl" or
65
+ "pl", or NULL to detect it. keywords is NULL or newline-separated words and
66
+ phrases for keyword biasing. out receives JSON with the transcript, the
67
+ language used, the milliseconds to the first token and the decoder's tokens
68
+ per second after it; silence and steady noise give an empty text and language:
69
+ {"text":"...","language":"en","ttft_ms":0.0,"decode_tps":0.0}
70
+ A non-zero word_timestamps adds each word with times in seconds:
71
+ "words":[{"word":"...","start":0.00,"end":0.00,"probability":0.000}] */
72
+ NEEDLE_API int needle_transcribe(
73
+ const float* pcm,
74
+ int samples,
75
+ const char* language,
76
+ const char* keywords,
77
+ int word_timestamps,
78
+ char* out,
79
+ int out_capacity
80
+ );
81
+
82
+ /* Embeds text or speech: exactly one of input and pcm is non-null. Text returns
83
+ the model's embedding dimension, speech one row of that width per 80 ms frame,
84
+ flattened. A null output returns the float count without computing. */
85
+ NEEDLE_API int needle_embed(
86
+ const char* input,
87
+ const float* pcm,
88
+ int samples,
89
+ float* out,
90
+ int out_capacity
91
  );
92
 
93
  #ifdef __cplusplus
linux-arm64/libneedle.a CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:cc94801686922cb2ea2be6822046d1c152e5b3a7e93c773ecbb8cf0f0fab61d3
3
- size 1540974
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d6e33724cab170f0a25bd943d3a8ed5da925fcb793e9fcb1f201bf2478a50f91
3
+ size 1966732
linux-arm64/needle CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:89bcfac2e0c38f70818e7c8936c4f8be2a8eb27eb8eb19a8babea303470afee4
3
- size 1168392
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bcf48b66a3e1834e8cb92c9f9998d85d4618d3e949c8a9d293116749a1f0d205
3
+ size 1409312
linux-arm64/needle.h CHANGED
@@ -5,42 +5,89 @@
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
 
 
 
8
  #ifdef __cplusplus
9
  extern "C" {
10
  #endif
11
 
12
- /* One process-global, non-thread-safe model. Negative returns indicate failure.
13
- needle_init returns the tokenized static-prefix length on success. It can fail
14
- when the system prompt plus statically-declared tools do not fit the model's
15
- context window; call needle_last_error() for the specific reason. */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  NEEDLE_API int needle_init(
17
  const char* system_prompt,
18
  const char* tools_json,
19
  const char* tool_index_path
20
  );
21
 
22
- /* Last process-global error, owned by the runtime and valid until the next API call. */
23
- NEEDLE_API const char* needle_last_error(void);
24
-
 
25
  NEEDLE_API int needle_complete(
26
  const char* input,
 
 
27
  int max_new_tokens,
28
  char* out,
29
  int out_capacity
30
  );
31
 
32
- /* A null output returns the model's embedding dimension without computing. */
33
- NEEDLE_API int needle_embed(
34
- const char* input,
35
- float* out,
36
- int out_capacity
 
 
37
  );
38
 
39
  NEEDLE_API void needle_reset(void);
40
 
41
- NEEDLE_API int needle_load(
42
- const unsigned char* cact,
43
- unsigned long long n
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  );
45
 
46
  #ifdef __cplusplus
 
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
8
+ #define NEEDLE_TEXT 1
9
+ #define NEEDLE_SPEECH 2
10
+
11
  #ifdef __cplusplus
12
  extern "C" {
13
  #endif
14
 
15
+ /* One process-global, non-thread-safe model per kind, text and speech.
16
+ Negative returns indicate failure; call needle_last_error() for the specific
17
+ reason. needle_load reads whichever kind the .cact holds and keeps the other,
18
+ so a build with both models takes one call per model. */
19
+ NEEDLE_API int needle_load(
20
+ const unsigned char* cact,
21
+ unsigned long long n
22
+ );
23
+
24
+ /* NEEDLE_TEXT, NEEDLE_SPEECH or both, for the models this process has loaded. */
25
+ NEEDLE_API int needle_models(void);
26
+
27
+ /* Last process-global error, owned by the runtime and valid until the next API call. */
28
+ NEEDLE_API const char* needle_last_error(void);
29
+
30
+ /* needle_init returns the tokenized static-prefix length on success. It can fail
31
+ when the system prompt plus statically-declared tools exceed the context
32
+ window, and reports the measured token count when it does. */
33
  NEEDLE_API int needle_init(
34
  const char* system_prompt,
35
  const char* tools_json,
36
  const char* tool_index_path
37
  );
38
 
39
+ /* Answers text or speech: exactly one of input and pcm is non-null. Given pcm,
40
+ the engine transcribes the clip with the loaded speech model, answers the
41
+ transcript, and merges the speech fields into the same JSON object under an
42
+ audio_ prefix. needle_set_audio chooses how that transcription runs. */
43
  NEEDLE_API int needle_complete(
44
  const char* input,
45
+ const float* pcm,
46
+ int samples,
47
  int max_new_tokens,
48
  char* out,
49
  int out_capacity
50
  );
51
 
52
+ /* Language, keywords and word timestamps for the transcription needle_complete
53
+ runs for itself, with the meanings they have in needle_transcribe. The
54
+ strings are copied. Defaults: detect the language, no keywords, no times. */
55
+ NEEDLE_API void needle_set_audio(
56
+ const char* language,
57
+ const char* keywords,
58
+ int word_timestamps
59
  );
60
 
61
  NEEDLE_API void needle_reset(void);
62
 
63
+ /* Transcribes 16 kHz mono float PCM in [-1, 1], at most 30 s, and returns the
64
+ number of tokens generated. language is "en", "de", "fr", "es", "it", "nl" or
65
+ "pl", or NULL to detect it. keywords is NULL or newline-separated words and
66
+ phrases for keyword biasing. out receives JSON with the transcript, the
67
+ language used, the milliseconds to the first token and the decoder's tokens
68
+ per second after it; silence and steady noise give an empty text and language:
69
+ {"text":"...","language":"en","ttft_ms":0.0,"decode_tps":0.0}
70
+ A non-zero word_timestamps adds each word with times in seconds:
71
+ "words":[{"word":"...","start":0.00,"end":0.00,"probability":0.000}] */
72
+ NEEDLE_API int needle_transcribe(
73
+ const float* pcm,
74
+ int samples,
75
+ const char* language,
76
+ const char* keywords,
77
+ int word_timestamps,
78
+ char* out,
79
+ int out_capacity
80
+ );
81
+
82
+ /* Embeds text or speech: exactly one of input and pcm is non-null. Text returns
83
+ the model's embedding dimension, speech one row of that width per 80 ms frame,
84
+ flattened. A null output returns the float count without computing. */
85
+ NEEDLE_API int needle_embed(
86
+ const char* input,
87
+ const float* pcm,
88
+ int samples,
89
+ float* out,
90
+ int out_capacity
91
  );
92
 
93
  #ifdef __cplusplus
linux-armv7/libneedle.a CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:35f35346813228971ee43947a136341c6b5ebf8c159ce30849822f02a1c868f8
3
- size 1358386
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f3cdfcc9a5e9aa3afcd0af6612fe2d6099f85c31b7fb5a7d486e3362e7e60c57
3
+ size 1732630
linux-armv7/needle CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:01d69ae6dcd1fafa156192480fbe0cb879b1338bf9b568dc562dac2ad8af2d2a
3
- size 998124
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9eea74cba1f8660b1d1835d5d1704559bdf06af6736cfa6dc403e9edc19da0a6
3
+ size 1216328
linux-armv7/needle.h CHANGED
@@ -5,42 +5,89 @@
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
 
 
 
8
  #ifdef __cplusplus
9
  extern "C" {
10
  #endif
11
 
12
- /* One process-global, non-thread-safe model. Negative returns indicate failure.
13
- needle_init returns the tokenized static-prefix length on success. It can fail
14
- when the system prompt plus statically-declared tools do not fit the model's
15
- context window; call needle_last_error() for the specific reason. */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  NEEDLE_API int needle_init(
17
  const char* system_prompt,
18
  const char* tools_json,
19
  const char* tool_index_path
20
  );
21
 
22
- /* Last process-global error, owned by the runtime and valid until the next API call. */
23
- NEEDLE_API const char* needle_last_error(void);
24
-
 
25
  NEEDLE_API int needle_complete(
26
  const char* input,
 
 
27
  int max_new_tokens,
28
  char* out,
29
  int out_capacity
30
  );
31
 
32
- /* A null output returns the model's embedding dimension without computing. */
33
- NEEDLE_API int needle_embed(
34
- const char* input,
35
- float* out,
36
- int out_capacity
 
 
37
  );
38
 
39
  NEEDLE_API void needle_reset(void);
40
 
41
- NEEDLE_API int needle_load(
42
- const unsigned char* cact,
43
- unsigned long long n
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  );
45
 
46
  #ifdef __cplusplus
 
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
8
+ #define NEEDLE_TEXT 1
9
+ #define NEEDLE_SPEECH 2
10
+
11
  #ifdef __cplusplus
12
  extern "C" {
13
  #endif
14
 
15
+ /* One process-global, non-thread-safe model per kind, text and speech.
16
+ Negative returns indicate failure; call needle_last_error() for the specific
17
+ reason. needle_load reads whichever kind the .cact holds and keeps the other,
18
+ so a build with both models takes one call per model. */
19
+ NEEDLE_API int needle_load(
20
+ const unsigned char* cact,
21
+ unsigned long long n
22
+ );
23
+
24
+ /* NEEDLE_TEXT, NEEDLE_SPEECH or both, for the models this process has loaded. */
25
+ NEEDLE_API int needle_models(void);
26
+
27
+ /* Last process-global error, owned by the runtime and valid until the next API call. */
28
+ NEEDLE_API const char* needle_last_error(void);
29
+
30
+ /* needle_init returns the tokenized static-prefix length on success. It can fail
31
+ when the system prompt plus statically-declared tools exceed the context
32
+ window, and reports the measured token count when it does. */
33
  NEEDLE_API int needle_init(
34
  const char* system_prompt,
35
  const char* tools_json,
36
  const char* tool_index_path
37
  );
38
 
39
+ /* Answers text or speech: exactly one of input and pcm is non-null. Given pcm,
40
+ the engine transcribes the clip with the loaded speech model, answers the
41
+ transcript, and merges the speech fields into the same JSON object under an
42
+ audio_ prefix. needle_set_audio chooses how that transcription runs. */
43
  NEEDLE_API int needle_complete(
44
  const char* input,
45
+ const float* pcm,
46
+ int samples,
47
  int max_new_tokens,
48
  char* out,
49
  int out_capacity
50
  );
51
 
52
+ /* Language, keywords and word timestamps for the transcription needle_complete
53
+ runs for itself, with the meanings they have in needle_transcribe. The
54
+ strings are copied. Defaults: detect the language, no keywords, no times. */
55
+ NEEDLE_API void needle_set_audio(
56
+ const char* language,
57
+ const char* keywords,
58
+ int word_timestamps
59
  );
60
 
61
  NEEDLE_API void needle_reset(void);
62
 
63
+ /* Transcribes 16 kHz mono float PCM in [-1, 1], at most 30 s, and returns the
64
+ number of tokens generated. language is "en", "de", "fr", "es", "it", "nl" or
65
+ "pl", or NULL to detect it. keywords is NULL or newline-separated words and
66
+ phrases for keyword biasing. out receives JSON with the transcript, the
67
+ language used, the milliseconds to the first token and the decoder's tokens
68
+ per second after it; silence and steady noise give an empty text and language:
69
+ {"text":"...","language":"en","ttft_ms":0.0,"decode_tps":0.0}
70
+ A non-zero word_timestamps adds each word with times in seconds:
71
+ "words":[{"word":"...","start":0.00,"end":0.00,"probability":0.000}] */
72
+ NEEDLE_API int needle_transcribe(
73
+ const float* pcm,
74
+ int samples,
75
+ const char* language,
76
+ const char* keywords,
77
+ int word_timestamps,
78
+ char* out,
79
+ int out_capacity
80
+ );
81
+
82
+ /* Embeds text or speech: exactly one of input and pcm is non-null. Text returns
83
+ the model's embedding dimension, speech one row of that width per 80 ms frame,
84
+ flattened. A null output returns the float count without computing. */
85
+ NEEDLE_API int needle_embed(
86
+ const char* input,
87
+ const float* pcm,
88
+ int samples,
89
+ float* out,
90
+ int out_capacity
91
  );
92
 
93
  #ifdef __cplusplus
linux-mipsel/libneedle.a CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e8b21452eb0fdd22fe07edd40b11032de7c9d425ff07406d8c5373fb98557f28
3
- size 1307030
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3a17c4c012075510c9f24321a98259dd02a2d6e03adf11a492c5951d1cbd5b7e
3
+ size 1636470
linux-mipsel/needle CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:275515de7bb763ce910d67fc7dfeff3c8db5976d17fdb363bda2330f4a52e24d
3
- size 1489036
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48aba03a7fd1575c9f0a26a864b04f714e0caba91f311073534dcb331e7b0f98
3
+ size 1773672
linux-mipsel/needle.h CHANGED
@@ -5,42 +5,89 @@
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
 
 
 
8
  #ifdef __cplusplus
9
  extern "C" {
10
  #endif
11
 
12
- /* One process-global, non-thread-safe model. Negative returns indicate failure.
13
- needle_init returns the tokenized static-prefix length on success. It can fail
14
- when the system prompt plus statically-declared tools do not fit the model's
15
- context window; call needle_last_error() for the specific reason. */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  NEEDLE_API int needle_init(
17
  const char* system_prompt,
18
  const char* tools_json,
19
  const char* tool_index_path
20
  );
21
 
22
- /* Last process-global error, owned by the runtime and valid until the next API call. */
23
- NEEDLE_API const char* needle_last_error(void);
24
-
 
25
  NEEDLE_API int needle_complete(
26
  const char* input,
 
 
27
  int max_new_tokens,
28
  char* out,
29
  int out_capacity
30
  );
31
 
32
- /* A null output returns the model's embedding dimension without computing. */
33
- NEEDLE_API int needle_embed(
34
- const char* input,
35
- float* out,
36
- int out_capacity
 
 
37
  );
38
 
39
  NEEDLE_API void needle_reset(void);
40
 
41
- NEEDLE_API int needle_load(
42
- const unsigned char* cact,
43
- unsigned long long n
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  );
45
 
46
  #ifdef __cplusplus
 
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
8
+ #define NEEDLE_TEXT 1
9
+ #define NEEDLE_SPEECH 2
10
+
11
  #ifdef __cplusplus
12
  extern "C" {
13
  #endif
14
 
15
+ /* One process-global, non-thread-safe model per kind, text and speech.
16
+ Negative returns indicate failure; call needle_last_error() for the specific
17
+ reason. needle_load reads whichever kind the .cact holds and keeps the other,
18
+ so a build with both models takes one call per model. */
19
+ NEEDLE_API int needle_load(
20
+ const unsigned char* cact,
21
+ unsigned long long n
22
+ );
23
+
24
+ /* NEEDLE_TEXT, NEEDLE_SPEECH or both, for the models this process has loaded. */
25
+ NEEDLE_API int needle_models(void);
26
+
27
+ /* Last process-global error, owned by the runtime and valid until the next API call. */
28
+ NEEDLE_API const char* needle_last_error(void);
29
+
30
+ /* needle_init returns the tokenized static-prefix length on success. It can fail
31
+ when the system prompt plus statically-declared tools exceed the context
32
+ window, and reports the measured token count when it does. */
33
  NEEDLE_API int needle_init(
34
  const char* system_prompt,
35
  const char* tools_json,
36
  const char* tool_index_path
37
  );
38
 
39
+ /* Answers text or speech: exactly one of input and pcm is non-null. Given pcm,
40
+ the engine transcribes the clip with the loaded speech model, answers the
41
+ transcript, and merges the speech fields into the same JSON object under an
42
+ audio_ prefix. needle_set_audio chooses how that transcription runs. */
43
  NEEDLE_API int needle_complete(
44
  const char* input,
45
+ const float* pcm,
46
+ int samples,
47
  int max_new_tokens,
48
  char* out,
49
  int out_capacity
50
  );
51
 
52
+ /* Language, keywords and word timestamps for the transcription needle_complete
53
+ runs for itself, with the meanings they have in needle_transcribe. The
54
+ strings are copied. Defaults: detect the language, no keywords, no times. */
55
+ NEEDLE_API void needle_set_audio(
56
+ const char* language,
57
+ const char* keywords,
58
+ int word_timestamps
59
  );
60
 
61
  NEEDLE_API void needle_reset(void);
62
 
63
+ /* Transcribes 16 kHz mono float PCM in [-1, 1], at most 30 s, and returns the
64
+ number of tokens generated. language is "en", "de", "fr", "es", "it", "nl" or
65
+ "pl", or NULL to detect it. keywords is NULL or newline-separated words and
66
+ phrases for keyword biasing. out receives JSON with the transcript, the
67
+ language used, the milliseconds to the first token and the decoder's tokens
68
+ per second after it; silence and steady noise give an empty text and language:
69
+ {"text":"...","language":"en","ttft_ms":0.0,"decode_tps":0.0}
70
+ A non-zero word_timestamps adds each word with times in seconds:
71
+ "words":[{"word":"...","start":0.00,"end":0.00,"probability":0.000}] */
72
+ NEEDLE_API int needle_transcribe(
73
+ const float* pcm,
74
+ int samples,
75
+ const char* language,
76
+ const char* keywords,
77
+ int word_timestamps,
78
+ char* out,
79
+ int out_capacity
80
+ );
81
+
82
+ /* Embeds text or speech: exactly one of input and pcm is non-null. Text returns
83
+ the model's embedding dimension, speech one row of that width per 80 ms frame,
84
+ flattened. A null output returns the float count without computing. */
85
+ NEEDLE_API int needle_embed(
86
+ const char* input,
87
+ const float* pcm,
88
+ int samples,
89
+ float* out,
90
+ int out_capacity
91
  );
92
 
93
  #ifdef __cplusplus
linux-riscv64/libneedle.a CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:fcee5b99bc70cecf7a6125d99b68bd9f4239909fa702bb7e7c7fac2bf8eb0f20
3
- size 1550336
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e84c1fac7562fc507962a26dd1f25ae4203f755ab16104551fe365dc0833c05
3
+ size 1881996
linux-riscv64/needle CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b80680c617dd5cf675efe4f37dc89554dc30c8c51ca5509f734e6785c5b2888c
3
- size 998272
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a95e703c00e0a8b053e5829c10fd684e387d5fab76adb1c317f8f0a30e2e2c45
3
+ size 1157928
linux-riscv64/needle.h CHANGED
@@ -5,42 +5,89 @@
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
 
 
 
8
  #ifdef __cplusplus
9
  extern "C" {
10
  #endif
11
 
12
- /* One process-global, non-thread-safe model. Negative returns indicate failure.
13
- needle_init returns the tokenized static-prefix length on success. It can fail
14
- when the system prompt plus statically-declared tools do not fit the model's
15
- context window; call needle_last_error() for the specific reason. */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  NEEDLE_API int needle_init(
17
  const char* system_prompt,
18
  const char* tools_json,
19
  const char* tool_index_path
20
  );
21
 
22
- /* Last process-global error, owned by the runtime and valid until the next API call. */
23
- NEEDLE_API const char* needle_last_error(void);
24
-
 
25
  NEEDLE_API int needle_complete(
26
  const char* input,
 
 
27
  int max_new_tokens,
28
  char* out,
29
  int out_capacity
30
  );
31
 
32
- /* A null output returns the model's embedding dimension without computing. */
33
- NEEDLE_API int needle_embed(
34
- const char* input,
35
- float* out,
36
- int out_capacity
 
 
37
  );
38
 
39
  NEEDLE_API void needle_reset(void);
40
 
41
- NEEDLE_API int needle_load(
42
- const unsigned char* cact,
43
- unsigned long long n
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  );
45
 
46
  #ifdef __cplusplus
 
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
8
+ #define NEEDLE_TEXT 1
9
+ #define NEEDLE_SPEECH 2
10
+
11
  #ifdef __cplusplus
12
  extern "C" {
13
  #endif
14
 
15
+ /* One process-global, non-thread-safe model per kind, text and speech.
16
+ Negative returns indicate failure; call needle_last_error() for the specific
17
+ reason. needle_load reads whichever kind the .cact holds and keeps the other,
18
+ so a build with both models takes one call per model. */
19
+ NEEDLE_API int needle_load(
20
+ const unsigned char* cact,
21
+ unsigned long long n
22
+ );
23
+
24
+ /* NEEDLE_TEXT, NEEDLE_SPEECH or both, for the models this process has loaded. */
25
+ NEEDLE_API int needle_models(void);
26
+
27
+ /* Last process-global error, owned by the runtime and valid until the next API call. */
28
+ NEEDLE_API const char* needle_last_error(void);
29
+
30
+ /* needle_init returns the tokenized static-prefix length on success. It can fail
31
+ when the system prompt plus statically-declared tools exceed the context
32
+ window, and reports the measured token count when it does. */
33
  NEEDLE_API int needle_init(
34
  const char* system_prompt,
35
  const char* tools_json,
36
  const char* tool_index_path
37
  );
38
 
39
+ /* Answers text or speech: exactly one of input and pcm is non-null. Given pcm,
40
+ the engine transcribes the clip with the loaded speech model, answers the
41
+ transcript, and merges the speech fields into the same JSON object under an
42
+ audio_ prefix. needle_set_audio chooses how that transcription runs. */
43
  NEEDLE_API int needle_complete(
44
  const char* input,
45
+ const float* pcm,
46
+ int samples,
47
  int max_new_tokens,
48
  char* out,
49
  int out_capacity
50
  );
51
 
52
+ /* Language, keywords and word timestamps for the transcription needle_complete
53
+ runs for itself, with the meanings they have in needle_transcribe. The
54
+ strings are copied. Defaults: detect the language, no keywords, no times. */
55
+ NEEDLE_API void needle_set_audio(
56
+ const char* language,
57
+ const char* keywords,
58
+ int word_timestamps
59
  );
60
 
61
  NEEDLE_API void needle_reset(void);
62
 
63
+ /* Transcribes 16 kHz mono float PCM in [-1, 1], at most 30 s, and returns the
64
+ number of tokens generated. language is "en", "de", "fr", "es", "it", "nl" or
65
+ "pl", or NULL to detect it. keywords is NULL or newline-separated words and
66
+ phrases for keyword biasing. out receives JSON with the transcript, the
67
+ language used, the milliseconds to the first token and the decoder's tokens
68
+ per second after it; silence and steady noise give an empty text and language:
69
+ {"text":"...","language":"en","ttft_ms":0.0,"decode_tps":0.0}
70
+ A non-zero word_timestamps adds each word with times in seconds:
71
+ "words":[{"word":"...","start":0.00,"end":0.00,"probability":0.000}] */
72
+ NEEDLE_API int needle_transcribe(
73
+ const float* pcm,
74
+ int samples,
75
+ const char* language,
76
+ const char* keywords,
77
+ int word_timestamps,
78
+ char* out,
79
+ int out_capacity
80
+ );
81
+
82
+ /* Embeds text or speech: exactly one of input and pcm is non-null. Text returns
83
+ the model's embedding dimension, speech one row of that width per 80 ms frame,
84
+ flattened. A null output returns the float count without computing. */
85
+ NEEDLE_API int needle_embed(
86
+ const char* input,
87
+ const float* pcm,
88
+ int samples,
89
+ float* out,
90
+ int out_capacity
91
  );
92
 
93
  #ifdef __cplusplus
linux-x86_64/libneedle.a CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:35581b09da9b012637718d74dfb03c6ca563839bd909f2602c1b96764a916566
3
- size 1676548
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c0ff309dcf9c2238bd07986d9d100069d568596c2378f0bfedc1677cc02f756
3
+ size 2143656
linux-x86_64/needle CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a5e3baf782b8773f704048936e2380d675ba3bc1f41f441b748048b554ffc846
3
- size 1248608
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b197ceaef3b300a0b14c3a4fde92305527e43f9256c53d2a53d2a2fe8fe69678
3
+ size 1517200
linux-x86_64/needle.h CHANGED
@@ -5,42 +5,89 @@
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
 
 
 
8
  #ifdef __cplusplus
9
  extern "C" {
10
  #endif
11
 
12
- /* One process-global, non-thread-safe model. Negative returns indicate failure.
13
- needle_init returns the tokenized static-prefix length on success. It can fail
14
- when the system prompt plus statically-declared tools do not fit the model's
15
- context window; call needle_last_error() for the specific reason. */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  NEEDLE_API int needle_init(
17
  const char* system_prompt,
18
  const char* tools_json,
19
  const char* tool_index_path
20
  );
21
 
22
- /* Last process-global error, owned by the runtime and valid until the next API call. */
23
- NEEDLE_API const char* needle_last_error(void);
24
-
 
25
  NEEDLE_API int needle_complete(
26
  const char* input,
 
 
27
  int max_new_tokens,
28
  char* out,
29
  int out_capacity
30
  );
31
 
32
- /* A null output returns the model's embedding dimension without computing. */
33
- NEEDLE_API int needle_embed(
34
- const char* input,
35
- float* out,
36
- int out_capacity
 
 
37
  );
38
 
39
  NEEDLE_API void needle_reset(void);
40
 
41
- NEEDLE_API int needle_load(
42
- const unsigned char* cact,
43
- unsigned long long n
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  );
45
 
46
  #ifdef __cplusplus
 
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
8
+ #define NEEDLE_TEXT 1
9
+ #define NEEDLE_SPEECH 2
10
+
11
  #ifdef __cplusplus
12
  extern "C" {
13
  #endif
14
 
15
+ /* One process-global, non-thread-safe model per kind, text and speech.
16
+ Negative returns indicate failure; call needle_last_error() for the specific
17
+ reason. needle_load reads whichever kind the .cact holds and keeps the other,
18
+ so a build with both models takes one call per model. */
19
+ NEEDLE_API int needle_load(
20
+ const unsigned char* cact,
21
+ unsigned long long n
22
+ );
23
+
24
+ /* NEEDLE_TEXT, NEEDLE_SPEECH or both, for the models this process has loaded. */
25
+ NEEDLE_API int needle_models(void);
26
+
27
+ /* Last process-global error, owned by the runtime and valid until the next API call. */
28
+ NEEDLE_API const char* needle_last_error(void);
29
+
30
+ /* needle_init returns the tokenized static-prefix length on success. It can fail
31
+ when the system prompt plus statically-declared tools exceed the context
32
+ window, and reports the measured token count when it does. */
33
  NEEDLE_API int needle_init(
34
  const char* system_prompt,
35
  const char* tools_json,
36
  const char* tool_index_path
37
  );
38
 
39
+ /* Answers text or speech: exactly one of input and pcm is non-null. Given pcm,
40
+ the engine transcribes the clip with the loaded speech model, answers the
41
+ transcript, and merges the speech fields into the same JSON object under an
42
+ audio_ prefix. needle_set_audio chooses how that transcription runs. */
43
  NEEDLE_API int needle_complete(
44
  const char* input,
45
+ const float* pcm,
46
+ int samples,
47
  int max_new_tokens,
48
  char* out,
49
  int out_capacity
50
  );
51
 
52
+ /* Language, keywords and word timestamps for the transcription needle_complete
53
+ runs for itself, with the meanings they have in needle_transcribe. The
54
+ strings are copied. Defaults: detect the language, no keywords, no times. */
55
+ NEEDLE_API void needle_set_audio(
56
+ const char* language,
57
+ const char* keywords,
58
+ int word_timestamps
59
  );
60
 
61
  NEEDLE_API void needle_reset(void);
62
 
63
+ /* Transcribes 16 kHz mono float PCM in [-1, 1], at most 30 s, and returns the
64
+ number of tokens generated. language is "en", "de", "fr", "es", "it", "nl" or
65
+ "pl", or NULL to detect it. keywords is NULL or newline-separated words and
66
+ phrases for keyword biasing. out receives JSON with the transcript, the
67
+ language used, the milliseconds to the first token and the decoder's tokens
68
+ per second after it; silence and steady noise give an empty text and language:
69
+ {"text":"...","language":"en","ttft_ms":0.0,"decode_tps":0.0}
70
+ A non-zero word_timestamps adds each word with times in seconds:
71
+ "words":[{"word":"...","start":0.00,"end":0.00,"probability":0.000}] */
72
+ NEEDLE_API int needle_transcribe(
73
+ const float* pcm,
74
+ int samples,
75
+ const char* language,
76
+ const char* keywords,
77
+ int word_timestamps,
78
+ char* out,
79
+ int out_capacity
80
+ );
81
+
82
+ /* Embeds text or speech: exactly one of input and pcm is non-null. Text returns
83
+ the model's embedding dimension, speech one row of that width per 80 ms frame,
84
+ flattened. A null output returns the float count without computing. */
85
+ NEEDLE_API int needle_embed(
86
+ const char* input,
87
+ const float* pcm,
88
+ int samples,
89
+ float* out,
90
+ int out_capacity
91
  );
92
 
93
  #ifdef __cplusplus
macos-arm64/libneedle.a CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9e9e0d01dc1ac0438f2890e5f51fec48fd6eadce1cd2c4455ccc13eb735838bb
3
- size 1158848
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a3b9163abe7b4bd52487c4005506cb35c5163bb9b9587af4ae07ed7587de697d
3
+ size 1503976
macos-arm64/needle CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4091895e4dcc8936aa1c813912dd77484a6cdf73437c07dd1af1b64123ab9620
3
- size 824792
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f52c9ce7c05ef44e8d8441584aec9e6ac6054f811866eacd70f33da2462577dc
3
+ size 1073160
macos-arm64/needle.h CHANGED
@@ -5,42 +5,89 @@
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
 
 
 
8
  #ifdef __cplusplus
9
  extern "C" {
10
  #endif
11
 
12
- /* One process-global, non-thread-safe model. Negative returns indicate failure.
13
- needle_init returns the tokenized static-prefix length on success. It can fail
14
- when the system prompt plus statically-declared tools do not fit the model's
15
- context window; call needle_last_error() for the specific reason. */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  NEEDLE_API int needle_init(
17
  const char* system_prompt,
18
  const char* tools_json,
19
  const char* tool_index_path
20
  );
21
 
22
- /* Last process-global error, owned by the runtime and valid until the next API call. */
23
- NEEDLE_API const char* needle_last_error(void);
24
-
 
25
  NEEDLE_API int needle_complete(
26
  const char* input,
 
 
27
  int max_new_tokens,
28
  char* out,
29
  int out_capacity
30
  );
31
 
32
- /* A null output returns the model's embedding dimension without computing. */
33
- NEEDLE_API int needle_embed(
34
- const char* input,
35
- float* out,
36
- int out_capacity
 
 
37
  );
38
 
39
  NEEDLE_API void needle_reset(void);
40
 
41
- NEEDLE_API int needle_load(
42
- const unsigned char* cact,
43
- unsigned long long n
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  );
45
 
46
  #ifdef __cplusplus
 
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
8
+ #define NEEDLE_TEXT 1
9
+ #define NEEDLE_SPEECH 2
10
+
11
  #ifdef __cplusplus
12
  extern "C" {
13
  #endif
14
 
15
+ /* One process-global, non-thread-safe model per kind, text and speech.
16
+ Negative returns indicate failure; call needle_last_error() for the specific
17
+ reason. needle_load reads whichever kind the .cact holds and keeps the other,
18
+ so a build with both models takes one call per model. */
19
+ NEEDLE_API int needle_load(
20
+ const unsigned char* cact,
21
+ unsigned long long n
22
+ );
23
+
24
+ /* NEEDLE_TEXT, NEEDLE_SPEECH or both, for the models this process has loaded. */
25
+ NEEDLE_API int needle_models(void);
26
+
27
+ /* Last process-global error, owned by the runtime and valid until the next API call. */
28
+ NEEDLE_API const char* needle_last_error(void);
29
+
30
+ /* needle_init returns the tokenized static-prefix length on success. It can fail
31
+ when the system prompt plus statically-declared tools exceed the context
32
+ window, and reports the measured token count when it does. */
33
  NEEDLE_API int needle_init(
34
  const char* system_prompt,
35
  const char* tools_json,
36
  const char* tool_index_path
37
  );
38
 
39
+ /* Answers text or speech: exactly one of input and pcm is non-null. Given pcm,
40
+ the engine transcribes the clip with the loaded speech model, answers the
41
+ transcript, and merges the speech fields into the same JSON object under an
42
+ audio_ prefix. needle_set_audio chooses how that transcription runs. */
43
  NEEDLE_API int needle_complete(
44
  const char* input,
45
+ const float* pcm,
46
+ int samples,
47
  int max_new_tokens,
48
  char* out,
49
  int out_capacity
50
  );
51
 
52
+ /* Language, keywords and word timestamps for the transcription needle_complete
53
+ runs for itself, with the meanings they have in needle_transcribe. The
54
+ strings are copied. Defaults: detect the language, no keywords, no times. */
55
+ NEEDLE_API void needle_set_audio(
56
+ const char* language,
57
+ const char* keywords,
58
+ int word_timestamps
59
  );
60
 
61
  NEEDLE_API void needle_reset(void);
62
 
63
+ /* Transcribes 16 kHz mono float PCM in [-1, 1], at most 30 s, and returns the
64
+ number of tokens generated. language is "en", "de", "fr", "es", "it", "nl" or
65
+ "pl", or NULL to detect it. keywords is NULL or newline-separated words and
66
+ phrases for keyword biasing. out receives JSON with the transcript, the
67
+ language used, the milliseconds to the first token and the decoder's tokens
68
+ per second after it; silence and steady noise give an empty text and language:
69
+ {"text":"...","language":"en","ttft_ms":0.0,"decode_tps":0.0}
70
+ A non-zero word_timestamps adds each word with times in seconds:
71
+ "words":[{"word":"...","start":0.00,"end":0.00,"probability":0.000}] */
72
+ NEEDLE_API int needle_transcribe(
73
+ const float* pcm,
74
+ int samples,
75
+ const char* language,
76
+ const char* keywords,
77
+ int word_timestamps,
78
+ char* out,
79
+ int out_capacity
80
+ );
81
+
82
+ /* Embeds text or speech: exactly one of input and pcm is non-null. Text returns
83
+ the model's embedding dimension, speech one row of that width per 80 ms frame,
84
+ flattened. A null output returns the float count without computing. */
85
+ NEEDLE_API int needle_embed(
86
+ const char* input,
87
+ const float* pcm,
88
+ int samples,
89
+ float* out,
90
+ int out_capacity
91
  );
92
 
93
  #ifdef __cplusplus
python/cactus_needle-3.1.0-py3-none-macosx_11_0_arm64.whl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ad1cba80ede4c058692370964eec4d881a1fdc80014f7210b2d13891bad7d1c6
3
+ size 523657
python/cactus_needle-3.1.0-py3-none-macosx_11_0_x86_64.whl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31a90adbaa898ea65e92b370e80ba5830a346348022a913a8bb254ab7d20bad6
3
+ size 575529
python/cactus_needle-3.1.0-py3-none-manylinux2014_aarch64.whl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f2f30a1178856025ab4bf75ef75e1bf28b8d0552cdd5614f7d06cedc1f713606
3
+ size 649611
python/cactus_needle-3.1.0-py3-none-manylinux2014_x86_64.whl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a0fc2f682ef18525d4d18583081ac31c1f6f211abe6c0b3bee44811ed7e0347e
3
+ size 671203
python/cactus_needle-3.1.0-py3-none-musllinux_1_2_aarch64.whl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b5e3c48b2c181d29117949f4f55c57cab8c3ccd08d782302b56489fde9c15f73
3
+ size 649438
python/cactus_needle-3.1.0-py3-none-musllinux_1_2_x86_64.whl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:835ea0d5765704b65bfaf286e2e94aa2e6027b9494a18adf0fb845f2e3bc7a04
3
+ size 672183
python/cactus_needle-3.1.0-py3-none-win_amd64.whl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4f5fc86abfc50d551cdb237a34b501f36d82d4b6f5911ee7bec4e9532d44dd95
3
+ size 683889
python/cactus_needle-3.1.0-py3-none-win_arm64.whl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:39806d54910c207cd0ac5dc60009c8c5330072ef729711d74061faf0e99e7a6c
3
+ size 617795
tvos-arm64/libneedle.a CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f15c4920b1456cdeddfa17fbb7e7d625ee585fdad5dd33a6393997b62859632f
3
- size 1137944
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe1105a1f377f40a79a225336256e2cc2b8da18836d0871f549afb31099a6d76
3
+ size 1465744
tvos-arm64/needle.h CHANGED
@@ -5,42 +5,89 @@
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
 
 
 
8
  #ifdef __cplusplus
9
  extern "C" {
10
  #endif
11
 
12
- /* One process-global, non-thread-safe model. Negative returns indicate failure.
13
- needle_init returns the tokenized static-prefix length on success. It can fail
14
- when the system prompt plus statically-declared tools do not fit the model's
15
- context window; call needle_last_error() for the specific reason. */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  NEEDLE_API int needle_init(
17
  const char* system_prompt,
18
  const char* tools_json,
19
  const char* tool_index_path
20
  );
21
 
22
- /* Last process-global error, owned by the runtime and valid until the next API call. */
23
- NEEDLE_API const char* needle_last_error(void);
24
-
 
25
  NEEDLE_API int needle_complete(
26
  const char* input,
 
 
27
  int max_new_tokens,
28
  char* out,
29
  int out_capacity
30
  );
31
 
32
- /* A null output returns the model's embedding dimension without computing. */
33
- NEEDLE_API int needle_embed(
34
- const char* input,
35
- float* out,
36
- int out_capacity
 
 
37
  );
38
 
39
  NEEDLE_API void needle_reset(void);
40
 
41
- NEEDLE_API int needle_load(
42
- const unsigned char* cact,
43
- unsigned long long n
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  );
45
 
46
  #ifdef __cplusplus
 
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
8
+ #define NEEDLE_TEXT 1
9
+ #define NEEDLE_SPEECH 2
10
+
11
  #ifdef __cplusplus
12
  extern "C" {
13
  #endif
14
 
15
+ /* One process-global, non-thread-safe model per kind, text and speech.
16
+ Negative returns indicate failure; call needle_last_error() for the specific
17
+ reason. needle_load reads whichever kind the .cact holds and keeps the other,
18
+ so a build with both models takes one call per model. */
19
+ NEEDLE_API int needle_load(
20
+ const unsigned char* cact,
21
+ unsigned long long n
22
+ );
23
+
24
+ /* NEEDLE_TEXT, NEEDLE_SPEECH or both, for the models this process has loaded. */
25
+ NEEDLE_API int needle_models(void);
26
+
27
+ /* Last process-global error, owned by the runtime and valid until the next API call. */
28
+ NEEDLE_API const char* needle_last_error(void);
29
+
30
+ /* needle_init returns the tokenized static-prefix length on success. It can fail
31
+ when the system prompt plus statically-declared tools exceed the context
32
+ window, and reports the measured token count when it does. */
33
  NEEDLE_API int needle_init(
34
  const char* system_prompt,
35
  const char* tools_json,
36
  const char* tool_index_path
37
  );
38
 
39
+ /* Answers text or speech: exactly one of input and pcm is non-null. Given pcm,
40
+ the engine transcribes the clip with the loaded speech model, answers the
41
+ transcript, and merges the speech fields into the same JSON object under an
42
+ audio_ prefix. needle_set_audio chooses how that transcription runs. */
43
  NEEDLE_API int needle_complete(
44
  const char* input,
45
+ const float* pcm,
46
+ int samples,
47
  int max_new_tokens,
48
  char* out,
49
  int out_capacity
50
  );
51
 
52
+ /* Language, keywords and word timestamps for the transcription needle_complete
53
+ runs for itself, with the meanings they have in needle_transcribe. The
54
+ strings are copied. Defaults: detect the language, no keywords, no times. */
55
+ NEEDLE_API void needle_set_audio(
56
+ const char* language,
57
+ const char* keywords,
58
+ int word_timestamps
59
  );
60
 
61
  NEEDLE_API void needle_reset(void);
62
 
63
+ /* Transcribes 16 kHz mono float PCM in [-1, 1], at most 30 s, and returns the
64
+ number of tokens generated. language is "en", "de", "fr", "es", "it", "nl" or
65
+ "pl", or NULL to detect it. keywords is NULL or newline-separated words and
66
+ phrases for keyword biasing. out receives JSON with the transcript, the
67
+ language used, the milliseconds to the first token and the decoder's tokens
68
+ per second after it; silence and steady noise give an empty text and language:
69
+ {"text":"...","language":"en","ttft_ms":0.0,"decode_tps":0.0}
70
+ A non-zero word_timestamps adds each word with times in seconds:
71
+ "words":[{"word":"...","start":0.00,"end":0.00,"probability":0.000}] */
72
+ NEEDLE_API int needle_transcribe(
73
+ const float* pcm,
74
+ int samples,
75
+ const char* language,
76
+ const char* keywords,
77
+ int word_timestamps,
78
+ char* out,
79
+ int out_capacity
80
+ );
81
+
82
+ /* Embeds text or speech: exactly one of input and pcm is non-null. Text returns
83
+ the model's embedding dimension, speech one row of that width per 80 ms frame,
84
+ flattened. A null output returns the float count without computing. */
85
+ NEEDLE_API int needle_embed(
86
+ const char* input,
87
+ const float* pcm,
88
+ int samples,
89
+ float* out,
90
+ int out_capacity
91
  );
92
 
93
  #ifdef __cplusplus
wasm-component/needle.component.wasm CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5fc4eb9927c1cbf8894dc107f18741c06cf98518d7023ef2b24b8103fbd393ce
3
- size 4174239
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c07eba8742a3d76c1d7bfbef8129210a70b44e0e7fdcaecdece67f7a4bc4678
3
+ size 4452455
wasm/needle.h CHANGED
@@ -5,42 +5,89 @@
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
 
 
 
8
  #ifdef __cplusplus
9
  extern "C" {
10
  #endif
11
 
12
- /* One process-global, non-thread-safe model. Negative returns indicate failure.
13
- needle_init returns the tokenized static-prefix length on success. It can fail
14
- when the system prompt plus statically-declared tools do not fit the model's
15
- context window; call needle_last_error() for the specific reason. */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  NEEDLE_API int needle_init(
17
  const char* system_prompt,
18
  const char* tools_json,
19
  const char* tool_index_path
20
  );
21
 
22
- /* Last process-global error, owned by the runtime and valid until the next API call. */
23
- NEEDLE_API const char* needle_last_error(void);
24
-
 
25
  NEEDLE_API int needle_complete(
26
  const char* input,
 
 
27
  int max_new_tokens,
28
  char* out,
29
  int out_capacity
30
  );
31
 
32
- /* A null output returns the model's embedding dimension without computing. */
33
- NEEDLE_API int needle_embed(
34
- const char* input,
35
- float* out,
36
- int out_capacity
 
 
37
  );
38
 
39
  NEEDLE_API void needle_reset(void);
40
 
41
- NEEDLE_API int needle_load(
42
- const unsigned char* cact,
43
- unsigned long long n
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  );
45
 
46
  #ifdef __cplusplus
 
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
8
+ #define NEEDLE_TEXT 1
9
+ #define NEEDLE_SPEECH 2
10
+
11
  #ifdef __cplusplus
12
  extern "C" {
13
  #endif
14
 
15
+ /* One process-global, non-thread-safe model per kind, text and speech.
16
+ Negative returns indicate failure; call needle_last_error() for the specific
17
+ reason. needle_load reads whichever kind the .cact holds and keeps the other,
18
+ so a build with both models takes one call per model. */
19
+ NEEDLE_API int needle_load(
20
+ const unsigned char* cact,
21
+ unsigned long long n
22
+ );
23
+
24
+ /* NEEDLE_TEXT, NEEDLE_SPEECH or both, for the models this process has loaded. */
25
+ NEEDLE_API int needle_models(void);
26
+
27
+ /* Last process-global error, owned by the runtime and valid until the next API call. */
28
+ NEEDLE_API const char* needle_last_error(void);
29
+
30
+ /* needle_init returns the tokenized static-prefix length on success. It can fail
31
+ when the system prompt plus statically-declared tools exceed the context
32
+ window, and reports the measured token count when it does. */
33
  NEEDLE_API int needle_init(
34
  const char* system_prompt,
35
  const char* tools_json,
36
  const char* tool_index_path
37
  );
38
 
39
+ /* Answers text or speech: exactly one of input and pcm is non-null. Given pcm,
40
+ the engine transcribes the clip with the loaded speech model, answers the
41
+ transcript, and merges the speech fields into the same JSON object under an
42
+ audio_ prefix. needle_set_audio chooses how that transcription runs. */
43
  NEEDLE_API int needle_complete(
44
  const char* input,
45
+ const float* pcm,
46
+ int samples,
47
  int max_new_tokens,
48
  char* out,
49
  int out_capacity
50
  );
51
 
52
+ /* Language, keywords and word timestamps for the transcription needle_complete
53
+ runs for itself, with the meanings they have in needle_transcribe. The
54
+ strings are copied. Defaults: detect the language, no keywords, no times. */
55
+ NEEDLE_API void needle_set_audio(
56
+ const char* language,
57
+ const char* keywords,
58
+ int word_timestamps
59
  );
60
 
61
  NEEDLE_API void needle_reset(void);
62
 
63
+ /* Transcribes 16 kHz mono float PCM in [-1, 1], at most 30 s, and returns the
64
+ number of tokens generated. language is "en", "de", "fr", "es", "it", "nl" or
65
+ "pl", or NULL to detect it. keywords is NULL or newline-separated words and
66
+ phrases for keyword biasing. out receives JSON with the transcript, the
67
+ language used, the milliseconds to the first token and the decoder's tokens
68
+ per second after it; silence and steady noise give an empty text and language:
69
+ {"text":"...","language":"en","ttft_ms":0.0,"decode_tps":0.0}
70
+ A non-zero word_timestamps adds each word with times in seconds:
71
+ "words":[{"word":"...","start":0.00,"end":0.00,"probability":0.000}] */
72
+ NEEDLE_API int needle_transcribe(
73
+ const float* pcm,
74
+ int samples,
75
+ const char* language,
76
+ const char* keywords,
77
+ int word_timestamps,
78
+ char* out,
79
+ int out_capacity
80
+ );
81
+
82
+ /* Embeds text or speech: exactly one of input and pcm is non-null. Text returns
83
+ the model's embedding dimension, speech one row of that width per 80 ms frame,
84
+ flattened. A null output returns the float count without computing. */
85
+ NEEDLE_API int needle_embed(
86
+ const char* input,
87
+ const float* pcm,
88
+ int samples,
89
+ float* out,
90
+ int out_capacity
91
  );
92
 
93
  #ifdef __cplusplus
wasm/needle.js CHANGED
The diff for this file is too large to render. See raw diff
 
wasm/needle.wasm CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:797fcf97d1356e673dc710b92a5b5e644b1e971e3071d03e09774958d1d7cdb2
3
- size 688713
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c19b9ddf9c7de4eb4f37e5f1811c5bbea9f099041d2a27284daf89789ee8523d
3
+ size 903655
watchos-arm64/libneedle.a CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:09be305adadc4e87249bf307daae562ebb6416cbfc5e596ad10ee561aae99941
3
- size 1134952
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc0e82958495dc8a9f041faef071b61300c10472b1d3566fcf41934309cdff70
3
+ size 1486712
watchos-arm64/needle.h CHANGED
@@ -5,42 +5,89 @@
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
 
 
 
8
  #ifdef __cplusplus
9
  extern "C" {
10
  #endif
11
 
12
- /* One process-global, non-thread-safe model. Negative returns indicate failure.
13
- needle_init returns the tokenized static-prefix length on success. It can fail
14
- when the system prompt plus statically-declared tools do not fit the model's
15
- context window; call needle_last_error() for the specific reason. */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  NEEDLE_API int needle_init(
17
  const char* system_prompt,
18
  const char* tools_json,
19
  const char* tool_index_path
20
  );
21
 
22
- /* Last process-global error, owned by the runtime and valid until the next API call. */
23
- NEEDLE_API const char* needle_last_error(void);
24
-
 
25
  NEEDLE_API int needle_complete(
26
  const char* input,
 
 
27
  int max_new_tokens,
28
  char* out,
29
  int out_capacity
30
  );
31
 
32
- /* A null output returns the model's embedding dimension without computing. */
33
- NEEDLE_API int needle_embed(
34
- const char* input,
35
- float* out,
36
- int out_capacity
 
 
37
  );
38
 
39
  NEEDLE_API void needle_reset(void);
40
 
41
- NEEDLE_API int needle_load(
42
- const unsigned char* cact,
43
- unsigned long long n
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  );
45
 
46
  #ifdef __cplusplus
 
5
  #define NEEDLE_API __attribute__((visibility("default")))
6
  #endif
7
 
8
+ #define NEEDLE_TEXT 1
9
+ #define NEEDLE_SPEECH 2
10
+
11
  #ifdef __cplusplus
12
  extern "C" {
13
  #endif
14
 
15
+ /* One process-global, non-thread-safe model per kind, text and speech.
16
+ Negative returns indicate failure; call needle_last_error() for the specific
17
+ reason. needle_load reads whichever kind the .cact holds and keeps the other,
18
+ so a build with both models takes one call per model. */
19
+ NEEDLE_API int needle_load(
20
+ const unsigned char* cact,
21
+ unsigned long long n
22
+ );
23
+
24
+ /* NEEDLE_TEXT, NEEDLE_SPEECH or both, for the models this process has loaded. */
25
+ NEEDLE_API int needle_models(void);
26
+
27
+ /* Last process-global error, owned by the runtime and valid until the next API call. */
28
+ NEEDLE_API const char* needle_last_error(void);
29
+
30
+ /* needle_init returns the tokenized static-prefix length on success. It can fail
31
+ when the system prompt plus statically-declared tools exceed the context
32
+ window, and reports the measured token count when it does. */
33
  NEEDLE_API int needle_init(
34
  const char* system_prompt,
35
  const char* tools_json,
36
  const char* tool_index_path
37
  );
38
 
39
+ /* Answers text or speech: exactly one of input and pcm is non-null. Given pcm,
40
+ the engine transcribes the clip with the loaded speech model, answers the
41
+ transcript, and merges the speech fields into the same JSON object under an
42
+ audio_ prefix. needle_set_audio chooses how that transcription runs. */
43
  NEEDLE_API int needle_complete(
44
  const char* input,
45
+ const float* pcm,
46
+ int samples,
47
  int max_new_tokens,
48
  char* out,
49
  int out_capacity
50
  );
51
 
52
+ /* Language, keywords and word timestamps for the transcription needle_complete
53
+ runs for itself, with the meanings they have in needle_transcribe. The
54
+ strings are copied. Defaults: detect the language, no keywords, no times. */
55
+ NEEDLE_API void needle_set_audio(
56
+ const char* language,
57
+ const char* keywords,
58
+ int word_timestamps
59
  );
60
 
61
  NEEDLE_API void needle_reset(void);
62
 
63
+ /* Transcribes 16 kHz mono float PCM in [-1, 1], at most 30 s, and returns the
64
+ number of tokens generated. language is "en", "de", "fr", "es", "it", "nl" or
65
+ "pl", or NULL to detect it. keywords is NULL or newline-separated words and
66
+ phrases for keyword biasing. out receives JSON with the transcript, the
67
+ language used, the milliseconds to the first token and the decoder's tokens
68
+ per second after it; silence and steady noise give an empty text and language:
69
+ {"text":"...","language":"en","ttft_ms":0.0,"decode_tps":0.0}
70
+ A non-zero word_timestamps adds each word with times in seconds:
71
+ "words":[{"word":"...","start":0.00,"end":0.00,"probability":0.000}] */
72
+ NEEDLE_API int needle_transcribe(
73
+ const float* pcm,
74
+ int samples,
75
+ const char* language,
76
+ const char* keywords,
77
+ int word_timestamps,
78
+ char* out,
79
+ int out_capacity
80
+ );
81
+
82
+ /* Embeds text or speech: exactly one of input and pcm is non-null. Text returns
83
+ the model's embedding dimension, speech one row of that width per 80 ms frame,
84
+ flattened. A null output returns the float count without computing. */
85
+ NEEDLE_API int needle_embed(
86
+ const char* input,
87
+ const float* pcm,
88
+ int samples,
89
+ float* out,
90
+ int out_capacity
91
  );
92
 
93
  #ifdef __cplusplus