@hasna/recordings 0.1.32 → 0.1.33

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.
package/dist/cli/index.js CHANGED
@@ -5003,7 +5003,7 @@ var init_pg_migrations = __esm(() => {
5003
5003
  raw_text TEXT NOT NULL,
5004
5004
  processed_text TEXT,
5005
5005
  processing_mode TEXT NOT NULL DEFAULT 'raw' CHECK(processing_mode IN ('raw', 'enhanced')),
5006
- model_used TEXT NOT NULL DEFAULT 'gpt-4o-mini-transcribe',
5006
+ model_used TEXT NOT NULL DEFAULT 'gpt-4o-transcribe',
5007
5007
  enhancement_model TEXT,
5008
5008
  duration_ms INTEGER DEFAULT 0,
5009
5009
  language TEXT,
@@ -5098,7 +5098,7 @@ var init_pg_migrate = __esm(() => {
5098
5098
  var require_package = __commonJS((exports, module) => {
5099
5099
  module.exports = {
5100
5100
  name: "@hasna/recordings",
5101
- version: "0.1.32",
5101
+ version: "0.1.33",
5102
5102
  type: "module",
5103
5103
  description: "Speech-to-text recording tool with MCP and CLI \u2014 records, transcribes, and optionally enhances text using AI",
5104
5104
  repository: {
@@ -5865,7 +5865,7 @@ import { homedir as homedir2 } from "os";
5865
5865
  var DEFAULT_CONFIG = {
5866
5866
  openai_api_key: "",
5867
5867
  enhancement_api_key: "",
5868
- transcription_model: "gpt-4o-mini-transcribe",
5868
+ transcription_model: "gpt-4o-transcribe",
5869
5869
  enhancement_model: "gpt-4o",
5870
5870
  language: "en",
5871
5871
  audio_format: "wav",
@@ -6103,7 +6103,7 @@ var MIGRATIONS = [
6103
6103
  raw_text TEXT NOT NULL,
6104
6104
  processed_text TEXT,
6105
6105
  processing_mode TEXT NOT NULL DEFAULT 'raw' CHECK(processing_mode IN ('raw', 'enhanced')),
6106
- model_used TEXT NOT NULL DEFAULT 'gpt-4o-mini-transcribe',
6106
+ model_used TEXT NOT NULL DEFAULT 'gpt-4o-transcribe',
6107
6107
  enhancement_model TEXT,
6108
6108
  duration_ms INTEGER DEFAULT 0,
6109
6109
  language TEXT,
@@ -6233,7 +6233,7 @@ function parseRow(row) {
6233
6233
  raw_text: row["raw_text"],
6234
6234
  processed_text: row["processed_text"] || null,
6235
6235
  processing_mode: row["processing_mode"] || "raw",
6236
- model_used: row["model_used"] || "gpt-4o-mini-transcribe",
6236
+ model_used: row["model_used"] || "gpt-4o-transcribe",
6237
6237
  enhancement_model: row["enhancement_model"] || null,
6238
6238
  duration_ms: row["duration_ms"] || 0,
6239
6239
  language: row["language"] || null,
@@ -6255,7 +6255,7 @@ function createRecording(input, db) {
6255
6255
  const tagsJson = JSON.stringify(input.tags || []);
6256
6256
  const metadataJson = JSON.stringify(input.metadata || {});
6257
6257
  d.query(`INSERT INTO recordings (id, audio_path, raw_text, processed_text, processing_mode, model_used, enhancement_model, duration_ms, language, tags, agent_id, project_id, session_id, goal, role, task_list_id, machine_id, metadata)
6258
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(id, input.audio_path || null, input.raw_text, input.processed_text || null, input.processing_mode || "raw", input.model_used || "gpt-4o-mini-transcribe", input.enhancement_model || null, input.duration_ms || 0, input.language || null, tagsJson, input.agent_id || null, input.project_id || null, input.session_id || null, input.goal || null, input.role || null, input.task_list_id || null, input.machine_id || null, metadataJson);
6258
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(id, input.audio_path || null, input.raw_text, input.processed_text || null, input.processing_mode || "raw", input.model_used || "gpt-4o-transcribe", input.enhancement_model || null, input.duration_ms || 0, input.language || null, tagsJson, input.agent_id || null, input.project_id || null, input.session_id || null, input.goal || null, input.role || null, input.task_list_id || null, input.machine_id || null, metadataJson);
6259
6259
  if (input.tags && input.tags.length > 0) {
6260
6260
  const insertTag = d.query("INSERT OR IGNORE INTO recording_tags (recording_id, tag) VALUES (?, ?)");
6261
6261
  for (const tag of input.tags) {
@@ -6762,7 +6762,7 @@ async function processText(rawText, config, systemPrompt) {
6762
6762
  }
6763
6763
 
6764
6764
  // src/version.ts
6765
- var VERSION = "0.1.32";
6765
+ var VERSION = "0.1.33";
6766
6766
 
6767
6767
  // src/cli/storage.ts
6768
6768
  import chalk from "chalk";
@@ -7415,7 +7415,7 @@ program.command("init").description("Initialize .recordings/ in current director
7415
7415
  mkdirSync3(audioDir, { recursive: true });
7416
7416
  if (!existsSync6(configFile)) {
7417
7417
  const defaultConf = {
7418
- transcription_model: "gpt-4o-mini-transcribe",
7418
+ transcription_model: "gpt-4o-transcribe",
7419
7419
  enhancement_model: "gpt-4o",
7420
7420
  language: "en",
7421
7421
  auto_enhance: true
package/dist/index.js CHANGED
@@ -4972,7 +4972,7 @@ import { homedir } from "os";
4972
4972
  var DEFAULT_CONFIG = {
4973
4973
  openai_api_key: "",
4974
4974
  enhancement_api_key: "",
4975
- transcription_model: "gpt-4o-mini-transcribe",
4975
+ transcription_model: "gpt-4o-transcribe",
4976
4976
  enhancement_model: "gpt-4o",
4977
4977
  language: "en",
4978
4978
  audio_format: "wav",
@@ -5177,7 +5177,7 @@ var MIGRATIONS = [
5177
5177
  raw_text TEXT NOT NULL,
5178
5178
  processed_text TEXT,
5179
5179
  processing_mode TEXT NOT NULL DEFAULT 'raw' CHECK(processing_mode IN ('raw', 'enhanced')),
5180
- model_used TEXT NOT NULL DEFAULT 'gpt-4o-mini-transcribe',
5180
+ model_used TEXT NOT NULL DEFAULT 'gpt-4o-transcribe',
5181
5181
  enhancement_model TEXT,
5182
5182
  duration_ms INTEGER DEFAULT 0,
5183
5183
  language TEXT,
@@ -5460,7 +5460,7 @@ var PG_MIGRATIONS = [
5460
5460
  raw_text TEXT NOT NULL,
5461
5461
  processed_text TEXT,
5462
5462
  processing_mode TEXT NOT NULL DEFAULT 'raw' CHECK(processing_mode IN ('raw', 'enhanced')),
5463
- model_used TEXT NOT NULL DEFAULT 'gpt-4o-mini-transcribe',
5463
+ model_used TEXT NOT NULL DEFAULT 'gpt-4o-transcribe',
5464
5464
  enhancement_model TEXT,
5465
5465
  duration_ms INTEGER DEFAULT 0,
5466
5466
  language TEXT,
@@ -5701,7 +5701,7 @@ function parseRow(row) {
5701
5701
  raw_text: row["raw_text"],
5702
5702
  processed_text: row["processed_text"] || null,
5703
5703
  processing_mode: row["processing_mode"] || "raw",
5704
- model_used: row["model_used"] || "gpt-4o-mini-transcribe",
5704
+ model_used: row["model_used"] || "gpt-4o-transcribe",
5705
5705
  enhancement_model: row["enhancement_model"] || null,
5706
5706
  duration_ms: row["duration_ms"] || 0,
5707
5707
  language: row["language"] || null,
@@ -5723,7 +5723,7 @@ function createRecording(input, db) {
5723
5723
  const tagsJson = JSON.stringify(input.tags || []);
5724
5724
  const metadataJson = JSON.stringify(input.metadata || {});
5725
5725
  d.query(`INSERT INTO recordings (id, audio_path, raw_text, processed_text, processing_mode, model_used, enhancement_model, duration_ms, language, tags, agent_id, project_id, session_id, goal, role, task_list_id, machine_id, metadata)
5726
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(id, input.audio_path || null, input.raw_text, input.processed_text || null, input.processing_mode || "raw", input.model_used || "gpt-4o-mini-transcribe", input.enhancement_model || null, input.duration_ms || 0, input.language || null, tagsJson, input.agent_id || null, input.project_id || null, input.session_id || null, input.goal || null, input.role || null, input.task_list_id || null, input.machine_id || null, metadataJson);
5726
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(id, input.audio_path || null, input.raw_text, input.processed_text || null, input.processing_mode || "raw", input.model_used || "gpt-4o-transcribe", input.enhancement_model || null, input.duration_ms || 0, input.language || null, tagsJson, input.agent_id || null, input.project_id || null, input.session_id || null, input.goal || null, input.role || null, input.task_list_id || null, input.machine_id || null, metadataJson);
5727
5727
  if (input.tags && input.tags.length > 0) {
5728
5728
  const insertTag = d.query("INSERT OR IGNORE INTO recording_tags (recording_id, tag) VALUES (?, ?)");
5729
5729
  for (const tag of input.tags) {
package/dist/mcp/index.js CHANGED
@@ -4920,7 +4920,7 @@ var require_lib2 = __commonJS((exports, module) => {
4920
4920
  var require_package = __commonJS((exports, module) => {
4921
4921
  module.exports = {
4922
4922
  name: "@hasna/recordings",
4923
- version: "0.1.32",
4923
+ version: "0.1.33",
4924
4924
  type: "module",
4925
4925
  description: "Speech-to-text recording tool with MCP and CLI \u2014 records, transcribes, and optionally enhances text using AI",
4926
4926
  repository: {
@@ -9021,7 +9021,7 @@ import { homedir } from "os";
9021
9021
  var DEFAULT_CONFIG = {
9022
9022
  openai_api_key: "",
9023
9023
  enhancement_api_key: "",
9024
- transcription_model: "gpt-4o-mini-transcribe",
9024
+ transcription_model: "gpt-4o-transcribe",
9025
9025
  enhancement_model: "gpt-4o",
9026
9026
  language: "en",
9027
9027
  audio_format: "wav",
@@ -9259,7 +9259,7 @@ var MIGRATIONS = [
9259
9259
  raw_text TEXT NOT NULL,
9260
9260
  processed_text TEXT,
9261
9261
  processing_mode TEXT NOT NULL DEFAULT 'raw' CHECK(processing_mode IN ('raw', 'enhanced')),
9262
- model_used TEXT NOT NULL DEFAULT 'gpt-4o-mini-transcribe',
9262
+ model_used TEXT NOT NULL DEFAULT 'gpt-4o-transcribe',
9263
9263
  enhancement_model TEXT,
9264
9264
  duration_ms INTEGER DEFAULT 0,
9265
9265
  language TEXT,
@@ -9389,7 +9389,7 @@ function parseRow(row) {
9389
9389
  raw_text: row["raw_text"],
9390
9390
  processed_text: row["processed_text"] || null,
9391
9391
  processing_mode: row["processing_mode"] || "raw",
9392
- model_used: row["model_used"] || "gpt-4o-mini-transcribe",
9392
+ model_used: row["model_used"] || "gpt-4o-transcribe",
9393
9393
  enhancement_model: row["enhancement_model"] || null,
9394
9394
  duration_ms: row["duration_ms"] || 0,
9395
9395
  language: row["language"] || null,
@@ -9411,7 +9411,7 @@ function createRecording(input, db) {
9411
9411
  const tagsJson = JSON.stringify(input.tags || []);
9412
9412
  const metadataJson = JSON.stringify(input.metadata || {});
9413
9413
  d.query(`INSERT INTO recordings (id, audio_path, raw_text, processed_text, processing_mode, model_used, enhancement_model, duration_ms, language, tags, agent_id, project_id, session_id, goal, role, task_list_id, machine_id, metadata)
9414
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(id, input.audio_path || null, input.raw_text, input.processed_text || null, input.processing_mode || "raw", input.model_used || "gpt-4o-mini-transcribe", input.enhancement_model || null, input.duration_ms || 0, input.language || null, tagsJson, input.agent_id || null, input.project_id || null, input.session_id || null, input.goal || null, input.role || null, input.task_list_id || null, input.machine_id || null, metadataJson);
9414
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(id, input.audio_path || null, input.raw_text, input.processed_text || null, input.processing_mode || "raw", input.model_used || "gpt-4o-transcribe", input.enhancement_model || null, input.duration_ms || 0, input.language || null, tagsJson, input.agent_id || null, input.project_id || null, input.session_id || null, input.goal || null, input.role || null, input.task_list_id || null, input.machine_id || null, metadataJson);
9415
9415
  if (input.tags && input.tags.length > 0) {
9416
9416
  const insertTag = d.query("INSERT OR IGNORE INTO recording_tags (recording_id, tag) VALUES (?, ?)");
9417
9417
  for (const tag of input.tags) {
@@ -9798,7 +9798,7 @@ async function processText(rawText, config, systemPrompt) {
9798
9798
  }
9799
9799
 
9800
9800
  // src/version.ts
9801
- var VERSION = "0.1.32";
9801
+ var VERSION = "0.1.33";
9802
9802
 
9803
9803
  // src/db/storage-config.ts
9804
9804
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
@@ -9957,7 +9957,7 @@ var PG_MIGRATIONS = [
9957
9957
  raw_text TEXT NOT NULL,
9958
9958
  processed_text TEXT,
9959
9959
  processing_mode TEXT NOT NULL DEFAULT 'raw' CHECK(processing_mode IN ('raw', 'enhanced')),
9960
- model_used TEXT NOT NULL DEFAULT 'gpt-4o-mini-transcribe',
9960
+ model_used TEXT NOT NULL DEFAULT 'gpt-4o-transcribe',
9961
9961
  enhancement_model TEXT,
9962
9962
  duration_ms INTEGER DEFAULT 0,
9963
9963
  language TEXT,
package/dist/storage.js CHANGED
@@ -5024,7 +5024,7 @@ import { homedir as homedir2 } from "os";
5024
5024
  var DEFAULT_CONFIG = {
5025
5025
  openai_api_key: "",
5026
5026
  enhancement_api_key: "",
5027
- transcription_model: "gpt-4o-mini-transcribe",
5027
+ transcription_model: "gpt-4o-transcribe",
5028
5028
  enhancement_model: "gpt-4o",
5029
5029
  language: "en",
5030
5030
  audio_format: "wav",
@@ -5229,7 +5229,7 @@ var MIGRATIONS = [
5229
5229
  raw_text TEXT NOT NULL,
5230
5230
  processed_text TEXT,
5231
5231
  processing_mode TEXT NOT NULL DEFAULT 'raw' CHECK(processing_mode IN ('raw', 'enhanced')),
5232
- model_used TEXT NOT NULL DEFAULT 'gpt-4o-mini-transcribe',
5232
+ model_used TEXT NOT NULL DEFAULT 'gpt-4o-transcribe',
5233
5233
  enhancement_model TEXT,
5234
5234
  duration_ms INTEGER DEFAULT 0,
5235
5235
  language TEXT,
@@ -5434,7 +5434,7 @@ var PG_MIGRATIONS = [
5434
5434
  raw_text TEXT NOT NULL,
5435
5435
  processed_text TEXT,
5436
5436
  processing_mode TEXT NOT NULL DEFAULT 'raw' CHECK(processing_mode IN ('raw', 'enhanced')),
5437
- model_used TEXT NOT NULL DEFAULT 'gpt-4o-mini-transcribe',
5437
+ model_used TEXT NOT NULL DEFAULT 'gpt-4o-transcribe',
5438
5438
  enhancement_model TEXT,
5439
5439
  duration_ms INTEGER DEFAULT 0,
5440
5440
  language TEXT,
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.32";
1
+ export declare const VERSION = "0.1.33";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/recordings",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "type": "module",
5
5
  "description": "Speech-to-text recording tool with MCP and CLI — records, transcribes, and optionally enhances text using AI",
6
6
  "repository": {
@@ -520,7 +520,6 @@ public final class RecordingEngine: ObservableObject {
520
520
 
521
521
  public func stopAndTranscribe() {
522
522
  guard isRecording else { return }
523
- let stopStartedAt = Date()
524
523
  log("stopAndTranscribe")
525
524
 
526
525
  recordingTimer?.invalidate()
@@ -541,7 +540,6 @@ public final class RecordingEngine: ObservableObject {
541
540
  let audioPath = activeAudioPath
542
541
  let pcmStreamPipe = pcmStreamPipe
543
542
  let client = realtimeClient
544
- let transcriptionLanguage = transcriptionLanguage
545
543
  resetRecordingIntent()
546
544
  self.pcmStreamPipe = nil
547
545
 
@@ -558,37 +556,11 @@ public final class RecordingEngine: ObservableObject {
558
556
  self.streamingTask = nil
559
557
 
560
558
  let realtimeText = Self.normalizedRealtimeTranscript(streamingResult)
561
- let fastPathText = Self.realtimeFastPathTranscript(
562
- realtimeText: streamingResult,
563
- pcmByteCount: self.recordedPCM.count,
564
- language: transcriptionLanguage
565
- )
566
559
 
567
560
  self.liveTranscriptionText = ""
568
561
 
569
- if let fastPathText {
570
- let releaseToTextMS = Int(Date().timeIntervalSince(stopStartedAt) * 1_000)
571
- let repaired = Self.wasRealtimeTranscriptRepaired(rawText: streamingResult, cleanedText: fastPathText)
572
- self.log("using realtime fast path chars=\(fastPathText.count) repaired=\(repaired) releaseToTextMs=\(releaseToTextMS)")
573
- self.isTranscribing = false
574
- self.finishWithText(
575
- fastPathText,
576
- curMode: curMode,
577
- targetAppBundleIdentifier: targetAppBundleIdentifier,
578
- targetAppPid: targetAppPid,
579
- activeProjectId: activeProjectId,
580
- activeProjectName: activeProjectName
581
- )
582
- if let audioPath, !self.recordedPCM.isEmpty {
583
- Self.saveCapturedWAVInBackground(pcmData: self.recordedPCM, audioPath: audioPath, homePath: self.home)
584
- }
585
- self.activeAudioPath = nil
586
- self.recordedPCM.removeAll(keepingCapacity: true)
587
- return
588
- }
589
-
590
562
  if let audioPath, self.writeCapturedWAV(to: audioPath) {
591
- self.log("transcribing captured full audio audioPath=\(audioPath) realtimePreviewChars=\(realtimeText?.count ?? 0)")
563
+ self.log("transcribing captured full audio with quality model audioPath=\(audioPath) realtimePreviewChars=\(realtimeText?.count ?? 0)")
592
564
  self.fallbackTranscribe(
593
565
  audioPath: audioPath,
594
566
  curMode: curMode,
@@ -119,7 +119,7 @@ struct OpenAIAPIKeyStoreTests {
119
119
  let home = try makeHome()
120
120
  try writeConfig(home: home, [
121
121
  "openai_api_key": "old-key",
122
- "transcription_model": "gpt-4o-mini-transcribe",
122
+ "transcription_model": "gpt-4o-transcribe",
123
123
  ])
124
124
 
125
125
  try OpenAIAPIKeyStore.save(key: "sk-rotated", homePath: home.path)
@@ -131,7 +131,7 @@ struct OpenAIAPIKeyStoreTests {
131
131
  let data = try Data(contentsOf: configURL)
132
132
  let json = try #require(JSONSerialization.jsonObject(with: data) as? [String: Any])
133
133
  #expect(json["openai_api_key"] as? String == "sk-rotated")
134
- #expect(json["transcription_model"] as? String == "gpt-4o-mini-transcribe")
134
+ #expect(json["transcription_model"] as? String == "gpt-4o-transcribe")
135
135
  }
136
136
 
137
137
  @Test("Saving an empty key removes it from config.json")