[FEATURE] Added support for LocalAI Speech To Text configuration #2376
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cleaned up and documented some of the constants and their requirements in SpeechToText.jsx - That'd be a great area to refactor in the future. More than a few places relied on the provider's name to match the key.
I made this a little more explicit by consolidating the SpeechToTextType, but the various accessors probably should just be looking at the key or the name and not both.
STILL NEEDED:
I am confident nothing broke with the OpenAI nor AssemblyAI implementations, but I don't have credentials to test manually and I didn't see a testing framework in place to assert against.
SpeechToText.jsx
import localAISVG from '@/assets/images/robot.png'
This is a random picture that was in the
@/assets/images/
dir, change to a LocalAI imageThe SpeechToTextType is duplicated in both
ui/src/ui-component/extended/SpeechToText.jsx
and incomponents/src/speechToText.ts
-- not sure where this ought to live. I couldn't import from one to the other.LocalAISTT
defaults towhisper
if not provided - I assume this value comes from OpenAI's client.SUGGESTIONS/QUESTIONS:
whisper-1
(the default model in the AIO packages of LocalAI)Screenshots: