Local AI for OpenXTalk0.1.0native library
Runs language models and speech recognition on this computer, with llama.cpp and whisper.cpp: no service, no account, and nothing leaves the machine.
- Win 64
- macOS
- Linux 64
- Linux ARM
More about Local AI for OpenXTalk
A language model is a GGUF file (most models on Hugging Face have one: Llama, Qwen, Phi, Gemma, Mistral and many more). Load it with aiModelLoad. Then aiAnswer asks it one question and returns the answer, and aiChat starts writing an answer to a whole conversation as a job that a stack follows with aiJobTake while the words come, so the window stays alive. aiEmbed and aiSimilarity find text that means the same thing, for searching by meaning.
A speech model is a whisper.cpp file (ggml-base.en.bin and the like). Load it with aiSpeechLoad; aiTranscribe turns a WAV, MP3 or FLAC recording into text with the time of each part.
Models are large, so none ships with this library: point it at the file. Everything runs on the processor; a model of 1 to 4 billion parameters answers at reading speed on a recent computer.
No call here throws on a bad file or a bad argument. A refused call returns 0, false or empty, and aiLastError says why.
- Install first
- nothing
- Topics
- AI, Language models, Speech
- Author
- Seth Morrow Software
- Extension id
org.openxtalk.library.aixt- Source
aixt/src/aixt.lcb- Licences
- LICENSE
- SHA-256
d69769af7161e250f55f88a5564ff22abf28bcd43634e47a7a63d6b4025c67f3
All 28 handlers
aiFreeAll()handlerFrees every model, speech model and job.aiChatPrompt(<pModel>,<pMessages>,<pTemplate>)handlerReturns the prompt a chat model expects for a conversation.aiSpeechLoad(<pPath>,<pThreads>)handlerLoads a speech recognition model.aiModelLoad(<pPath>,<pContext>,<pThreads>)handlerLoads a language model from a GGUF file.aiJobCancel(<pJob>)handlerAsks a job to stop.aiJobFree(<pJob>)handlerFrees a job.aiTranscribeText(<pSpeech>,<pAudioPath>,<pOptions>)handlerTurns a recording into text and returns it.aiSpeechLanguages()handlerReturns the languages whisper.cpp can hear.aiJobInfo(<pJob>)handlerReturns the facts of a job.aiChatTemplates()handlerReturns the names of the chat templates llama.cpp knows.aiAnswer(<pModel>,<pQuestion>,<pOptions>)handlerAsks a chat model one question and returns its answer.aiLastError()handlerReturns why the last call was refused.aiModelInfo(<pModel>)handlerReturns what is known about a loaded model.aiJobState(<pJob>)handlerReturns whether a job is still running.aiGenerate(<pModel>,<pPrompt>,<pOptions>)handlerStarts a model writing text that follows a prompt.aiTranscribe(<pSpeech>,<pAudioPath>,<pOptions>)handlerStarts turning a recording into text.aiSimilarity(<pVectorA>,<pVectorB>)handlerReturns how alike in meaning two texts are, from their embeddings.aiJobTake(<pJob>)handlerReturns what a job has written since it was last asked.aiSpeechInfo(<pSpeech>)handlerReturns what is known about a loaded speech model.aiModelFree(<pModel>)handlerFrees a language model.aiJobText(<pJob>)handlerReturns everything a job has written.aiSpeechFree(<pSpeech>)handlerFrees a speech model.aiSystemInfo()handlerReturns what this computer's processor offers llama.cpp.aiLibraryVersion()handlerReturns the versions of aixt and of the llama.cpp and whisper.cpp it was built with.aiEmbed(<pModel>,<pText>)handlerReturns the meaning of a text as a list of numbers.aiTokenCount(<pModel>,<pText>)handlerReturns how many tokens a text is for a model.aiChat(<pModel>,<pMessages>,<pOptions>)handlerStarts a chat model writing its answer to a conversation.aiJobWait(<pJob>,<pMilliseconds>)handlerWaits for a job to end.