Skip to content

Commit 2c4c853

Browse files
committed
Update README.md
1 parent fc4fd93 commit 2c4c853

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,31 @@ but you can quickly add modules for many other use-cases as well (contributions
88

99
Available modules:
1010

11-
- Resampler using Speex codec (WASM module)
12-
- Voice-Activity-Detection (VAD) via WebRTC-VAD
11+
- **Resampler** using Speex codec (WASM module)
12+
- **Voice-Activity-Detection** (VAD) via WebRTC-VAD
1313
- Custom SEPIA VAD module using Meyda to analyze bark-scale, **MFCC** and more
14-
- Wave Encoder with lookback-buffer
15-
- Porcupine Wake-Word detector (including: "Computer", "Jarvis", "Hey SEPIA" and more)
16-
- [SEPIA STT Server](https://github.com/SEPIA-Framework/sepia-stt-server) WebSocket module for speech recognition (see STT Server for demo)
14+
- **Wave Encoder** with lookback-buffer
15+
- Porcupine **Wake-Word detector** (including: "Computer", "Jarvis", "Hey SEPIA" and more)
16+
- [SEPIA STT Server](https://github.com/SEPIA-Framework/sepia-stt-server) WebSocket module for **speech recognition** (see STT Server for demo)
1717
- more to come ...
1818

1919
## Quick-Start - Voice Recorder
2020

2121
Efficiently resampling audio to 16000 Hz and creating 16Bit mono samples for speech recognition was one of the primary objectives when building this library.
2222
While you can put together your own audio pipeline to do that (see below) there is a very convenient plugin available that does the job for you.
23-
In this quick-start guide you will learn the basics to use the 'SepiaVoiceRecorder'.
23+
In this quick-start guide you will learn the basics to use the **'SepiaVoiceRecorder'**.
2424

25-
The first step is to import the required files and set the correct path to the modules folder. You will find more details about this step in the tutorial below. In this example the required files in 'modules' are 'speex-resample-switch.js', 'wave-encoder-worker.js' and 'shared/ring-buffer.min.js':
25+
The first step is to import the required files and set the correct path to the modules folder. You will find more details about this step in the tutorial below.
26+
In this example the required files in 'modules' are `speex-resample-switch.js`, `wave-encoder-worker.js` and `shared/ring-buffer.min.js`:
2627
```html
2728
<script type="text/javascript" src="test/sepia-web-audio.min.js"></script>
2829
<script type="text/javascript" src="test/sepia-recorder.min.js"></script>
2930
<script>
30-
//set correct modules folder
31-
SepiaFW.webAudio.defaultProcessorOptions.moduleFolder = "test/modules";
31+
SepiaFW.webAudio.defaultProcessorOptions.moduleFolder = "test/modules";
3232
</script>
3333
```
3434

35-
Note that we chose to copy the minified core library, the recorder plugin and the modules folder to a folder named 'test'.
35+
Note that we chose to copy the minified core library (from 'dist'), the recorder plugin and the modules folder (from 'src') to a folder named 'test'.
3636
Now we can create our recorder:
3737
```javascript
3838
//catch some core events:
@@ -52,8 +52,8 @@ SepiaVoiceRecorder.onWaveEncoderAudioData = function(waveData){
5252

5353
//create the recorder:
5454
SepiaVoiceRecorder.create({
55-
targetSampleRate: 16000, //16kHz is actually the voice recorder default
56-
gain: 3.0, //we can pre-amplify the signal using the gain option
55+
targetSampleRate: 16000, //16kHz is actually the voice recorder default
56+
gain: 3.0, //we can amplify the signal using the gain option
5757
recordingLimitMs: 30000, //Total recording limit ms
5858
});
5959
```
@@ -92,7 +92,7 @@ Copy the audio modules you are planning to use, for part 1 of the tutorial we on
9292

9393
```html
9494
<script>
95-
SepiaFW.webAudio.defaultProcessorOptions.moduleFolder = "src/modules";
95+
SepiaFW.webAudio.defaultProcessorOptions.moduleFolder = "src/modules";
9696
</script>
9797
```
9898

@@ -159,7 +159,8 @@ If we don't want to restart later we can close the processor and clean up resour
159159
### Part 2: Resample input and record raw 16Bit PCM mono audio (WAV)
160160

161161
A very common use-case for this library is to resample microphone input and encode it as 16Bit PCM mono data (which is basically the default WAV file format).
162-
To make this happen we will replace the buffer module from earlier with a resampler and wave encoder module. If you haven't done already please copy 'speex-resample-switch.js', 'wave-encoder-worker.js' and 'shared/ring-buffer.min.js' to your modules folder.
162+
To make this happen we will replace the buffer module from earlier with a resampler and wave encoder module.
163+
If you haven't done already please copy `speex-resample-switch.js`, `wave-encoder-worker.js` and `shared/ring-buffer.min.js` to your modules folder.
163164

164165
NOTE: Some browsers are actually able to natively resampling for us ^^. The resampler module will simply skip transformation in this case but it might be preferable to prevent native resampling to retain full control over the quality and speed.
165166
`SepiaFW.webAudio.isNativeStreamResamplingSupported` will be 'true' when the lib is imported because we can't test for the feature but set to 'false' after the first failed attempt of native resampling!

0 commit comments

Comments
 (0)