package com.tsystems.flutter_vosk_wakeword

import org.json.JSONObject

object VoskRecognizer {
    fun parsePartialResult(json: String): String {
        return try {
            JSONObject(json).getString("partial")
        } catch (e: Exception) {
            ""
        }
    }

    fun parseFinalResult(json: String): String {
        return try {
            JSONObject(json).getString("text")
        } catch (e: Exception) {
            ""
        }
    }
}