Skip to content

Commit b4544cd

Browse files
committed
📝 Updated Audio-Analyzer Docs for more clarity
- Added separate section for Recommended setup and Advanced setup - Added Cautionary note for Advanced setup - Rephrased words and added more details in some sections - Changed the env vars for REGISTRY and TAG to PUB_REGISTRY and PUB_TAG - This was done so that they do not conflict with REGISTRY and TAG vars handled in setup scripts. - These variables are explicitly meant for public images and their different tags; have no similarity with the ones in setup script. Signed-off-by: Krishna Murti <[email protected]>
1 parent 5387593 commit b4544cd

File tree

2 files changed

+29
-20
lines changed

2 files changed

+29
-20
lines changed

microservices/audio-analyzer/docs/user-guide/get-started.md

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -80,26 +80,32 @@ Refer to [supported models](./Overview.md#models-supported) for the list of mode
8080

8181
# Quick Start
8282

83-
User has following different options to start and use the application :
83+
User has following different options to setup/build and use the application.
8484

85-
- [Build the image and run using Docker script](./how-to-build-from-source.md#build-and-run-using-docker-script). Docker script helps build images for application and any required dependency and deploy the application. Default storage backend used here is `minio` but can be updated to use `local` storage backend.
86-
- [Use pre-built image for standalone setup](#standalone-setup-in-docker-container). Standalone setup has no external dependency. Default and recommended storage backend: `local`.
87-
- [Build and setup on host using setup script](./how-to-build-from-source.md#setup-and-run-on-host-using-setup-script). Only storage backend available: `local`
88-
- [Build and setup on host manually](#manual-host-setup-using-poetry). Default storage backend used is `local` but can be configured to use `minio` storage backend.
85+
### Recommended Setup
86+
- [Use pre-built image for standalone setup](#standalone-setup-in-docker-container). Standalone setup has no external dependency. Storage backend used: `local`.
87+
- [Build and run on host using setup script](./how-to-build-from-source.md#build-and-run-on-host-using-setup-script). Storage backend used: `local`
88+
89+
### Advanced Setup
90+
91+
> __**NOTE :**__ Audio-Analyzer microservice can also be run with Minio as its storage backend. However, this is not a recommended setup and is only meant for advanced users. This setup requires familiarity with using Minio and using non-documented API requests.
92+
93+
- [Build and run in container using Docker script](./how-to-build-from-source.md#build-and-run-in-container-using-docker-script). Docker script helps build images for application and deploy the application with any optional dependency. Default storage backend used here is `minio` but can be updated to use `local` storage backend. If `minio` storage backend is used, then the script also brings up Minio server container along with application container.
94+
- [Build and run on host manually](#build-and-run-on-host-manually). Default storage backend used is `local` but can be configured to use `minio` storage backend.
8995

9096

9197
## Standalone Setup in Docker Container
9298

9399
1. Set the registry and tag for the public image to be pulled.
94100

95101
```bash
96-
export REGISTRY=intel/
97-
export TAG=latest
102+
export PUB_REGISTRY=intel/
103+
export PUB_TAG=latest
98104
```
99105
2. Pull public image for Audio Analyzer Microservice:
100106

101107
```bash
102-
docker pull ${REGISTRY}audio-analyzer:${TAG:-latest}
108+
docker pull ${PUB_REGISTRY}audio-analyzer:${PUB_TAG:-latest}
103109
```
104110
3. Set the required environment variables:
105111

@@ -124,7 +130,7 @@ User has following different options to start and use the application :
124130

125131
```bash
126132
# Run Audio Analyzer application container exposed on a randomly assigned port
127-
docker run --rm -d -P -v $AUDIO_ANALYZER_DIR:/data -e http_proxy -e https_proxy -e ENABLED_WHISPER_MODELS -e DEFAULT_WHISPER_MODEL --name audioanalyzer intel/audio-analyzer:latest
133+
docker run --rm -d -P -v $AUDIO_ANALYZER_DIR:/data -e http_proxy -e https_proxy -e ENABLED_WHISPER_MODELS -e DEFAULT_WHISPER_MODEL --name audioanalyzer ${PUB_REGISTRY}audio-analyzer:${PUB_TAG:-latest}
128134
```
129135

130136
7. Access the Audio-Analyzer API in a web browser on the URL given by this command:
@@ -135,23 +141,23 @@ User has following different options to start and use the application :
135141
echo http://${host}:${port}/docs
136142
```
137143

138-
## API Usage
144+
### API Usage
139145

140146
Below are examples of how to use the API on command line with `curl`.
141147

142-
### Health Check
148+
#### Health Check
143149

144150
```bash
145151
curl "http://localhost:$port/api/v1/health"
146152
```
147153

148-
### Get Available Models
154+
#### Get Available Models
149155

150156
```bash
151157
curl "http://localhost:$port/api/v1/models"
152158
```
153159

154-
### Filesystem Storage Examples
160+
#### Filesystem Storage Examples
155161

156162
#### Upload a Video File for Transcription
157163

@@ -172,7 +178,7 @@ Once the transcription process is completed, the transcript files will be availa
172178
ls $AUDIO_ANALYZER_DIR/transcript
173179
```
174180

175-
## Transcription Performance and Optimization on CPU
181+
### Transcription Performance and Optimization on CPU
176182

177183
The service uses **pywhispercpp** with the following optimizations for CPU transcription:
178184

@@ -181,7 +187,7 @@ The service uses **pywhispercpp** with the following optimizations for CPU trans
181187
- **Greedy Decoding**: Faster inference by using greedy decoding instead of beam search
182188
- **OpenVINO IR Models**: Can download and use OpenVINO IR models for even faster CPU inference
183189

184-
# Manual Host Setup using Poetry
190+
## Build and run on host manually
185191

186192
> **__NOTE :__** This is an advanced setup and is recommended for development/contribution only. As an alternative method to setup on host, please see : [setting up on host using setup script](./how-to-build-from-source.md#setup-and-run-on-host-using-setup-script). When setting up on host, the default storage backend would be local filesystem. Please make sure `STORAGE_BACKEND` is not overridden to **minio**, unless you want to explicitly use the Minio backend.
187193

@@ -238,7 +244,7 @@ The service uses **pywhispercpp** with the following optimizations for CPU trans
238244
STORAGE_BACKEND=minio DEBUG=True poetry run uvicorn audio_analyzer.main:app --host 0.0.0.0 --port 8000 --reload
239245
```
240246

241-
## Running Tests
247+
### Running tests for host setup
242248

243249
We can run unit tests and generate coverage by running following command in the application's directory (microservices/audio-analyzer) in the cloned repo:
244250
@@ -255,15 +261,15 @@ poetry run coverage run -m pytest ./tests
255261
poetry run coverage report -m
256262
```
257263
258-
## API Documentation
264+
### API Documentation
259265
260266
When running the service, you can access the Swagger UI documentation at:
261267
262268
```bash
263269
http://localhost:8000/docs
264270
```
265271
266-
## Advanced Setup Options
272+
## More Advanced Setup Options
267273
268274
### Manually Running a Local MinIO Server
269275

microservices/audio-analyzer/docs/user-guide/how-to-build-from-source.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Following options are provided to build the microservice.
2424
- [Build and run application with required dependencies using Docker Script](#build-and-run-using-docker-script).
2525
- [Build and run on host using Setup Script](#setup-and-run-on-host-using-setup-script).
2626

27-
## Build and Run using Docker Script
27+
## Build and run in container using Docker script
2828

2929
1. Clone the repository:
3030
```bash
@@ -86,6 +86,8 @@ Following options are provided to build the microservice.
8686
./setup_docker.sh
8787
```
8888

89+
4. If above step is successful, it will print the complete URL of API endpoint along with URL of Swagger API docs. Please refer the API docs to learn how to send request to Audio-Analyzer when running with Minio.
90+
8991
### Docker Setup Options
9092

9193
The `setup_docker.sh` script when run without any parameters builds and runs the production docker images. It additionally supports the following options:
@@ -117,7 +119,8 @@ The production environment uses:
117119
- Optimized container without development dependencies
118120
- No source code mounting (code is copied at build time)
119121

120-
## Setup and run on host using Setup Script
122+
123+
## Build and run on host using Setup Script
121124

122125
1. Clone the repository:
123126
```bash

0 commit comments

Comments
 (0)