From b7bb4a8d6cb22b705caeec152ad0a3b7204a972b Mon Sep 17 00:00:00 2001 From: "slavik.fursov" Date: Tue, 24 Sep 2024 05:52:43 -0700 Subject: [PATCH 1/5] Mac client example --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4455219..56b1051 100644 --- a/README.md +++ b/README.md @@ -198,7 +198,7 @@ online.init() # refresh if you're going to re-use the object for the next audio `whisper_online_server.py` has the same model options as `whisper_online.py`, plus `--host` and `--port` of the TCP connection and the `--warmup-file`. See the help message (`-h` option). -Client example: +#### Client example on the Linux system: ``` arecord -f S16_LE -c1 -r 16000 -t raw -D default | nc localhost 43001 @@ -208,6 +208,17 @@ arecord -f S16_LE -c1 -r 16000 -t raw -D default | nc localhost 43001 - nc is netcat with server's host and port +#### Client example on the Mac system: + +List microphones: +``` +ffmpeg -hide_banner -f avfoundation -list_devices true -i "" +``` + +Live stream raw audio: +``` +ffmpeg -hide_banner -f avfoundation -i ":0" -ac 1 -ar 48000 -acodec pcm_s16le -ar 16000 -f s16le -loglevel error - | nc localhost 50000 +``` ## Background From af51cbcfb87159700df84260b631c16f623177ba Mon Sep 17 00:00:00 2001 From: "slavik.fursov" Date: Wed, 25 Sep 2024 21:04:15 -0700 Subject: [PATCH 2/5] Mac client example; add details --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 56b1051..b3189ef 100644 --- a/README.md +++ b/README.md @@ -210,14 +210,15 @@ arecord -f S16_LE -c1 -r 16000 -t raw -D default | nc localhost 43001 #### Client example on the Mac system: -List microphones: +List of sounddevices: ``` ffmpeg -hide_banner -f avfoundation -list_devices true -i "" ``` +This command will produce a list of audio devices with their corresponding IDs. Use the ID in the next command with the -i option: Live stream raw audio: ``` -ffmpeg -hide_banner -f avfoundation -i ":0" -ac 1 -ar 48000 -acodec pcm_s16le -ar 16000 -f s16le -loglevel error - | nc localhost 50000 +ffmpeg -hide_banner -f avfoundation -i ":0" -ac 1 -ar 16000 -f s16le -loglevel error - | nc localhost 43001 ``` ## Background From 0c2409ba5cd41d25f4259d167b91728c8aa1edf3 Mon Sep 17 00:00:00 2001 From: Slavik Date: Sat, 2 Nov 2024 18:48:39 -0400 Subject: [PATCH 3/5] more details for Mac device Co-authored-by: jonigl --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b3189ef..07fc055 100644 --- a/README.md +++ b/README.md @@ -214,7 +214,17 @@ List of sounddevices: ``` ffmpeg -hide_banner -f avfoundation -list_devices true -i "" ``` -This command will produce a list of audio devices with their corresponding IDs. Use the ID in the next command with the -i option: +This command will produce a list of audio devices with their corresponding IDs. +The output would look something like this: +```bash +... +[AVFoundation indev @ 0x123e05b20] AVFoundation audio devices: +[AVFoundation indev @ 0x123e05b20] [0] MacBook Air Microphone +[AVFoundation indev @ 0x123e05b20] [1] Device 1 +[AVFoundation indev @ 0x123e05b20] [2] Device 2 +... +``` +Use the ID in the next command with the -i option. In this example I'm using a `MacBook Air` and the microphone is the device number `0`. Live stream raw audio: ``` From 53930d484ac40ebf618f3c0d5100b59e4dfef3d7 Mon Sep 17 00:00:00 2001 From: Slavik Date: Mon, 4 Nov 2024 09:27:18 -0500 Subject: [PATCH 4/5] add details of Mac client example Co-authored-by: jonigl --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 07fc055..4d7cd90 100644 --- a/README.md +++ b/README.md @@ -210,7 +210,7 @@ arecord -f S16_LE -c1 -r 16000 -t raw -D default | nc localhost 43001 #### Client example on the Mac system: -List of sounddevices: +List AVFoundation devices: ``` ffmpeg -hide_banner -f avfoundation -list_devices true -i "" ``` From 1c2402fde6a2d82574e0a725c8faa7b3e5b0193a Mon Sep 17 00:00:00 2001 From: Slavik Date: Mon, 4 Nov 2024 09:27:27 -0500 Subject: [PATCH 5/5] add details of Mac client example Co-authored-by: jonigl --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4d7cd90..a75d802 100644 --- a/README.md +++ b/README.md @@ -214,7 +214,7 @@ List AVFoundation devices: ``` ffmpeg -hide_banner -f avfoundation -list_devices true -i "" ``` -This command will produce a list of audio devices with their corresponding IDs. +This command will produce a list of video and audio devices with their corresponding IDs. The output would look something like this: ```bash ...