Membrane Gemini Plugin

View Source

Hex.pm API Docs CircleCI

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.

Installation

The package can be installed by adding membrane_gemini_plugin to your list of dependencies in mix.exs:

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:
    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 2020, Software Mansion

Software Mansion

Licensed under the Apache License, Version 2.0