@fugood/bricks-project 2.23.0 → 2.24.0-beta.1

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/compile/index.ts CHANGED
@@ -781,6 +781,7 @@ export const compile = async (app: Application) => {
781
781
  title: dataCalc.title,
782
782
  description: dataCalc.description,
783
783
  }
784
+ if (dataCalc.triggerMode) calc.trigger_type = dataCalc.triggerMode
784
785
  if (dataCalc.__typename === 'DataCalculationMap') {
785
786
  calc.type = 'general'
786
787
  const mapCalc = dataCalc as DataCalculationMap
@@ -915,6 +916,7 @@ export const compile = async (app: Application) => {
915
916
  note: scriptCalc.note,
916
917
  code,
917
918
  enable_async: scriptCalc.enableAsync,
919
+ trigger_mode: scriptCalc.triggerMode,
918
920
  inputs: scriptCalc.inputs.reduce((acc, input) => {
919
921
  acc[input.data().id] = input.key
920
922
  return acc
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.23.0",
3
+ "version": "2.24.0-beta.1",
4
4
  "main": "index.ts",
5
5
  "scripts": {
6
6
  "build": "bun scripts/build.js"
@@ -18,5 +18,5 @@
18
18
  "lodash": "^4.17.4",
19
19
  "uuid": "^8.3.1"
20
20
  },
21
- "gitHead": "398352b9923f97e914ac60acab519ca014aa6fb8"
21
+ "gitHead": "70a0207cf51102a2273056cc59951e5efdd75859"
22
22
  }
package/tools/preview.ts CHANGED
@@ -2,7 +2,7 @@ import { $ } from 'bun'
2
2
  import { watch } from 'fs'
3
3
  import type { FSWatcher } from 'fs'
4
4
  import { parseArgs } from 'util'
5
- import { debounce } from 'lodash'
5
+ import debounce from 'lodash/debounce'
6
6
 
7
7
  const { values } = parseArgs({
8
8
  args: Bun.argv,
@@ -43,8 +43,6 @@ Default property:
43
43
  "maxSlicesInMemory": 5,
44
44
  "vadStrategy": "use-preset",
45
45
  "vadPreset": "default",
46
- "autoSliceOnSpeechEnd": true,
47
- "autoSliceThreshold": 2,
48
46
  "initialPrompt": "",
49
47
  "promptPreviousSlices": false,
50
48
  "saveAudio": true,
@@ -86,10 +84,6 @@ Default property:
86
84
  | 'meeting'
87
85
  | 'noisy-environment'
88
86
  | DataLink
89
- /* Auto slice on speech end */
90
- autoSliceOnSpeechEnd?: boolean | DataLink
91
- /* Auto slice threshold in seconds */
92
- autoSliceThreshold?: number | DataLink
93
87
  /* Initial prompt for transcription */
94
88
  initialPrompt?: string | DataLink
95
89
  /* Include previous slices in prompt */
@@ -128,6 +122,8 @@ Default property:
128
122
  onStatusChange?: Array<EventAction>
129
123
  /* Event triggered when statistics update */
130
124
  onStatsUpdate?: Array<EventAction>
125
+ /* Event triggered when slice transcription is stabilized */
126
+ onStabilized?: Array<EventAction>
131
127
  /* Event triggered when transcription ends */
132
128
  onEnd?: Array<EventAction>
133
129
  }
@@ -146,6 +142,8 @@ Default property:
146
142
  lastTranscribeEvent?: () => Data
147
143
  /* Latest VAD event */
148
144
  lastVadEvent?: () => Data
145
+ /* Stabilized transcription text from completed slices */
146
+ stabilizedText?: () => Data
149
147
  /* Audio output file path (auto-generated when saving audio) */
150
148
  audioOutputPath?: () => Data
151
149
  }
@@ -173,6 +171,7 @@ export type GeneratorRealtimeTranscription = Generator &
173
171
  | 'statistics'
174
172
  | 'lastTranscribeEvent'
175
173
  | 'lastVadEvent'
174
+ | 'stabilizedText'
176
175
  | 'audioOutputPath'
177
176
  value: any
178
177
  }
@@ -823,6 +823,9 @@ export const templateEventPropsMap = {
823
823
  'GENERATOR_REALTIME_TRANSCRIPTION_STATS_TIMESTAMP', // type: number
824
824
  'GENERATOR_REALTIME_TRANSCRIPTION_STATS', // type: object
825
825
  ],
826
+ onStabilized: [
827
+ 'GENERATOR_REALTIME_TRANSCRIPTION_STABILIZED_TEXT', // type: string
828
+ ],
826
829
  onEnd: [
827
830
  'GENERATOR_REALTIME_TRANSCRIPTION_END_RESULTS', // type: array
828
831
  'GENERATOR_REALTIME_TRANSCRIPTION_END_AUDIO_OUTPUT_PATH', // type: string