# Membrane Gemini Plugin
[](https://hex.pm/packages/membrane_gemini_plugin)
[](https://hexdocs.pm/membrane_gemini_plugin)
[](https://circleci.com/gh/membraneframework/membrane_gemini_plugin)
A Membrane plugin for easy integration with the Gemini Live API, establishing a WebSocket connection for low-latency audio streaming.
It's a part of the [Membrane Framework](https://membrane.stream).
## Installation
The package can be installed by adding `membrane_gemini_plugin` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:membrane_gemini_plugin, "~> 0.1.1"}
]
end
```
The API key can be passed in one of two ways:
1. Through the `:gemini_ex` application config, e.g. setting it in `config/config.exs`:
```elixir
config :gemini_ex, api_key: "your API key"
```
2. Through the `GEMINI_API_KEY` environment variable, if the application config field is unset.
## Examples
See `examples/talking_demo.exs` for a simple demo that allows conversation with Gemini and additional text prompting (just write your prompt in the process shell and press `enter` / `return` to send).
```
GEMINI_API_KEY="your API key" elixir examples/talking_demo.exs
```
NOTE: be sure to use headphones to avoid audio feedback, otherwise the LLM might start talking with itself.
## Copyright and License
Copyright 2020, [Software Mansion](https://swmansion.com/?utm_source=git&utm_medium=readme&utm_campaign=membrane_gemini_plugin)
[](https://swmansion.com/?utm_source=git&utm_medium=readme&utm_campaign=membrane_gemini_plugin)
Licensed under the [Apache License, Version 2.0](LICENSE)