Skip to content

Commit

Permalink
whisper update
Browse files Browse the repository at this point in the history
  • Loading branch information
rubys committed Aug 31, 2024
1 parent 3b92fe0 commit c2adec6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions happy-path/nextjs.html.markerb
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ Key points of logic:
has been modified to make server requests at various points using
[the Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch); the delete
and rename actions are split out so that they can be referenced by the React JSX Home page view.
* [`server.js`](https://github.com/fly-apps/nextjs-dictaphone/blob/main/server.js) contains all of
the WebSocket and Redis code, and delegates to Next.js to render the rest.
* [`server.js`](https://github.com/fly-apps/nextjs-dictaphone/blob/main/server.js) contains
the WebSocket code, and delegates to Next.js to render the rest.
* [`pubsub.js`](https://github.com/fly-apps/nextjs-dictaphone/blob/main/pubsub.js) contains the
interface to Redis. It is split out from the server to avoid circular dependencies.
* [`app/audio/[name]/route.js`](https://github.com/fly-apps/nextjs-dictaphone/blob/main/app/audio/%5Bname%5D/route.js) contains
the logic to build responses to requests to GET, PUT,
and DELETE audio clips.
* [`app/page.js`](https://github.com/fly-apps/nextjs-dictaphone/blob/ac1abcdc9cb1dfa7de08c682b26034e76ad34cc6/app/page.js#L12-L21)
contains the client implementation of web sockets.
* When the `WHISPER_URL` secret is set, `PUT` requests will cause the audio clips
to be passed to the Whisper server, and responses will be used to update the
PostgreSQL database. The code for this is in [app.js](https://github.com/fly-apps/node-dictaphone/blob/1e84a4dece6888dfc68880d146b46511d47391b3/app.js#L102-L129).
PostgreSQL database. The code for this is in [`app/audio/[name]/route.js`](https://github.com/fly-apps/nextjs-dictaphone/blob/459774ec9ebebdf6f991adaa6c88509854ffe34e/app/audio/%5Bname%5D/route.js#L90-L118).

0 comments on commit c2adec6

Please sign in to comment.