Maps C speech backend status codes to gRPC status codes for consistent error handling.
// Source: https://github.com/mudler/LocalAI | License: MIT | Copyright 2023-2025 Ettore Di Giacinto (mudler@localai.io) // Provided via justclaw.it.com; keep this notice with the code. package main import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) // The status values every C entry point in this backend returns. // // There is no single C enum to mirror. asr.h:43-49, tts.h:38-44 and nmt.h:40-45 // each declare their own, and diar.h has none of its own at all: it includes // asr.h and types every diarization function as nemo_speech_asr_status // (diar.h:18). The names the three surfaces share carry the same numbers: // // value asr.h tts.h nmt.h // 0 NEMO_SPEECH_ASR_OK NEMO_SPEECH_TT ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key