savbell / whisper-writer

💬📝 A small dictation app using OpenAI's Whisper speech recognition model.
GNU General Public License v3.0
364 stars 55 forks source link

Please add support for local whisper api #32

Closed faspie closed 6 months ago

faspie commented 9 months ago

https://github.com/mudler/LocalAI

Support can simly be added by

import openai
openai.base_api = "http://someinternalhost.local/v1"

The URL should be configured by the config.json file

"api_options": { "model": "whisper-1", "language": null, "temperature": 0.0, "initial_prompt": null **"base_api": "http://someinternalhost.local/v1"** },

rkilchmn commented 7 months ago

you can also set the environment variable OPENAI_API_BASE: export OPENAI_API_BASE=http://someinternalhost.local/v1

savbell commented 6 months ago

Hi, thank you for the comments! I've added support for a custom API endpoint through an environment variable in my latest commit. Please let me know if you run into any issues!

Thanks, Sav