powered by
This function sends audio to the Gemini API and returns a text description.
gemini_audio( audio = NULL, prompt = "Describe this audio", model = "1.5-flash", temperature = 0.5, maxOutputTokens = 1024 )
A character vector containing the Gemini API's response.
Path to the audio file (default: uses a sample file). Must be an MP3.
A string describing what to do with the audio.
The Gemini model to use ("1.5-flash" or "1.5-pro", "2.0-flash-exp"). Defaults to "1.5-flash".
Controls the randomness of the generated text (0-2). Defaults to 0.5.
The maximum number of tokens in the generated text. Defaults to 1024.
if (FALSE) { library(gemini.R) setAPI("YOUR_API_KEY") gemini_image(audio = system.file("docs/reference/helloworld.mp3", package = "gemini.R")) }
Run the code above in your browser using DataLab