]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
whisper : remove `speed_up` and `phase_vocoder*` functions (whisper/2198)
authorBorislav Stanimirov <redacted>
Fri, 31 May 2024 08:37:29 +0000 (11:37 +0300)
committerGeorgi Gerganov <redacted>
Sun, 16 Jun 2024 17:30:48 +0000 (20:30 +0300)
* whisper : fix cast warning

* whisper : remove phase_vocoder functions, ref #2195

* whisper : remove speed_up from whisper_full_params, closes #2195

examples/common.h

index 79b98309553fc88d0413497d6c54b44403d47601..89ab37457e2fe52017ff685a61014ca4cc458bc7 100644 (file)
@@ -185,7 +185,7 @@ private:
     // It is assumed that PCM data is normalized to a range from -1 to 1
     bool write_audio(const float * data, size_t length) {
         for (size_t i = 0; i < length; ++i) {
-            const int16_t intSample = data[i] * 32767;
+            const int16_t intSample = int16_t(data[i] * 32767);
             file.write(reinterpret_cast<const char *>(&intSample), sizeof(int16_t));
             dataSize += sizeof(int16_t);
         }