forked from ggerganov/whisper.cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
examples : add "command" tool (ggerganov#171)
- Loading branch information
Showing
9 changed files
with
735 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ build-sanitize-thread/ | |
|
||
main | ||
stream | ||
command | ||
bench | ||
sync.sh | ||
compile_commands.json | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
if (WHISPER_SUPPORT_SDL2) | ||
# command | ||
set(TARGET command) | ||
add_executable(${TARGET} command.cpp) | ||
target_include_directories(${TARGET} PRIVATE ${SDL2_INCLUDE_DIRS}) | ||
target_link_libraries(${TARGET} PRIVATE whisper ${SDL2_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) | ||
endif () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# command | ||
|
||
This is a basic Voice Assistant example that accepts voice commands from the microphone. | ||
More info is available in [issue #171](https://github.com/ggerganov/whisper.cpp/issues/171). | ||
|
||
```java | ||
# Run with default arguments and small model | ||
./command -m ./models/ggml-small.en.bin -t 8 | ||
|
||
# On Raspberry Pi, use tiny or base models + "-ac 768" for better performance | ||
./bin/command -m ../models/ggml-tiny.en.bin -ac 768 | ||
``` | ||
|
||
## Building | ||
|
||
The `command` tool depends on SDL2 library to capture audio from the microphone. You can build it like this: | ||
|
||
```bash | ||
# Install SDL2 on Linux | ||
sudo apt-get install libsdl2-dev | ||
|
||
# Install SDL2 on Mac OS | ||
brew install sdl2 | ||
|
||
make command | ||
``` |
Oops, something went wrong.