Added microservice documentation to README.md

This commit is contained in:
Jono Targett 2023-05-12 11:49:03 +09:30
parent 349cca3853
commit 9cdca795e5

View File

@ -3,7 +3,7 @@
This repository is a demo - it isn't a fully fleshed out system and isn't intended to be. Things might break. It also makes use of some 3rd-party code that we don't have a commercial licence for, so legally this can only be used for demonstration purposes, and only interally. This repository is a demo - it isn't a fully fleshed out system and isn't intended to be. Things might break. It also makes use of some 3rd-party code that we don't have a commercial licence for, so legally this can only be used for demonstration purposes, and only interally.
# Getting started # Getting started
- Use a debian-based 64-bit system. No way around it; this project is not cross-platform. - Use a debian-based 64-bit system (x86). No way around it; this project is not cross-platform until some efforts gets put into making it that way.
- Install the SDRPlay device driver & install the project dependencies. - Install the SDRPlay device driver & install the project dependencies.
- `./setup` - `./setup`
- Follow the prompts, there is some audience participation getting the driver installed. - Follow the prompts, there is some audience participation getting the driver installed.
@ -86,4 +86,19 @@ To run the whole chain in realtime without using intermediary files, tuning to a
sox -t raw -r 32000 -b 16 -c 2 -L -e signed-integer - -d sox -t raw -r 32000 -b 16 -c 2 -L -e signed-integer - -d
``` ```
There's an outstanding bug where running live causes a buffer under-run in alsa - still working on that. There's an outstanding bug where running live causes a buffer under-run in alsa - still working on that.
# Running the microservice
A detailed description of the 'microservice' architecture is available [here](./docs/architecture.md). To be able to access the microservice outside of `localhost` you may need to open up some ports.
Some of the architecture is currently dependent on stuff running on my local network as well - anything from **Reverse Proxy** doesn't exist in this project and so won't be available if run elsewhere.
Running the microservice is simple. With no arguments:
```bash
./microservice.py
```
You should get some log output about how this isn't safe to run in production - good thing it isn't being run in production. Ignore most of the garbage, but you'll also be able to see REST client hits and the response codes in the terminal output.
The REST API will present itself at http://localhost:5000, but there is also **Swagger UI** available at http://localhost:5000/apidocs. Documentation on the endpoints and how to interact with the radio is presented there.
Once a radio stream is started, use any RTSP capable client (**VLC** is recommended) to connect to the stream at [rtsp://localhost:8554/radio/[radio]/stream](#). You'll need to replace `[radio]` with the name of the radio for which you have started the stream.