refactor(desktop): session-scoped voice runtime, STT/LLM ports, caption ownership and meeting export fixes
This commit is contained in:
parent
0adedf5e7b
commit
83cf9133ac
39 changed files with 4787 additions and 1061 deletions
|
|
@ -66,6 +66,15 @@ class AudioCaptureService extends EventEmitter {
|
|||
/** RMS 계산용 누적 버퍼 (100ms 간격 emit) */
|
||||
private _levelAccumulator: Buffer[] = []
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
// EventEmitter 는 'error' 리스너가 없으면 emit('error') 에서 ERR_UNHANDLED_ERROR 를 던진다.
|
||||
// 예전엔 SoX 가 장치를 못 열고 끝나면 'close' 콜백 안에서 이 예외가 나 뒤이은 'stopped' 가
|
||||
// 영영 나가지 않았고, 받아쓰기는 녹음 팁만 띄운 채 조용히 아무것도 하지 않았다.
|
||||
// 기본 sink 로 막고, 소비자는 'stopped'(reason) 로 캡처 종료를 안다. 로깅은 호출 지점에서 한다.
|
||||
this.on('error', () => { /* default sink */ })
|
||||
}
|
||||
|
||||
get state(): CaptureState {
|
||||
return this._state
|
||||
}
|
||||
|
|
@ -560,3 +569,10 @@ export function getAudioCaptureService(): AudioCaptureService {
|
|||
}
|
||||
return instance
|
||||
}
|
||||
|
||||
export function resetAudioCaptureServiceForTests(): void {
|
||||
if (instance) instance.removeAllListeners()
|
||||
instance = null
|
||||
}
|
||||
|
||||
export { AudioCaptureService }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue