Giter VIP home page Giter VIP logo

svelte-gpt-chat's Introduction

svelte gpt chatbot

features

  • speech input and output (speech synthesis and speech recognition) using google cloud speech-to-text and whisper for text-to-speech

  • multiple languages (for speech input and output)

  • listening mode: automatically start and stop voice recording when speaking

  • streamed response

  • serverside or browserside api calls

todo

  • settings:
    • turn on/off speech input
    • turn on/off speech output
    • select language
    • turn on/off dark mode
    • select voice
    • select gpt model
    • select gpt settings (temperature, etc.)
    • set start message
  • add browser side api calls with api keys
  • encode audio to mp3 (for cross browser support)
  • get half second before speech start
  • get half second after clicking stop
  • add function calls
  • show loading indicator
  • show error messages
  • multiple chats
  • save chats and settings in local storage
  • multiline input
  • edit chat (delete, edit, add)
  • figure out how to play and record on ios when phone locked

Developing

Create a .env file with the following content:

# .env
GOOGLE_API_KEY=your-google-api-key
OPENAI_API_KEY=your-openai-api-key

Where your google API key has the Speech-to-Text API enabled.

Install dependencies with npm install and start a development server:

# install dependencies
npm install
# start dev server
npm run dev

Open the localhost url in your browser and start chatting.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.