Skip to content

Commit

Permalink
Chore: shell/bash/sh => console in README code blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
David Bartle committed Apr 22, 2021
1 parent 1703de3 commit 188021c
Show file tree
Hide file tree
Showing 17 changed files with 61 additions and 61 deletions.
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,27 +151,27 @@ models.

If using SSH, clone the repository with:

```bash
```console
git clone --recurse-submodules [email protected]:Picovoice/picovoice.git
```

If using HTTPS, clone the repository with:

```bash
```console
git clone --recurse-submodules https://github.com/Picovoice/picovoice.git
```

### Python Demos

Install [PyAudio](https://people.csail.mit.edu/hubert/pyaudio/) and then the demo package:

```bash
```console
sudo pip3 install picovoicedemo
```

From the root of the repository run the following in the terminal:

```bash
```console
picovoice_demo_mic \
--keyword_path resources/porcupine/resources/keyword_files/${PLATFORM}/porcupine_${PLATFORM}.ppn \
--context_path resources/rhino/resources/contexts/${PLATFORM}/smart_lighting_${PLATFORM}.rhn
Expand Down Expand Up @@ -206,13 +206,13 @@ Make sure there is a working microphone connected to your device. Refer to docum
[node-record-lpm16](https://www.npmjs.com/package/node-record-lpcm16) to set up your microphone for access from NodeJS.
Then install the demo package:

```bash
```console
npm install -g @picovoice/picovoice-node-demo
```

From the root of the repository run:

```bash
```console
pv-mic-demo \
-k resources/porcupine/resources/keyword_files/${PLATFORM}/porcupine_${PLATFORM}.ppn \
-c resources/rhino/resources/contexts/${PLATFORM}/smart_lighting_${PLATFORM}.rhn
Expand Down Expand Up @@ -244,7 +244,7 @@ Please see the [demo instructions](./demo/nodejs/README.md) for details.

Install [OpenAL](https://openal.org/). From the root of the repository run the following in the terminal:

```bash
```console
dotnet run -p demo/dotnet/PicovoiceDemo/PicovoiceDemo.csproj -c MicDemo.Release -- \
--keyword_path resources/porcupine/resources/keyword_files/${PLATFORM}/porcupine_${PLATFORM}.ppn \
--context_path resources/rhino/resources/contexts/${PLATFORM}/smart_lighting_${PLATFORM}.rhn
Expand Down Expand Up @@ -276,7 +276,7 @@ For more information about .NET demos go to [demo/dotnet](/demo/dotnet/README.md
Make sure there is a working microphone connected to your device. Then, from the root of the repository run the
following in a terminal:

```bash
```console
java -jar demo/java/bin/picovoice-mic-demo.jar \
-k resources/porcupine/resources/keyword_files/${PLATFORM}/porcupine_${PLATFORM}.ppn \
-c resources/rhino/resources/contexts/${PLATFORM}/smart_lighting_${PLATFORM}.rhn
Expand Down Expand Up @@ -316,7 +316,7 @@ To run the Picovoice demo on Android or iOS with Flutter, you must have the [Flu
Before launching the app, use the copy_assets.sh script to copy the Picovoice demo assets into the demo project. (**NOTE**: on Windows, Git Bash or another bash shell is required, or you will have to manually copy the context into the project.).

Run the following command from [demo/flutter](/demo/flutter/) to build and deploy the demo to your device:
```sh
```console
flutter run
```

Expand All @@ -330,15 +330,15 @@ For the full set of supported commands refer to [demo's readme](/demo/flutter/RE
To run the React Native Picovoice demo app you'll first need to install yarn and setup your React Native environment. For this, please refer to [React Native's documentation](https://reactnative.dev/docs/environment-setup). Once your environment has been set up, you can run the following commands:

#### Running On Android
```sh
```console
cd demo/react-native
yarn android-install # sets up environment
yarn android-run # builds and deploys to Android
```

#### Running On iOS

```sh
```console
cd demo/react-native
yarn ios-install # sets up environment
yarn ios-run # builds and deploys to iOS
Expand Down Expand Up @@ -456,7 +456,7 @@ There are several projects for various development boards inside the [mcu demo](

Install the package:

```bash
```console
pip3 install picovoice
```

Expand Down Expand Up @@ -510,13 +510,13 @@ When done, resources have to be released explicitly `handle.delete()`.

The Picovoice SDK for NodeJS is available from NPM:

```bash
```console
yarn add @picovoice/picovoice-node
```

(or)

```bash
```console
npm install @picovoice/picovoice-node
```

Expand Down Expand Up @@ -565,7 +565,7 @@ As the audio is processed through the Picovoice engines, the callbacks will fire
You can install the latest version of Picovoice by adding the latest
[Picovoice NuGet package](https://www.nuget.org/packages/Picovoice/) in Visual Studio or using the .NET CLI.

```bash
```console
dotnet add package Picovoice
```

Expand Down Expand Up @@ -875,7 +875,7 @@ _picovoice.delete();
### React Native

First add our React Native modules to your project via yarn or npm:
```sh
```console
yarn add @picovoice/react-native-voice-processor
yarn add @picovoice/porcupine-react-native
yarn add @picovoice/rhino-react-native
Expand Down
8 changes: 4 additions & 4 deletions demo/c/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
```bash
```console
gcc -std=c99 -O3 -o demo/c/picovoice_demo_mic \
-I sdk/c/include demo/c/picovoice_demo_mic.c -ldl -lasound
```

```bash
```console
./demo/c/picovoice_demo_mic \
${LIBRARY_PATH} \
resources/porcupine/lib/common/porcupine_params.pv \
Expand All @@ -15,12 +15,12 @@ resources/rhino/resources/contexts/${PLATFORM}/coffee_maker_${PLATFORM}.rhn \
${INPUT_AUDIO_DEVICE}
```

```bash
```console
gcc -std=c99 -O3 -o demo/c/picovoice_demo_file \
-I sdk/c/include demo/c/picovoice_demo_file.c -ldl
```

```bash
```console
./demo/c/picovoice_demo_file \
${LIBRARY_PATH} \
resources/porcupine/lib/common/porcupine_params.pv \
Expand Down
18 changes: 9 additions & 9 deletions demo/dotnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ On Windows, install using the [OpenAL Windows Installer](https://openal.org/down

On Linux use apt-get:

```bash
```console
sudo apt-get install libopenal-dev
```

On Mac use Brew:

```bash
```console
brew install openal-soft
```

Once .NET Core and OpenAL have been installed, you can build with the dotnet CLI:

```bash
```console
dotnet build -c MicDemo.Release
dotnet build -c FileDemo.Release
```
Expand All @@ -53,7 +53,7 @@ dotnet build -c FileDemo.Release

NOTE: the working directory for all dotnet commands is:

```bash
```console
picovoice/demo/dotnet/PicovoiceDemo
```

Expand All @@ -64,7 +64,7 @@ Picovoice processes a 16kHz, single-channel audio stream. If a stereo file is pr
The following processes a file looking for instances of the wake phrase defined in the file located at `${PATH_TO_PORCUPINE_KEYWORD_FILE}` and infers spoken commands
using the context defined by the file located at `${PATH_TO_RHINO_CONTEXT_FILE)}`:

```bash
```console
dotnet run -c FileDemo.Release -- \
--input_audio_path ${PATH_TO_INPUT_AUDIO_FILE} \
--keyword_path ${PATH_TO_PORCUPINE_KEYWORD_FILE} \
Expand All @@ -78,7 +78,7 @@ incoming audio from the microphone for instances of the wake phrase defined in t
`${PATH_TO_PORCUPINE_KEYWORD_FILE}` and then infers the follow-on spoken command using the context defined by the file
located at `${PATH_TO_RHINO_CONTEXT_FILE)}`:

```bash
```console
dotnet run -c MicDemo.Release -- \
--keyword_path ${PATH_TO_PORCUPINE_KEYWORD_FILE} \
--context_path ${PATH_TO_RHINO_CONTEXT_FILE)}
Expand All @@ -87,7 +87,7 @@ dotnet run -c MicDemo.Release -- \
It is possible that the default audio input device recognized by PyAudio is not the one being used. There are a couple
of debugging facilities baked into the demo application to solve this. First, type the following into the console:

```bash
```console
dotnet run -c MicDemo.Release -- --show_audio_devices
```

Expand All @@ -103,7 +103,7 @@ Available input devices:
You can use the device index to specify which microphone to use for the demo. For instance, if you want to use the Headset
microphone in the above example, you can invoke the demo application as below:

```bash
```console
dotnet run -c MicDemo.Release -- \
--keyword_path ${PATH_TO_PORCUPINE_KEYWORD_FILE} \
--context_path ${PATH_TO_RHINO_CONTEXT_FILE)} \
Expand All @@ -112,7 +112,7 @@ dotnet run -c MicDemo.Release -- \

If the problem persists we suggest storing the recorded audio into a file for inspection. This can be achieved with:

```bash
```console
dotnet run -c MicDemo.Release -- \
--keyword_path ${PATH_TO_PORCUPINE_KEYWORD_FILE} \
--context_path ${PATH_TO_RHINO_CONTEXT_FILE)} \
Expand Down
2 changes: 1 addition & 1 deletion demo/flutter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ To run the Picovoice demo on Android or iOS with Flutter, you must have the [Flu
Before launching the app, use the copy_assets.sh script to copy the Picovoice demo assets into the demo project. (**NOTE**: on Windows, Git Bash or another bash shell is required, or you will have to manually copy the context into the project.).

Run the following command from [demo/flutter](/demo/flutter/) to build and deploy the demo to your device:
```sh
```console
flutter run
```

Expand Down
12 changes: 6 additions & 6 deletions demo/java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Select "Build > Build Project" to build the two demo classes or "Build > Build A

NOTE: the working directory for all dotnet commands is:

```bash
```console
picovoice/demo/java/bin
```

Expand All @@ -44,7 +44,7 @@ Picovoice processes a 16kHz, single-channel audio stream. If a stereo file is pr
The following processes a file looking for instances of the wake phrase defined in the file located at `${PATH_TO_PORCUPINE_KEYWORD_FILE}`
and then infers the follow-on spoken command using the context defined by the file located at `${PATH_TO_RHINO_CONTEXT_FILE)}`:

```bash
```console
java -jar picovoice-file-demo.jar \
-i ${PATH_TO_INPUT_AUDIO_FILE} \
-k ${PATH_TO_PORCUPINE_KEYWORD_FILE} \
Expand All @@ -59,7 +59,7 @@ incoming audio from the microphone for instances of the wake phrase defined in t
located at `${PATH_TO_RHINO_CONTEXT_FILE)}`. Upon completion of the spoken command inference it resumes wake word
detection.

```bash
```console
java -jar picovoice-mic-demo.jar \
-k ${PATH_TO_PORCUPINE_KEYWORD_FILE} \
-c ${PATH_TO_RHINO_CONTEXT_FILE}
Expand All @@ -68,7 +68,7 @@ java -jar picovoice-mic-demo.jar \
It is possible that the default audio input device recognized by PyAudio is not the one being used. There are a couple
of debugging facilities baked into the demo application to solve this. First, type the following into the console:

```bash
```console
java -jar picovoice-mic-demo.jar -sd
```

Expand All @@ -84,7 +84,7 @@ Available input devices:
You can use the device index to specify which microphone to use for the demo. For instance, if you want to use the Headset
microphone in the above example, you can invoke the demo application as below:

```bash
```console
java -jar picovoice-mic-demo.jar \
-k ${PATH_TO_PORCUPINE_KEYWORD_FILE} \
-c ${PATH_TO_RHINO_CONTEXT_FILE}
Expand All @@ -93,7 +93,7 @@ java -jar picovoice-mic-demo.jar \

If the problem persists we suggest storing the recorded audio into a file for inspection. This can be achieved with:

```bash
```console
java -jar picovoice-mic-demo.jar \
-k ${PATH_TO_PORCUPINE_KEYWORD_FILE} \
-c ${PATH_TO_RHINO_CONTEXT_FILE)} \
Expand Down
2 changes: 1 addition & 1 deletion demo/nodejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pv-mic-demo \

The Rhino context source in YAML format will be output to show you the grammar and options that the context supports. First, the demo will listen for the wake word (Porcupine engine). Upon the wake word detection, the demo will switch to follow-on command inference (Rhino engine). The demo will listen for a phrase that the context understands, and upon reaching a conclusion (or timeout), it will output the results.

```bash
```console
Context info:
-------------
context:
Expand Down
12 changes: 6 additions & 6 deletions demo/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ similar to Alexa and Google. But it entirely runs 100% on-device. Picovoice is
Microphone demo uses [PyAudio](https://people.csail.mit.edu/hubert/pyaudio/) for recording input audio. Consult the
installation guide at [PyAudio](https://people.csail.mit.edu/hubert/pyaudio/).

```bash
```console
sudo pip3 install picovoicedemo
```

Expand All @@ -41,7 +41,7 @@ provided it only processes the first (left) channel. The following processes a f
phrase defined in the file located at `${PATH_TO_PORCUPINE_KEYWORD_FILE}` and then infers the follow-on spoken command
using the context defined by the file located at `${PATH_TO_RHINO_CONTEXT_FILE)}`:

```bash
```console
picovoice_demo_file \
--input_audio_path ${PATH_TO_INPUT_AUDIO_FILE} \
--keyword_path ${PATH_TO_PORCUPINE_KEYWORD_FILE} \
Expand All @@ -56,7 +56,7 @@ incoming audio from the microphone for instances of the wake phrase defined in t
located at `${PATH_TO_RHINO_CONTEXT_FILE)}`. Upon completion of the spoken command inference it resumes wake word
detection.

```bash
```console
picovoice_demo_mic \
--keyword_path ${PATH_TO_PORCUPINE_KEYWORD_FILE} \
--context_path ${PATH_TO_RHINO_CONTEXT_FILE)}
Expand All @@ -65,7 +65,7 @@ picovoice_demo_mic \
It is possible that the default audio input device recognized by PyAudio is not the one being used. There are a couple
of debugging facilities baked into the demo application to solve this. First, type the following into the console

```bash
```console
picovoice_demo_mic --show_audio_devices
```

Expand Down Expand Up @@ -99,7 +99,7 @@ It provides information about various audio input devices on the box. On a Linux
It can be seen that the last device (index 21) is considered default. But on this machine, a headset is being used as
the input device which has an index of 10. After finding the correct index the demo application can be invoked as below

```bash
```console
picovoice_demo_mic \
--keyword_path ${PATH_TO_PORCUPINE_KEYWORD_FILE} \
--context_path ${PATH_TO_RHINO_CONTEXT_FILE)} \
Expand All @@ -108,7 +108,7 @@ picovoice_demo_mic \

If the problem persists we suggest storing the recorded audio into a file for inspection. This can be achieved by

```bash
```console
picovoice_demo_mic \
--keyword_path ${PATH_TO_PORCUPINE_KEYWORD_FILE} \
--context_path ${PATH_TO_RHINO_CONTEXT_FILE)} \
Expand Down
4 changes: 2 additions & 2 deletions demo/react-native-clock/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ To run the PicoClock app you'll first need to install yarn and setup your React
## Usage

### Running On Android
```sh
```console
yarn android-install # sets up environment
yarn android-run # builds and deploys to Android
```

### Running On iOS

```sh
```console
yarn ios-install # sets up environment
yarn ios-run # builds and deploys to iOS
```
Expand Down
4 changes: 2 additions & 2 deletions demo/react-native/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ To run the React Native Picovoice demo app you'll first need to install yarn and
## Usage

### Running On Android
```sh
```console
yarn android-install # sets up environment
yarn android-run # builds and deploys to Android
```

### Running On iOS

```sh
```console
yarn ios-install # sets up environment
yarn ios-run # builds and deploys to iOS
```
Expand Down
Loading

0 comments on commit 188021c

Please sign in to comment.