dimamik

dimamik

Feline - PoC for pipecat-inspired real-time voice and multimodal AI pipelines in Elixir

Hi! I’ve been working with Pipecat in Python for quite a while now, and while it’s effortless to set up, when building AI voice agents at scale, it starts to show its limitations. Pipecat has trouble with:

  • concurrency - Pipecat uses asyncio, so only IO is concurrent. Elixir’s version is built on top of processes.
  • frame reliability - If individual frame processor in pipecat crashes - it’s really tricky to recover it. With beam - we have it for free.
  • error handling - Pipecat swallows errors, since it’s hard to propagate them across async calls. Monitoring can be tedious. In Elixir, we could use built-in OTEL spans.
  • fault tolerance - crashes are not isolated, one crash can affect the whole system.
  • simplicity - Since Python is OO, it’s especially challenging to trace state changes across all of that. And building on top of pipecat is extremely error-prone and difficult. Race conditions are inevitable.

Since I very much appreciate Elixir for its design and simplicity, especially for building these kinds of systems, I thought it might be a great idea to port pipecat to it.
Before starting on the implementation myself, I thought it might be worth it to create a PoC on how this could look like with Claude and ask all of you guys what you think. I don’t ask you to review the code itself yet - just the general concepts.

So here is what Claude (with a little guidance from me) came up to:

https://github.com/dimamik/feline

And here’s what the pipeline could look like:

Pipeline.new([
  {Feline.Processors.VADProcessor, start_secs: 0.2, stop_secs: 0.8},
  {Feline.Services.Deepgram.StreamingSTT, api_key: deepgram_key, sample_rate: @sample_rate},
  {Feline.Processors.ConsoleLogger.UserInput, []},
  {Feline.Processors.UserContextAggregator, context_agent: pair.agent},
  {Feline.Services.OpenAI.StreamingLLM, api_key: openai_key, model: "gpt-4.1-mini"},
  {Feline.Processors.AssistantContextAggregator, context_agent: pair.agent},
  {Feline.Processors.ConsoleLogger.BotOutput, []},
  {Feline.Processors.SentenceAggregator, []},
  {Feline.Services.ElevenLabs.StreamingTTS,
    api_key: elevenlabs_key, voice_id: voice_id, sample_rate: 24_000},
  {Feline.Processors.AudioPlayer, sample_rate: 24_000}
])

And here’s a demo on how the above works:

It’s a little similar in spirit to Membrane, but it aims at preserving very close compatibility with the original Pipecat library. Nevertheless, I already talked too much, so now I want to hear what you all think!

Where Next?

Popular in RFCs Top

type1fool
After discussing some of my ideas around Event Sourcing at last night’s Elixir Happy Hour in Austin (highly recommend), I spent some time...
New
wolf4earth
Every protocol you’ve shipped assumes the spec doesn’t change during the connection. This one doesn’t. Code is typed, composable, content...
New
bartblast
:test_tube: Could use a hand testing something. Just landed a protocol pruning enhancement - the compiler now drops protocol implementati...
New
laibulle
Hello, I am playing with quantitative finance with Elixir. This library is more a way for me to explore and learn in this area and especi...
New
c4710n
This package is a simple wrapper of beam-telemetry packages. It provides a modular approach for using beam-telemetry packages. The basi...
New
WyvernoDragon
I’ve been working on pgRx: a query engine that uses BEAM lightweight processes instead of PostgreSQL’s fork-per-connection model. The nu...
New
pzingg
https://github.com/pzingg/phx_cookie_consent I took a phx.gen.auth application and added support for storing a user’s cookie consent set...
New
zachallaun
Hey gang, I’ve been using Req as my primary client for a project I’ve been working on that interacts with a number of APIs, and I quickl...
New
tmbb
SciEx - Scientific programming Code here (very early stage): GitHub - tmbb/sci_ex: Scientific programming for Elixir · GitHub I have dec...
New
benlime
In the last couple of days I was playing around with LiveView, function components and animations. I ended up with a little prototype whi...
New

Other popular topics Top

9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New

We're in Beta

About us Mission Statement