Skip to content

Commit a48f1f6

Browse files
committed
whisper : add more logging
1 parent bd72cd0 commit a48f1f6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/whisper.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5485,7 +5485,16 @@ int whisper_full_with_state(
54855485
struct whisper_full_params params,
54865486
const float * samples,
54875487
int n_samples) {
5488+
uint32_t endianness_test = 0x01020304;
5489+
uint8_t *test_bytes = (uint8_t *)&endianness_test;
5490+
WHISPER_LOG_ERROR("Endianness check: [%02x %02x %02x %02x]\n",
5491+
test_bytes[0], test_bytes[1], test_bytes[2], test_bytes[3]);
5492+
WHISPER_LOG_ERROR("%s: language pointer: %p, bytes: [%02x %02x %02x %02x]\n",
5493+
__func__, (void*)params.language,
5494+
(unsigned char)params.language[0], (unsigned char)params.language[1],
5495+
(unsigned char)params.language[2], (unsigned char)params.language[3]);
54885496
WHISPER_LOG_INFO("%s: [danbev] params.language: %s\n", __func__, params.language);
5497+
54895498
// clear old results
54905499
auto & result_all = state->result_all;
54915500

@@ -5631,6 +5640,10 @@ int whisper_full_with_state(
56315640

56325641
if (whisper_is_multilingual(ctx)) {
56335642
WHISPER_LOG_INFO("%s: [danbev] is multilingual params.language: %s\n", __func__, params.language);
5643+
WHISPER_LOG_ERROR("%s: language pointer: %p, bytes: [%02x %02x %02x %02x]\n",
5644+
__func__, (void*)params.language,
5645+
(unsigned char)params.language[0], (unsigned char)params.language[1],
5646+
(unsigned char)params.language[2], (unsigned char)params.language[3]);
56345647
const int lang_id = whisper_lang_id(params.language);
56355648
state->lang_id = lang_id;
56365649
prompt_init.push_back(whisper_token_lang(ctx, lang_id));

0 commit comments

Comments
 (0)