Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking β€œSign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tts #5459

Merged
merged 13 commits into from
Sep 18, 2024
Prev Previous commit
Next Next commit
fix: transcription headers
DDMeaqua committed Aug 28, 2024
commit 318e0989a2c28ae323d3f00d8256a7e48169e4a6
13 changes: 8 additions & 5 deletions app/client/api.ts
Original file line number Diff line number Diff line change
@@ -220,13 +220,16 @@ export function validString(x: string): boolean {
return x?.length > 0;
}

export function getHeaders() {
export function getHeaders(ignoreHeaders?: boolean) {
Dogtiti marked this conversation as resolved.
Show resolved Hide resolved
const accessStore = useAccessStore.getState();
const chatStore = useChatStore.getState();
const headers: Record<string, string> = {
"Content-Type": "application/json",
Accept: "application/json",
};
let headers: Record<string, string> = {};
if (!ignoreHeaders) {
headers = {
"Content-Type": "application/json",
Accept: "application/json",
};
}

const clientConfig = getClientConfig();

1 change: 0 additions & 1 deletion app/components/chat.tsx
Original file line number Diff line number Diff line change
@@ -1686,7 +1686,6 @@ function _Chat() {
? Locale.Chat.Actions.StopSpeech
: Locale.Chat.Actions.Speech
}
loding={speechLoading}
icon={
speechStatus ? (
<SpeakStopIcon />
3 changes: 2 additions & 1 deletion app/components/tts-config.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PluginConfig, TTSConfig, TTSConfigValidator } from "../store";
import { TTSConfig, TTSConfigValidator } from "../store";

import Locale from "../locales";
import { ListItem, Select } from "./ui-lib";
@@ -111,6 +111,7 @@ export function TTSConfigList(props: {
subTitle={Locale.Settings.TTS.Speed.SubTitle}
>
<InputRange
aria={Locale.Settings.TTS.Speed.Title}
value={props.ttsConfig.speed?.toFixed(1)}
min="0.3"
max="4.0"