Skip to content

isSpeech always false #40

@dip-eegrab25

Description

@dip-eegrab25

var frameSize = 160
//
var i = 0
while (i + frameSize <= samples!!.size) {
val frame = samples.copyOfRange(i, i + frameSize)

            if (mWhisper!!.isSpeech(frame)) {
                Log.d(TAG, "Speech detected")
                // Convert to float array for Whisper
                val floatFrame = FloatArray(frame.size) { j -> frame[j] / 32768.0f }
                mWhisper!!.writeBuffer(floatFrame)
            } else {
                Log.d(TAG, "Silence skipped")
            }

            i += frameSize
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions