voice-bird-cli 0.2.2__tar.gz → 0.2.7__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: voice-bird-cli
3
- Version: 0.2.2
3
+ Version: 0.2.7
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Environment :: Console
6
6
  Classifier: Intended Audience :: Developers
@@ -4,7 +4,7 @@ build-backend = "maturin"
4
4
 
5
5
  [project]
6
6
  name = "voice-bird-cli"
7
- version = "0.2.2"
7
+ version = "0.2.7"
8
8
  description = "Voice Bird CLI - Terminal audio streaming for voice transcription"
9
9
  authors = [{ name = "Dzmitry Rekun" }]
10
10
  readme = "voice-bird-cli/README.md"
@@ -125,15 +125,6 @@ dependencies = [
125
125
  "generic-array",
126
126
  ]
127
127
 
128
- [[package]]
129
- name = "block2"
130
- version = "0.6.2"
131
- source = "registry+https://github.com/rust-lang/crates.io-index"
132
- checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5"
133
- dependencies = [
134
- "objc2",
135
- ]
136
-
137
128
  [[package]]
138
129
  name = "bumpalo"
139
130
  version = "3.19.1"
@@ -212,15 +203,6 @@ version = "1.0.4"
212
203
  source = "registry+https://github.com/rust-lang/crates.io-index"
213
204
  checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
214
205
 
215
- [[package]]
216
- name = "cgl"
217
- version = "0.3.2"
218
- source = "registry+https://github.com/rust-lang/crates.io-index"
219
- checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff"
220
- dependencies = [
221
- "libc",
222
- ]
223
-
224
206
  [[package]]
225
207
  name = "chrono"
226
208
  version = "0.4.43"
@@ -278,15 +260,6 @@ dependencies = [
278
260
  "static_assertions",
279
261
  ]
280
262
 
281
- [[package]]
282
- name = "core-audio-types-rs"
283
- version = "0.3.5"
284
- source = "registry+https://github.com/rust-lang/crates.io-index"
285
- checksum = "bebfc66b5ef3f159b3c4a6097e7c2a2e2cc71ec77fff7913e9895fae45f4c349"
286
- dependencies = [
287
- "core-foundation 0.10.1",
288
- ]
289
-
290
263
  [[package]]
291
264
  name = "core-foundation"
292
265
  version = "0.9.4"
@@ -297,95 +270,12 @@ dependencies = [
297
270
  "libc",
298
271
  ]
299
272
 
300
- [[package]]
301
- name = "core-foundation"
302
- version = "0.10.1"
303
- source = "registry+https://github.com/rust-lang/crates.io-index"
304
- checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6"
305
- dependencies = [
306
- "core-foundation-sys",
307
- "libc",
308
- ]
309
-
310
273
  [[package]]
311
274
  name = "core-foundation-sys"
312
275
  version = "0.8.7"
313
276
  source = "registry+https://github.com/rust-lang/crates.io-index"
314
277
  checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
315
278
 
316
- [[package]]
317
- name = "core-graphics"
318
- version = "0.24.0"
319
- source = "registry+https://github.com/rust-lang/crates.io-index"
320
- checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1"
321
- dependencies = [
322
- "bitflags 2.10.0",
323
- "core-foundation 0.10.1",
324
- "core-graphics-types",
325
- "foreign-types 0.5.0",
326
- "libc",
327
- ]
328
-
329
- [[package]]
330
- name = "core-graphics"
331
- version = "0.25.0"
332
- source = "registry+https://github.com/rust-lang/crates.io-index"
333
- checksum = "064badf302c3194842cf2c5d61f56cc88e54a759313879cdf03abdd27d0c3b97"
334
- dependencies = [
335
- "bitflags 2.10.0",
336
- "core-foundation 0.10.1",
337
- "core-graphics-types",
338
- "foreign-types 0.5.0",
339
- "libc",
340
- ]
341
-
342
- [[package]]
343
- name = "core-graphics-types"
344
- version = "0.2.0"
345
- source = "registry+https://github.com/rust-lang/crates.io-index"
346
- checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb"
347
- dependencies = [
348
- "bitflags 2.10.0",
349
- "core-foundation 0.10.1",
350
- "libc",
351
- ]
352
-
353
- [[package]]
354
- name = "core-media-rs"
355
- version = "0.3.5"
356
- source = "registry+https://github.com/rust-lang/crates.io-index"
357
- checksum = "6592bdc3e2b3479140e8c64d419b62d613526c8b61136ca990cd0bae4377db4f"
358
- dependencies = [
359
- "core-audio-types-rs",
360
- "core-foundation 0.10.1",
361
- "core-utils-rs",
362
- "core-video-rs",
363
- "thiserror 2.0.17",
364
- ]
365
-
366
- [[package]]
367
- name = "core-utils-rs"
368
- version = "0.3.5"
369
- source = "registry+https://github.com/rust-lang/crates.io-index"
370
- checksum = "791d9e8eb99cff8db5e2b6a5bb420b893476b7a064bb6889b2a691c1bb6d745c"
371
- dependencies = [
372
- "core-foundation 0.10.1",
373
- "four-char-code",
374
- ]
375
-
376
- [[package]]
377
- name = "core-video-rs"
378
- version = "0.3.5"
379
- source = "registry+https://github.com/rust-lang/crates.io-index"
380
- checksum = "f1f1614e163a5d6fb972305fa14fc5c2989143da0426c213b74785b31e1fadb8"
381
- dependencies = [
382
- "core-foundation 0.10.1",
383
- "core-graphics 0.24.0",
384
- "core-utils-rs",
385
- "io-surface",
386
- "thiserror 2.0.17",
387
- ]
388
-
389
279
  [[package]]
390
280
  name = "coreaudio-rs"
391
281
  version = "0.11.3"
@@ -565,12 +455,6 @@ dependencies = [
565
455
  "windows-sys 0.48.0",
566
456
  ]
567
457
 
568
- [[package]]
569
- name = "dispatch"
570
- version = "0.2.0"
571
- source = "registry+https://github.com/rust-lang/crates.io-index"
572
- checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b"
573
-
574
458
  [[package]]
575
459
  name = "dispatch2"
576
460
  version = "0.3.0"
@@ -681,28 +565,7 @@ version = "0.3.2"
681
565
  source = "registry+https://github.com/rust-lang/crates.io-index"
682
566
  checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
683
567
  dependencies = [
684
- "foreign-types-shared 0.1.1",
685
- ]
686
-
687
- [[package]]
688
- name = "foreign-types"
689
- version = "0.5.0"
690
- source = "registry+https://github.com/rust-lang/crates.io-index"
691
- checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965"
692
- dependencies = [
693
- "foreign-types-macros",
694
- "foreign-types-shared 0.3.1",
695
- ]
696
-
697
- [[package]]
698
- name = "foreign-types-macros"
699
- version = "0.2.3"
700
- source = "registry+https://github.com/rust-lang/crates.io-index"
701
- checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
702
- dependencies = [
703
- "proc-macro2",
704
- "quote",
705
- "syn",
568
+ "foreign-types-shared",
706
569
  ]
707
570
 
708
571
  [[package]]
@@ -711,18 +574,6 @@ version = "0.1.1"
711
574
  source = "registry+https://github.com/rust-lang/crates.io-index"
712
575
  checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
713
576
 
714
- [[package]]
715
- name = "foreign-types-shared"
716
- version = "0.3.1"
717
- source = "registry+https://github.com/rust-lang/crates.io-index"
718
- checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b"
719
-
720
- [[package]]
721
- name = "four-char-code"
722
- version = "2.3.0"
723
- source = "registry+https://github.com/rust-lang/crates.io-index"
724
- checksum = "42da99970737c0150e3c5cd1cdc510735a2511739f5c3aa3c6bfc9f31441488d"
725
-
726
577
  [[package]]
727
578
  name = "futures-core"
728
579
  version = "0.3.31"
@@ -948,18 +799,6 @@ dependencies = [
948
799
  "syn",
949
800
  ]
950
801
 
951
- [[package]]
952
- name = "io-surface"
953
- version = "0.16.1"
954
- source = "registry+https://github.com/rust-lang/crates.io-index"
955
- checksum = "554b8c5d64ec09a3a520fe58e4d48a73e00ff32899cdcbe32a4877afd4968b8e"
956
- dependencies = [
957
- "cgl",
958
- "core-foundation 0.10.1",
959
- "core-foundation-sys",
960
- "leaky-cow",
961
- ]
962
-
963
802
  [[package]]
964
803
  name = "itertools"
965
804
  version = "0.13.0"
@@ -986,7 +825,7 @@ dependencies = [
986
825
  "combine",
987
826
  "jni-sys",
988
827
  "log",
989
- "thiserror 1.0.69",
828
+ "thiserror",
990
829
  "walkdir",
991
830
  "windows-sys 0.45.0",
992
831
  ]
@@ -1017,21 +856,6 @@ dependencies = [
1017
856
  "wasm-bindgen",
1018
857
  ]
1019
858
 
1020
- [[package]]
1021
- name = "leak"
1022
- version = "0.1.2"
1023
- source = "registry+https://github.com/rust-lang/crates.io-index"
1024
- checksum = "bd100e01f1154f2908dfa7d02219aeab25d0b9c7fa955164192e3245255a0c73"
1025
-
1026
- [[package]]
1027
- name = "leaky-cow"
1028
- version = "0.1.1"
1029
- source = "registry+https://github.com/rust-lang/crates.io-index"
1030
- checksum = "40a8225d44241fd324a8af2806ba635fc7c8a7e9a7de4d5cf3ef54e71f5926fc"
1031
- dependencies = [
1032
- "leak",
1033
- ]
1034
-
1035
859
  [[package]]
1036
860
  name = "libc"
1037
861
  version = "0.2.180"
@@ -1103,15 +927,6 @@ dependencies = [
1103
927
  "libc",
1104
928
  ]
1105
929
 
1106
- [[package]]
1107
- name = "malloc_buf"
1108
- version = "0.0.6"
1109
- source = "registry+https://github.com/rust-lang/crates.io-index"
1110
- checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
1111
- dependencies = [
1112
- "libc",
1113
- ]
1114
-
1115
930
  [[package]]
1116
931
  name = "memchr"
1117
932
  version = "2.7.6"
@@ -1184,7 +999,7 @@ dependencies = [
1184
999
  "log",
1185
1000
  "ndk-sys",
1186
1001
  "num_enum",
1187
- "thiserror 1.0.69",
1002
+ "thiserror",
1188
1003
  ]
1189
1004
 
1190
1005
  [[package]]
@@ -1272,16 +1087,6 @@ dependencies = [
1272
1087
  "syn",
1273
1088
  ]
1274
1089
 
1275
- [[package]]
1276
- name = "objc"
1277
- version = "0.2.7"
1278
- source = "registry+https://github.com/rust-lang/crates.io-index"
1279
- checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"
1280
- dependencies = [
1281
- "malloc_buf",
1282
- "objc_exception",
1283
- ]
1284
-
1285
1090
  [[package]]
1286
1091
  name = "objc2"
1287
1092
  version = "0.6.3"
@@ -1355,15 +1160,6 @@ dependencies = [
1355
1160
  "objc2-core-foundation",
1356
1161
  ]
1357
1162
 
1358
- [[package]]
1359
- name = "objc_exception"
1360
- version = "0.1.2"
1361
- source = "registry+https://github.com/rust-lang/crates.io-index"
1362
- checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4"
1363
- dependencies = [
1364
- "cc",
1365
- ]
1366
-
1367
1163
  [[package]]
1368
1164
  name = "oboe"
1369
1165
  version = "0.6.1"
@@ -1401,7 +1197,7 @@ checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328"
1401
1197
  dependencies = [
1402
1198
  "bitflags 2.10.0",
1403
1199
  "cfg-if",
1404
- "foreign-types 0.3.2",
1200
+ "foreign-types",
1405
1201
  "libc",
1406
1202
  "once_cell",
1407
1203
  "openssl-macros",
@@ -1652,7 +1448,7 @@ checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
1652
1448
  dependencies = [
1653
1449
  "getrandom 0.2.17",
1654
1450
  "libredox",
1655
- "thiserror 1.0.69",
1451
+ "thiserror",
1656
1452
  ]
1657
1453
 
1658
1454
  [[package]]
@@ -1780,19 +1576,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
1780
1576
 
1781
1577
  [[package]]
1782
1578
  name = "screencapturekit"
1783
- version = "0.3.6"
1579
+ version = "1.5.0"
1784
1580
  source = "registry+https://github.com/rust-lang/crates.io-index"
1785
- checksum = "0c62ae379564f834110c5b020cc731a7c14b8ec4879b4367579a467a0a704c21"
1786
- dependencies = [
1787
- "block2",
1788
- "core-foundation 0.10.1",
1789
- "core-graphics 0.25.0",
1790
- "core-media-rs",
1791
- "core-utils-rs",
1792
- "core-video-rs",
1793
- "dispatch",
1794
- "objc",
1795
- ]
1581
+ checksum = "6ccf069cb109cf8e01ebdca0d55dfce45dbbf669e8c56ed5c62150b056d3ec9f"
1796
1582
 
1797
1583
  [[package]]
1798
1584
  name = "security-framework"
@@ -1801,7 +1587,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1801
1587
  checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
1802
1588
  dependencies = [
1803
1589
  "bitflags 2.10.0",
1804
- "core-foundation 0.9.4",
1590
+ "core-foundation",
1805
1591
  "core-foundation-sys",
1806
1592
  "libc",
1807
1593
  "security-framework-sys",
@@ -2006,16 +1792,7 @@ version = "1.0.69"
2006
1792
  source = "registry+https://github.com/rust-lang/crates.io-index"
2007
1793
  checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
2008
1794
  dependencies = [
2009
- "thiserror-impl 1.0.69",
2010
- ]
2011
-
2012
- [[package]]
2013
- name = "thiserror"
2014
- version = "2.0.17"
2015
- source = "registry+https://github.com/rust-lang/crates.io-index"
2016
- checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8"
2017
- dependencies = [
2018
- "thiserror-impl 2.0.17",
1795
+ "thiserror-impl",
2019
1796
  ]
2020
1797
 
2021
1798
  [[package]]
@@ -2029,17 +1806,6 @@ dependencies = [
2029
1806
  "syn",
2030
1807
  ]
2031
1808
 
2032
- [[package]]
2033
- name = "thiserror-impl"
2034
- version = "2.0.17"
2035
- source = "registry+https://github.com/rust-lang/crates.io-index"
2036
- checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913"
2037
- dependencies = [
2038
- "proc-macro2",
2039
- "quote",
2040
- "syn",
2041
- ]
2042
-
2043
1809
  [[package]]
2044
1810
  name = "tiff"
2045
1811
  version = "0.10.3"
@@ -2161,7 +1927,7 @@ dependencies = [
2161
1927
  "native-tls",
2162
1928
  "rand",
2163
1929
  "sha1",
2164
- "thiserror 1.0.69",
1930
+ "thiserror",
2165
1931
  "utf-8",
2166
1932
  ]
2167
1933
 
@@ -2237,7 +2003,7 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
2237
2003
 
2238
2004
  [[package]]
2239
2005
  name = "voice-bird-cli"
2240
- version = "0.2.2"
2006
+ version = "0.2.7"
2241
2007
  dependencies = [
2242
2008
  "anyhow",
2243
2009
  "arboard",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "voice-bird-cli"
3
- version = "0.2.2"
3
+ version = "0.2.7"
4
4
  edition = "2021"
5
5
  description = "Voice Bird CLI - Terminal audio streaming for voice transcription"
6
6
  readme = "README.md"
@@ -55,4 +55,4 @@ windows = { version = "0.58", features = [
55
55
  windows-core = "0.58"
56
56
 
57
57
  [target.'cfg(target_os = "macos")'.dependencies]
58
- screencapturekit = "0.3"
58
+ screencapturekit = "1.5"
@@ -5,13 +5,7 @@ use super::AudioSession;
5
5
  use crate::audio::calculate_rms;
6
6
  use crate::streaming;
7
7
 
8
- use screencapturekit::shareable_content::SCShareableContent;
9
- use screencapturekit::stream::configuration::SCStreamConfiguration;
10
- use screencapturekit::stream::content_filter::SCContentFilter;
11
- use screencapturekit::stream::SCStream;
12
- use screencapturekit::stream::output_trait::SCStreamOutputTrait;
13
- use screencapturekit::stream::output_type::SCStreamOutputType;
14
- use screencapturekit::output::CMSampleBuffer;
8
+ use screencapturekit::prelude::*;
15
9
 
16
10
  const DEFAULT_SAMPLE_RATE: u32 = 48000;
17
11
  const DEFAULT_CHANNELS: u16 = 2;
@@ -167,40 +161,41 @@ pub fn start_output_recording(
167
161
  });
168
162
 
169
163
  let display = content.displays()
170
- .first()
171
- .ok_or_else(|| anyhow::anyhow!("No displays found"))?
172
- .clone();
164
+ .into_iter()
165
+ .next()
166
+ .ok_or_else(|| anyhow::anyhow!("No displays found"))?;
173
167
 
174
168
  // Create content filter
169
+ let apps = content.applications();
175
170
  let filter = if session.app_name.contains("All Applications") {
176
- SCContentFilter::new()
177
- .with_display_excluding_windows(&display, &[])
171
+ // Capture all applications on the display
172
+ let all_apps: Vec<_> = apps.iter().collect();
173
+ SCContentFilter::create()
174
+ .with_display(&display)
175
+ .with_including_applications(&all_apps, &[])
176
+ .build()
178
177
  } else {
179
- let app = content.applications()
180
- .into_iter()
178
+ let app = apps
179
+ .iter()
181
180
  .find(|app| {
182
181
  let name = app.application_name();
183
182
  !name.is_empty() && session.app_name.contains(&name)
184
183
  })
185
184
  .ok_or_else(|| anyhow::anyhow!("Application not found"))?;
186
- SCContentFilter::new()
187
- .with_display_including_application_excepting_windows(&display, &[&app], &[])
185
+ SCContentFilter::create()
186
+ .with_display(&display)
187
+ .with_including_applications(&[app], &[])
188
+ .build()
188
189
  };
189
190
 
190
- // Configure stream
191
+ // Configure stream — audio only, minimal video (1x1)
191
192
  let config = SCStreamConfiguration::new()
192
- .set_captures_audio(true)
193
- .map_err(|e| anyhow::anyhow!("Failed to set captures_audio: {:?}", e))?
194
- .set_sample_rate(DEFAULT_SAMPLE_RATE)
195
- .map_err(|e| anyhow::anyhow!("Failed to set sample_rate: {:?}", e))?
196
- .set_channel_count(DEFAULT_CHANNELS as u8)
197
- .map_err(|e| anyhow::anyhow!("Failed to set channel_count: {:?}", e))?
198
- .set_excludes_current_process_audio(true)
199
- .map_err(|e| anyhow::anyhow!("Failed to set excludes_current_process_audio: {:?}", e))?
200
- .set_width(1)
201
- .map_err(|e| anyhow::anyhow!("Failed to set width: {:?}", e))?
202
- .set_height(1)
203
- .map_err(|e| anyhow::anyhow!("Failed to set height: {:?}", e))?;
193
+ .with_width(1)
194
+ .with_height(1)
195
+ .with_captures_audio(true)
196
+ .with_sample_rate(DEFAULT_SAMPLE_RATE as i32)
197
+ .with_channel_count(DEFAULT_CHANNELS as i32)
198
+ .with_excludes_current_process_audio(true);
204
199
 
205
200
  // Output handler
206
201
  struct AudioHandler {
@@ -221,9 +216,9 @@ pub fn start_output_recording(
221
216
  }
222
217
  }
223
218
 
224
- if let Ok(audio_data) = sample.get_audio_buffer_list() {
219
+ if let Some(audio_data) = sample.audio_buffer_list() {
225
220
  let mut samples = Vec::new();
226
- for buf in audio_data.buffers() {
221
+ for buf in &audio_data {
227
222
  let bytes = buf.data();
228
223
  // Reinterpret bytes as f32 samples (CoreAudio uses 32-bit float)
229
224
  let float_samples: &[f32] = unsafe {