https://github.com/dupuyjs/locutius
Client console tool to capture both microphone and speaker (loopback) on a Windows computer. Used to send the streams to Cognitive Speech Service.
https://github.com/dupuyjs/locutius
audio cognitive loopback
Last synced: 11 months ago
JSON representation
Client console tool to capture both microphone and speaker (loopback) on a Windows computer. Used to send the streams to Cognitive Speech Service.
- Host: GitHub
- URL: https://github.com/dupuyjs/locutius
- Owner: dupuyjs
- License: mit
- Created: 2020-06-03T18:27:32.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T10:36:57.000Z (over 3 years ago)
- Last Synced: 2025-04-12T23:29:04.073Z (about 1 year ago)
- Topics: audio, cognitive, loopback
- Language: C#
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Locutius.Capture
Client console tool to capture both microphone and speaker (loopback) on a local computer.
- Convert audio streams to PCM format, 16000 samples per second, 16 bits per sample, 1 channel (mono).
- Send streams via websockets to the targeted Uri (Piscato.Gateway).
## Build
``` cmd
dotnet build
```
This application targets .Net Core 3.1.
## Run
Just start Locutius.Capture.exe with at least --uri option:
``` cmd
-d, --debug Enable the debug mode (record audio files locally).
-u, --uri Required. Uri of the audio gateway.
--help Display this help screen.
--version Display version information.
```
For instance:
``` cmd
.\Locutius.Capture.exe --uri "ws://localhost:5000" --debug
```
The debug mode record audio file before and after the conversion.
- guid-loopback-`raw`.wav : raw is the audio file directly captured (Ieee).
- guid-loopback-`out`.wav : out is the audio file converted (PCM).
# Locutius.Gateway
## Build
For local development, add `appsettings.Development.json` file to Locutius.Gateway root with the following format.
``` json
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"Azure.Storage.Container.Audio": "audios",
"Azure.Storage.Container.Transcript": "transcripts",
"Azure.Cognitive.Speech.Key": "",
"Azure.Cognitive.Speech.Region": "westeurope",
"Azure.Cognitive.Speech.Language": "en-US",
"Azure.Cognitive.Speech.EndpointId": "",
"Azure.KeyVault.Name": "locutius-dev-keyvault",
}
```
Once deployed, the following environment variables MUST be provided:
- `Azure.Storage.Container.Audio`: Name of the Audio container,
- `Azure.Storage.Container.Transcript`: Name of the Transcript container,
- `Azure.Cognitive.Speech.Region`: Region of speech service (for instance 'westeurope').
- `Azure.Cognitive.Speech.Language`: Targeted language (for instance 'en-US').
- `Azure.Cognitive.Speech.EndpointId`: Endpoint ID of a customized speech model.
- `Azure.KeyVault.Name`: KeyVault name.
- `Azure.Cognitive.Speech.Key`: Key of speech service. ** Should be placed in KeyVault **