Project Info
Inspiration
This project was born out of the desire to combine speech to text AI with local LLMs to create a product that improves the developer experience by a large factor.
What it does
SpeechScaffold is a tool which developers run alongside the IDE. The tool allows a developer to rapidly build and iterate on the style and functionality of their React components simply by describing the changes they want out loud. It integrates directly with the IDE, so the developer can instantly edit and use code they generate. How I built it I used React for the frontend, since this is a very popular web framework and also most likely to draw good results from Codellama and/or Mistral. The AI agent, written in Python, is a heavily modified version of an AI assistant link which, with the modifications, is able to fetch the current state of the code, iterate it based on the developer's voice commands, and output a new and improved version of the code each time.
Challenges we ran into
I originally used Svelte for the framework, since it is more modern than React and has much simpler code in many cases. However, the LLMs do not output Svelte at the same quality, likely due to it being a newer framework. Thus, I had to retool the entire pipeline to React.
Accomplishments we're proud of
I am proud of the fact that the tool is able to achieve fairly consistent and accurate results, which means it is several factors faster than writing the code for the same components by hand.
What we learned
I learned a lot about implementing OpenAI's whisper model, inferencing with Ollama and streaming its output, parsing and cleaning LLM output data to fit rigorous standards for code, and prompt engineering for code iteration.
What's next
The next improvements include improving the list of special commands by adding memory with undo, multiple generations with choice of best, and improving the speed of generation via external APIs rather than self hosting the LLM.
SpeechScaffold
SpeechScaffold is a tool which developers run alongside the IDE. The tool allows a developer to rapidly build and iterate on the style and functionality of their React components simply by describing the changes they want out loud. It integrates directly with the IDE, so the developer can instantly edit and use code they generate.
Installation
You'll need to run Ollama (for local LLM; I used codellama) and you'll need to download a whisper model to /assistant/whisper (I used medium.en.pt). Then, simply run the Ollama server (should be automatic), the assistant (with python3 assistant.py in the folder /assistant), and the client (with npm run dev in the folder /autowebsite).
Analysis
View
Metric
- 10
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- HTMLIn code
- JavaScriptIn code
- Next.jsIn code
- OpenAIIn code
- PythonIn code
- PyTorchIn code
- ReactIn code
- SvelteIn code
- Tailwind CSSIn code
- TypeScriptIn code
- Mistral AIClaimed
- OllamaClaimed
11 of 13 appear in the indexed code. 2 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
33 KB
Source files
25
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
SambhavG/voice-to-website
48 files · 711 KB · @ 068e90f
Structure
Interface
10 files · 21%Screens, components and styles rendered to the user.
Application logic
8 files · 17%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- Python49%
- JavaScript20%
- Markdown11%
- Svelte10%
- CSS7%
- YAML2%
- Other (2)1%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
assistant/requirements.txt
pypi · 13- blobfile
- openai
- openai-whisper
- PyAudio
- pygame
- pyObjC
- pyttsx3
- PyYAML
- soundfile
- torch
- torchaudio
- torchvision
- Wave
autowebsite/package.json
npm · 11- next
- react
- react-dom
- react-syntax-highlighter
- tailwind-styled-components
- tailwindbase
- +5 more
package.json
npm · 7- highlight.js
- prism-svelte
- prismjs
- +4 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.