# Pyrobbot: GPT chatbot Streamlit App. Supports voice interaction

**URL:** <https://discuss.streamlit.io/t/pyrobbot-gpt-chatbot-streamlit-app-supports-voice-interaction/55323>\
**Category:** Show the Community!\
**Tags:** streamlitbot, chatgpt, api, gpt4, speech-to-text, llms, multipage, openai\
**Created:** [November 13, 2023, 1:20pm UTC](https://discuss.streamlit.io/t/pyrobbot-gpt-chatbot-streamlit-app-supports-voice-interaction/55323 "2023-11-13T13:20:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulovcmedeiros](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/paulovcmedeiros/32/34463_2.png) [@paulovcmedeiros](https://discuss.streamlit.io/u/paulovcmedeiros)\
**Post date:** [November 13, 2023, 1:20pm UTC](https://discuss.streamlit.io/t/pyrobbot-gpt-chatbot-streamlit-app-supports-voice-interaction/55323/1 "2023-11-13T13:20:33Z")

</div>

Hello everyone 🙂

Just sharing an app I built recently using Streamlit. It’s a simple chatbot that uses OpenAI API to get responses from [GPT LLMs](https://platform.openai.com/docs/models). It is written completely in Python.

You can try the [demo app on Streamlit](https://pyrobbot.streamlit.app/)🙂

This is a multipage app where new pages are created (and removed) dynamically. Since I’ve seen in my searches that this is a topic people tend to be interested in when it comes to Streamlit, I though it could be useful for other if I shared my code.

Here are some of the features:

- Speech recognition and text to voice: Interact with GPT by voice 🙂
- Web UI (streamlit)
  - Add/remove conversations dynamically
  - Automatic/editable conversation summary title

- Fully configurable
  - Support for multiple GPT LLMs
  - Control over the parameters passed to the OpenAI API, with (hopefully) sensible defaults
  - Ability to pass base directives to the LLM
    - E.g., to make it adopt a persona, but you decide which directived to pass

  - Dynamically modifiable AI parameters in each chat separately
    - No need to restart the chat

- Autosave & retrieve chat history
- Chat context handling using [embeddings](https://platform.openai.com/docs/guides/embeddings)
- Estimated API token usage and associated costs
- Terminal UI (for a more “Wake up, Neo” experience")
- OpenAI API key is **never** stored on disk

This project’s main purpose is to serve as a learning exercise for me, as well as a tool for and experimenting with OpenAI API, GPT LLMs and Streamlit. While it does not claim to be the best or more robust OpenAI-powered chatbot out there, it _does_ aim to have a friendly user interface and to be easy to use and configure.

The source code is [available on GitHub](https://github.com/paulovcmedeiros/pyRobBot) too. Feel free to open issues or submit pull requests if you find a bug or have a suggestion.

Last but not least: this project is **not** affiliated with OpenAI in any way.

Have fun 🙂

---

<div class="post-metadata">

**Author:** ![Charly\_Wargnier](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/charly_wargnier/32/1504_2.png) [@Charly\_Wargnier](https://discuss.streamlit.io/u/Charly_Wargnier)\
**Post date:** [November 14, 2023, 1:01pm UTC](https://discuss.streamlit.io/t/pyrobbot-gpt-chatbot-streamlit-app-supports-voice-interaction/55323/2 "2023-11-14T13:01:48Z")

</div>

What an amazing app, @paulovcmedeiros! 🤗

Thanks for sharing - I’ll share internally.

Best,  
Charly

---

<div class="post-metadata">

**Author:** ![paulovcmedeiros](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/paulovcmedeiros/32/34463_2.png) [@paulovcmedeiros](https://discuss.streamlit.io/u/paulovcmedeiros)\
**Post date:** [November 14, 2023, 1:43pm UTC](https://discuss.streamlit.io/t/pyrobbot-gpt-chatbot-streamlit-app-supports-voice-interaction/55323/3 "2023-11-14T13:43:37Z")

</div>

Thanks, Charly! Great to hear 🙂

Feel free to get in touch if you guys wish.

It has been a very pleasant experience to build an UI using Streamlit, by the way. I came across it by chance about two weeks ago after searching for “package to create python apps quickly” (or something along these lines), and it has indeed been a quite smooth process. Kudos to the team.

---

<div class="post-metadata">

**Author:** ![paulovcmedeiros](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/paulovcmedeiros/32/34463_2.png) [@paulovcmedeiros](https://discuss.streamlit.io/u/paulovcmedeiros)\
**Post date:** [March 4, 2024, 12:15pm UTC](https://discuss.streamlit.io/t/pyrobbot-gpt-chatbot-streamlit-app-supports-voice-interaction/55323/4 "2024-03-04T12:15:55Z")

</div>

Update with new features, most prominently voice chat in the streamlit app .  
Take a look at the project’s [GitHub page] for further information on installation and usage and have fun! 🙂

PyRobBot is a python package that uses OpenAI’s [GPT large language models (LLMs)](https://platform.openai.com/docs/models) to implement a fully configurable **personal assistant** that, on top of the traditional chatbot interface, can also speak and listen to you using AI-generated **human-like** voices.

## Features

Features include, but are not limited to:

- Voice Chat

- Internet access: The assistent will **search the web** to find the answers it doesn’t have in its training data

- Web browser user interface

- Chat via terminal

- Fully configurable

- Chat context handling using [embeddings](https://platform.openai.com/docs/guides/embeddings)

- Estimated API token usage and associated costs

- OpenAI API key is **never** stored on disk

---

<div class="post-metadata">

**Author:** ![Rhytham](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/rhytham/32/46067_2.png) [@Rhytham](https://discuss.streamlit.io/u/Rhytham)\
**Post date:** [August 25, 2024, 6:25am UTC](https://discuss.streamlit.io/t/pyrobbot-gpt-chatbot-streamlit-app-supports-voice-interaction/55323/5 "2024-08-25T06:25:28Z")

</div>

your app is overused.

---

<div class="post-metadata">

**Author:** ![Gnosis](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/gnosis/32/28219_2.png) [@Gnosis](https://discuss.streamlit.io/u/Gnosis)\
**Post date:** [September 24, 2024, 6:14pm UTC](https://discuss.streamlit.io/t/pyrobbot-gpt-chatbot-streamlit-app-supports-voice-interaction/55323/6 "2024-09-24T18:14:42Z")

</div>

what a nice job you did there. can this also work with ollama or offline ?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/streamlit/original/3X/c/f/cf4c2ee0d938358f82448c5fe4b9c3c91d7ce19c.svg) [@system](https://discuss.streamlit.io/u/system)\
**Post date:** [March 23, 2025, 6:15pm UTC](https://discuss.streamlit.io/t/pyrobbot-gpt-chatbot-streamlit-app-supports-voice-interaction/55323/7 "2025-03-23T18:15:11Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
