File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
examples/transcription/src Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ declare global {
22 namespace NodeJS {
33 interface ProcessEnv {
44 FISHJAM_ID ?: string ;
5+ FISHJAM_URL ?: string ;
56 FISHJAM_TOKEN ?: string ;
67 GEMINI_API_KEY ?: string ;
78 }
Original file line number Diff line number Diff line change @@ -3,15 +3,16 @@ import { peerController } from './controllers/peers';
33import { FishjamService } from './service/fishjam' ;
44import { TranscriptionService } from './service/transcription' ;
55
6- if ( ! process . env . FISHJAM_ID || ! process . env . FISHJAM_TOKEN || ! process . env . GEMINI_API_KEY ) {
6+ if ( ! ( process . env . FISHJAM_ID || process . env . FISHJAM_URL ) || ! process . env . FISHJAM_TOKEN || ! process . env . GEMINI_API_KEY ) {
77 throw Error ( 'Environment variables FISHJAM_ID, FISHJAM_TOKEN and GEMINI_API_KEY are required.' ) ;
88}
99
1010const fishjamConfig = {
11- fishjamUrl : 'http://localhost:5002' ,
11+ fishjamUrl : process . env . FISHJAM_URL ,
1212 fishjamId : process . env . FISHJAM_ID ,
1313 managementToken : process . env . FISHJAM_TOKEN ,
1414} ;
15+
1516const fishjam = new FishjamService ( fishjamConfig ) ;
1617
1718new TranscriptionService ( fishjamConfig , process . env . GEMINI_API_KEY ) ;
Original file line number Diff line number Diff line change @@ -87,9 +87,8 @@ export class TranscriptionService {
8787 }
8888
8989 async handleAgentDisconnected ( message : PeerDisconnected ) {
90- console . log ( `Agent ${ message . peerId } disconnected, removing room ` ) ;
90+ console . log ( `Agent ${ message . peerId } disconnected` ) ;
9191
92- await this . fishjamClient . deleteRoom ( message . roomId ) ;
9392 this . agents . delete ( message . roomId ) ;
9493 }
9594
You can’t perform that action at this time.
0 commit comments