text-to-ambience
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v4View latest version
A simple web application that allows users to search for audio files using the Freesound API and play them in a loop.
- Simple Google-like search interface
- Server-side Freesound API integration
- High-quality audio preview playback
- Automatic looping
- Replace previous audio with new search results
backend/index.ts- Main Hono server with API routesfrontend/index.html- Main HTML interfacefrontend/index.js- Client-side JavaScript for audio playbackfrontend/style.css- Styling
GET /- Serves the main HTML interfaceGET /api/search?q={query}- Search for audio files and return playback URL
The application uses the Freesound API. You'll need to set the FREESOUND_API_KEY environment variable with your Freesound API key.
Get your API key from: https://freesound.org/apiv2/apply/