-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Open
Labels
Needs AttentionThis issue needs maintainer attention.This issue needs maintainer attention.plugin: ailabel issues for firebase_ai pluginlabel issues for firebase_ai plugintype: documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Is there an existing issue for this?
- I have searched the existing issues.To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Which plugins are affected?
Other
Which platforms are affected?
No response
Description
The docs dont contain a working example ? most of the method names dont exist. theres no example of passing audio stream into the model? What the hell is going on here guys?
late LiveModelSession _session; //should be LiveSession
final _audioRecorder = YourAudioRecorder();
// Initialize the Vertex AI Gemini API backend service
// Create a `LiveModel` instance with the model that supports the Live API
final model = FirebaseAI.vertexAI().liveModel( //should be liveGenerationModel
model: 'gemini-2.0-flash-live-preview-04-09',
// Configure the model to respond with audio
config: LiveGenerationConfig(responseModalities: [ResponseModality.audio]), //should be ResponseModalities
);
_session = await model.connect();
final audioRecordStream = _audioRecorder.startRecordingStream();
// Map the Uint8List stream to InlineDataPart stream
final mediaChunkStream = audioRecordStream.map((data) {
return InlineDataPart('audio/pcm', data);
});
await _session.startMediaStream(mediaChunkStream); //no method called startMediaStreamExists
// In a separate thread, receive the audio response from the model
await for (final message in _session.receive()) {
// Process the received message
///HOW??? HOW DO WE PROCESS THE MESSAGE??????
}```
What
### Reproducing the issue
doc links https://firebase.google.com/docs/ai-logic/live-api#audio-in-audio-out
### Firebase Core version
3.13.0
### Flutter Version
3.32
### Relevant Log Output
```shell
Flutter dependencies
Expand Flutter dependencies
snippet
Replace this line with the contents of your `flutter pub deps -- --style=compact`.
Additional context and comments
No response
kayberd, samithe7 and JavierPerezLavadie
Metadata
Metadata
Assignees
Labels
Needs AttentionThis issue needs maintainer attention.This issue needs maintainer attention.plugin: ailabel issues for firebase_ai pluginlabel issues for firebase_ai plugintype: documentationImprovements or additions to documentationImprovements or additions to documentation
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
SelaseKay commentedon Jun 6, 2025
Hi @colbymaloy, could you link me the documentation you're referencing? In the meantime, you can have a look at this example which captures how you pass audio to a model.
AliKales commentedon Jun 6, 2025
Hi @SelaseKay , the example you shared is something different from what we want to achieve.
https://firebase.google.com/docs/ai-logic/live-api#audio-in-audio-out
we want to make realtime talk with Gemini, not recording audio and sending it as Content
colbymaloy commentedon Jun 7, 2025
yes here is the link to the page which references methods that dont exist: https://firebase.google.com/docs/ai-logic/live-api#audio-in-audio-out
SelaseKay commentedon Jun 9, 2025
@kevinthecheung Could we review and possibly update this documentation in light of the concerns raised above? It appears some of the referenced methods do not exist.
willsmanley commentedon Jun 11, 2025
yep struggling a bit here as well without examples. its technically working for me but it seems to be just speaking gibberish back to me (switching languages, many back-to-back AI speech with no user speech, etc)
ilham-asgarli commentedon Jun 11, 2025
I was able to solve all the issues and ended up writing a blog post about it on Medium. You can take a look there if you’re interested.
17 remaining items