talk.wasm : update video link + some minor fixes

This commit is contained in:
Georgi Gerganov 2022-11-24 20:15:07 +02:00
parent 025ff465b6
commit ff36415a86
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735
3 changed files with 17 additions and 15 deletions

View File

@ -135,11 +135,9 @@ void talk_main(size_t index) {
talk_set_status("processing ...");
g_force_speak = false;
t_last = t_now;
{
if (!g_force_speak) {
const auto t_start = std::chrono::high_resolution_clock::now();
int ret = whisper_full(ctx, wparams, pcmf32.data(), pcmf32.size());
@ -156,6 +154,7 @@ void talk_main(size_t index) {
{
std::string text_heard;
if (!g_force_speak) {
const int n_segments = whisper_full_n_segments(ctx);
for (int i = n_segments - 1; i < n_segments; ++i) {
const char * text = whisper_full_get_segment_text(ctx, i);
@ -167,6 +166,9 @@ void talk_main(size_t index) {
text_heard += text;
}
}
g_force_speak = false;
// remove text between brackets using regex
{

View File

@ -812,9 +812,9 @@ I'm fine, thanks. How are you?
Thanks, I'm fine too. What are you doing?
I'm just sitting here.
It's a lovely day, isn't it?
Yes, it is.
Did you know that I'm a robot?
I wasn't aware of that.
Yes, it is. I love the weather this time of year.
I wish it would rain a little bit.
Me too.
)";
std::mt19937 rng;

View File

@ -143,7 +143,7 @@
<br><br>
Here is a short video of the demo in action: <a href="https://youtu.be/2om-7tFMaNs">https://youtu.be/2om-7tFMaNs</a>
Here is a short video of the demo in action: <a href="https://youtu.be/LeWKl8t1-Hc">https://youtu.be/LeWKl8t1-Hc</a>
<br><br>
@ -507,7 +507,7 @@
context = new AudioContext({
sampleRate: 16000,
channelCount: 1,
echoCancellation: true,
echoCancellation: false,
autoGainControl: true,
noiseSuppression: true,
});