Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

BIDI Input and Output Transcriptions Added as NULL Events to DataBaseSessionService #3172

Copy link
Copy link
@GrahamGGreig

Description

@GrahamGGreig
Issue body actions

Was previously using ADK 1.11.0 and wanted to upgrade to make use of the changes seen in commit
ab69ef8, ideally reducing latency with the ability to prevent audio from being uploaded to our SQL DB. However, upon upgrading to 1.16.0, I have seen all messages removed from the SQL DB whether or not the RunConfig value save_live_audio is set to True. This is despite the description seen here where it is expected that audio data will at least be saved to the session.

Image

As well, all of the transcriptions are now missing from the database making it impossible to resume a conversation at a later date. From reading the commit, it looks like transcriptions have been moved out of contents and I can see transcriptions are taking place so that part is working as expected:

Event: content=None grounding_metadata=None partial=None turn_complete=None finish_reason=None error_code=None error_message=None interrupted=None custom_metadata=None usage_metadata=None live_session_resumption_update=None input_transcription=None output_transcription=Transcription( text='Hey' ) avg_logprobs=None logprobs_result=None cache_metadata=None citation_metadata=None invocation_id='e-a0b8e90f-4c9a-4578-a631-5bde953cad6e' author='General_Inquiries_Agent' actions=EventActions(skip_summarization=None, state_delta={}, artifact_delta={}, transfer_to_agent=None, escalate=None, requested_auth_configs={}, requested_tool_confirmations={}, compaction=None, end_of_agent=None, agent_state=None) long_running_tool_ids=None branch=None id='c785ba05-4849-438f-881e-b2235372c627' timestamp=1760474279.826785

But, given that the DataBaseSessionService does not have fields output_transcription and input_transcription. They cannot be seen even if they are being uploaded. It looks like all references to upload to the session database have been removed in the aforementioned commit - ex:

src/google/adk/flows/llm_flows/audio_cache_manager.py

Image

and

‎src/google/adk/flows/llm_flows/transcription_manager.py

Image

I did some digging and found that the transcription events are being saved to the session service in:

src/google/adk/runners.py in _exec_with_plugin(). But, as expected, because they are not being converted to contents they appear as null events in the session DB.

So, my question is: can we add a point where transcriptions are converted back to "contents" such that they are accessible in the session history? Or, is the future plan to have transcriptions only be uploaded as their own columns in the session service (note, I can see this causing some issues if switching back and forth between TEXT and AUDIO modes as TEXT mode is added as contents still).

Also, on another note, not that I need this, but it looks like audio data is only saved if the there is an artifact service:

src/adk/flows/llm_flows/audio_cache_manager.py

Image

I imagine it would be a nice feature to still save to session if desired and not using an artifact service.

Desktop

  • Testing Locally on Windows 11
  • Python version: 3.13.7
  • ADK version: Seen in code base from > 1.14.1

Model Information:

  • Are you using LiteLLM: No
  • Which model is being used: gemini-2.0-flash-live-preview-04-09

Metadata

Metadata

Assignees

Labels

services[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.