Skip to content

Commit a3cf4c0

Browse files
committed
cont [no ci]
1 parent d987ed0 commit a3cf4c0

File tree

8 files changed

+20
-20
lines changed

8 files changed

+20
-20
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ Some of the examples are even ported to run in the browser using WebAssembly. Ch
612612
| [whisper-stream](examples/stream) | [stream.wasm](examples/stream.wasm) | Real-time transcription of raw microphone capture |
613613
| [whisper-command](examples/command) | [command.wasm](examples/command.wasm) | Basic voice assistant example for receiving voice commands from the mic |
614614
| [whisper-server](examples/server) | | HTTP transcription server with OAI-like API |
615-
| [talk-llama](examples/talk-llama) | | Talk with a LLaMA bot |
615+
| [whisper-talk-llama](examples/talk-llama) | | Talk with a LLaMA bot |
616616
| [whisper.objc](examples/whisper.objc) | | iOS mobile application using whisper.cpp |
617617
| [whisper.swiftui](examples/whisper.swiftui) | | SwiftUI iOS / macOS application using whisper.cpp |
618618
| [whisper.android](examples/whisper.android) | | Android mobile application using whisper.cpp |

examples/generate-karaoke.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# Press Ctrl+C to stop recording
1212
#
1313

14-
executable="./main"
14+
executable="./build/bin/whisper-cli"
1515
model="base.en"
1616
model_path="models/ggml-$model.bin"
1717

@@ -46,7 +46,7 @@ ffmpeg -y -i ./rec.wav -ar 16000 -ac 1 -c:a pcm_s16le ./rec16.wav > /dev/null 2>
4646

4747
# run Whisper
4848
echo "Processing ..."
49-
./main -m models/ggml-base.en.bin rec16.wav -owts > /dev/null 2>&1
49+
${executable} -m models/ggml-base.en.bin rec16.wav -owts > /dev/null 2>&1
5050

5151
# generate Karaoke video
5252
echo "Generating video ..."

examples/livestream.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ model="base.en"
1414

1515
check_requirements()
1616
{
17-
if ! command -v ./main &>/dev/null; then
17+
if ! command -v ./build/bin/whisper-cli &>/dev/null; then
1818
echo "whisper.cpp main executable is required (make)"
1919
exit 1
2020
fi
@@ -100,7 +100,7 @@ while [ $running -eq 1 ]; do
100100
err=$(cat /tmp/whisper-live.err | wc -l)
101101
done
102102

103-
./main -t 8 -m ./models/ggml-${model}.bin -f /tmp/whisper-live.wav --no-timestamps -otxt 2> /tmp/whispererr | tail -n 1
103+
./build/bin/whisper-cli -t 8 -m ./models/ggml-${model}.bin -f /tmp/whisper-live.wav --no-timestamps -otxt 2> /tmp/whispererr | tail -n 1
104104

105105
while [ $SECONDS -lt $((($i+1)*$step_s)) ]; do
106106
sleep 1
@@ -109,4 +109,4 @@ while [ $running -eq 1 ]; do
109109
done
110110

111111
killall -v ffmpeg
112-
killall -v main
112+
killall -v whisper-cli

examples/talk-llama/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
if (WHISPER_SDL2)
2-
# talk-llama
3-
set(TARGET talk-llama)
2+
set(TARGET whisper-talk-llama)
43
add_executable(${TARGET} talk-llama.cpp
54
llama.cpp
65
llama-vocab.cpp

examples/talk-llama/README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# talk-llama
1+
# whisper.cpp/examples/talk-llama
22

33
Talk with an LLaMA AI in your terminal
44

@@ -12,7 +12,7 @@ https://github.com/ggerganov/whisper.cpp/assets/1991296/d97a3788-bf2a-4756-9a43-
1212

1313
## Building
1414

15-
The `talk-llama` tool depends on SDL2 library to capture audio from the microphone. You can build it like this:
15+
The `whisper-talk-llama` tool depends on SDL2 library to capture audio from the microphone. You can build it like this:
1616

1717
```bash
1818
# Install SDL2
@@ -25,28 +25,29 @@ sudo dnf install SDL2 SDL2-devel
2525
# Install SDL2 on Mac OS
2626
brew install sdl2
2727

28-
# Build the "talk-llama" executable
29-
make talk-llama
28+
# Build the "whisper-talk-llama" executable
29+
cmake -B build -S . -DWHISPER_SDL2=ON
30+
cmake --build build --config Release
3031

3132
# Run it
32-
./talk-llama -mw ./models/ggml-small.en.bin -ml ../llama.cpp/models/llama-13b/ggml-model-q4_0.gguf -p "Georgi" -t 8
33+
./build/bin/whisper-talk-llama -mw ./models/ggml-small.en.bin -ml ../llama.cpp/models/llama-13b/ggml-model-q4_0.gguf -p "Georgi" -t 8
3334
```
3435

3536
- The `-mw` argument specifies the Whisper model that you would like to use. Recommended `base` or `small` for real-time experience
3637
- The `-ml` argument specifies the LLaMA model that you would like to use. Read the instructions in https://github.com/ggerganov/llama.cpp for information about how to obtain a `ggml` compatible LLaMA model
3738

3839
## Session
3940

40-
The `talk-llama` tool supports session management to enable more coherent and continuous conversations. By maintaining context from previous interactions, it can better understand and respond to user requests in a more natural way.
41+
The `whisper-talk-llama` tool supports session management to enable more coherent and continuous conversations. By maintaining context from previous interactions, it can better understand and respond to user requests in a more natural way.
4142

42-
To enable session support, use the `--session FILE` command line option when running the program. The `talk-llama` model state will be saved to the specified file after each interaction. If the file does not exist, it will be created. If the file exists, the model state will be loaded from it, allowing you to resume a previous session.
43+
To enable session support, use the `--session FILE` command line option when running the program. The `whisper-talk-llama` model state will be saved to the specified file after each interaction. If the file does not exist, it will be created. If the file exists, the model state will be loaded from it, allowing you to resume a previous session.
4344

4445
This feature is especially helpful for maintaining context in long conversations or when interacting with the AI assistant across multiple sessions. It ensures that the assistant remembers the previous interactions and can provide more relevant and contextual responses.
4546

4647
Example usage:
4748

4849
```bash
49-
./talk-llama --session ./my-session-file -mw ./models/ggml-small.en.bin -ml ../llama.cpp/models/llama-13b/ggml-model-q4_0.gguf -p "Georgi" -t 8
50+
./build/bin/whisper-talk-llama --session ./my-session-file -mw ./models/ggml-small.en.bin -ml ../llama.cpp/models/llama-13b/ggml-model-q4_0.gguf -p "Georgi" -t 8
5051
```
5152

5253
## TTS

examples/twitch.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ help()
2929

3030
check_requirements()
3131
{
32-
if ! command -v ./main &>/dev/null; then
32+
if ! command -v ./build/bin/whisper-cli &>/dev/null; then
3333
echo "whisper.cpp main executable is required (make)"
3434
exit 1
3535
fi
@@ -100,7 +100,7 @@ do
100100
err=$(cat /tmp/whisper-live.err | wc -l)
101101
done
102102

103-
./main -t $threads -m ./models/ggml-$model.bin -f /tmp/whisper-live.wav --no-timestamps -otxt 2> /tmp/whispererr | tail -n 1
103+
./build/bin/whisper-cli -t $threads -m ./models/ggml-$model.bin -f /tmp/whisper-live.wav --no-timestamps -otxt 2> /tmp/whispererr | tail -n 1
104104

105105
while [ $SECONDS -lt $((($i+1)*$step)) ]; do
106106
sleep 1

examples/yt-wsp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ MODEL_PATH="${MODEL_PATH:-${SCRIPT_DIR}/../models/ggml-base.en.bin}"
5555
# Where to find the whisper.cpp executable. default to the examples directory
5656
# which holds this script in source control
5757
################################################################################
58-
WHISPER_EXECUTABLE="${WHISPER_EXECUTABLE:-${SCRIPT_DIR}/../main}";
58+
WHISPER_EXECUTABLE="${WHISPER_EXECUTABLE:-${SCRIPT_DIR}/../build/bin/whisper-cli}";
5959

6060
# Set to desired language to be translated into english
6161
WHISPER_LANG="${WHISPER_LANG:-en}";

tests/run-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if [ $# -eq 0 ]; then
3939
fi
4040

4141
model=$1
42-
main="../build/bin/main"
42+
main="../build/bin/whisper-cli"
4343

4444
threads=""
4545
if [ $# -eq 2 ]; then

0 commit comments

Comments
 (0)