File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed
examples/transcription/transcription Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 44
55FISHJAM_ID = os .getenv ("FISHJAM_ID" , "" )
66FISHJAM_TOKEN = os .environ ["FISHJAM_MANAGEMENT_TOKEN" ]
7- TRANSCRIPTION_MODEL = "gemini-live- 2.5-flash-preview"
7+ TRANSCRIPTION_MODEL = "gemini-2.5-flash-native-audio- preview-09-2025 "
88TRANSCRIPTION_CONFIG = LiveConnectConfig (
9- response_modalities = [Modality .TEXT ],
9+ response_modalities = [Modality .AUDIO ],
1010 input_audio_transcription = AudioTranscriptionConfig (),
1111)
Original file line number Diff line number Diff line change 1- from fishjam import FishjamClient , Room
1+ from fishjam import AgentOptions , FishjamClient , Room
22from fishjam .errors import NotFoundError
3+ from fishjam .integrations .gemini import GeminiIntegration
34from transcription .worker import BackgroundWorker
45
56from .agent import TranscriptionAgent
@@ -27,7 +28,10 @@ def _create_room(self):
2728 def _create_agent (self ):
2829 self .agent = TranscriptionAgent (
2930 self .room .id ,
30- fishjam .create_agent (self .room .id ),
31+ fishjam .create_agent (
32+ self .room .id ,
33+ AgentOptions (output = GeminiIntegration .GeminiInputAudioSettings )
34+ ),
3135 self ._worker ,
3236 )
3337
Original file line number Diff line number Diff line change 11from asyncio import Event , Queue , TaskGroup
22from typing import Callable
33
4- from google import genai
54from google .genai .live import AsyncSession
65from google .genai .types import Blob
76
7+ from fishjam .integrations .gemini import GeminiIntegration
8+
89from .config import TRANSCRIPTION_CONFIG , TRANSCRIPTION_MODEL
910
1011
1112class TranscriptionSession :
1213 def __init__ (self , on_text : Callable [[str ], None ]):
13- self ._gemini = genai . Client ()
14+ self ._gemini = GeminiIntegration . create_client ()
1415 self ._audio_queue = Queue [bytes ]()
1516 self ._end_event = Event ()
1617 self ._model = TRANSCRIPTION_MODEL
You can’t perform that action at this time.
0 commit comments