Skip to content

Commit

Permalink
🔧 docs: fix website
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Nov 16, 2023
1 parent 42027c0 commit e4b5d5c
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 84 deletions.
29 changes: 0 additions & 29 deletions api/open-stt.ts

This file was deleted.

22 changes: 0 additions & 22 deletions api/openai-tts.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/react/_util/api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
export const MICROSOFT_SPEECH_API_URL = '/api/microsoft-speech';
export const EDGE_SPEECH_API_URL = '/api/edge-speech';
export const OPENAI_TTS_API_URL = '/api/openai-tts';
export const OPENAI_STT_API_URL = '/api/openai-stt';
5 changes: 2 additions & 3 deletions src/react/useOpenaiSTT/demos/OpenaiSTTWithPSR.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Button, Input } from 'antd';
import { Mic, StopCircle } from 'lucide-react';
import { Flexbox } from 'react-layout-kit';

import { OPENAI_STT_API_URL } from '../../_util/api';
import { OPENAI_BASE_URL } from '@/core/const/api';

export default () => {
const store = useCreateStore();
Expand All @@ -16,9 +16,8 @@ export default () => {
},
proxy: {
label: 'OPENAI_PROXY_URL',
value: '',
value: OPENAI_BASE_URL,
},
url: OPENAI_STT_API_URL,
},
{ store },
);
Expand Down
5 changes: 2 additions & 3 deletions src/react/useOpenaiSTT/demos/OpenaiSTTWithSR.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Button, Input } from 'antd';
import { Mic, StopCircle } from 'lucide-react';
import { Flexbox } from 'react-layout-kit';

import { OPENAI_STT_API_URL } from '../../_util/api';
import { OPENAI_BASE_URL } from '@/core/const/api';

export default () => {
const store = useCreateStore();
Expand All @@ -16,9 +16,8 @@ export default () => {
},
proxy: {
label: 'OPENAI_PROXY_URL',
value: '',
value: OPENAI_BASE_URL,
},
url: OPENAI_STT_API_URL,
},
{ store },
);
Expand Down
6 changes: 3 additions & 3 deletions src/react/useOpenaiSTT/demos/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Button, Input } from 'antd';
import { Mic, StopCircle } from 'lucide-react';
import { Flexbox } from 'react-layout-kit';

import { OPENAI_STT_API_URL } from '../../_util/api';
import { OPENAI_BASE_URL } from '@/core/const/api';

export default () => {
const store = useCreateStore();
Expand All @@ -16,16 +16,16 @@ export default () => {
},
proxy: {
label: 'OPENAI_PROXY_URL',
value: '',
value: OPENAI_BASE_URL,
},
url: OPENAI_STT_API_URL,
},
{ store },
);

const { text, start, stop, isLoading, isRecording, url, formattedTime } = useOpenaiSTTWithRecord({
api,
});

return (
<StoryBook levaStore={store}>
<Flexbox gap={8}>
Expand Down
4 changes: 2 additions & 2 deletions src/react/useOpenaiTTS/demos/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Button, Input } from 'antd';
import { Volume2 } from 'lucide-react';
import { Flexbox } from 'react-layout-kit';

import { OPENAI_TTS_API_URL } from '../../_util/api';
import { OPENAI_BASE_URL } from '@/core/const/api';

const defaultText = '这是一段使用 OpenAI Speech to Text 的语音演示';

Expand All @@ -20,7 +20,7 @@ export default () => {
},
proxy: {
label: 'OPENAI_PROXY_URL',
value: OPENAI_TTS_API_URL,
value: OPENAI_BASE_URL,
},
},
{ store },
Expand Down
16 changes: 0 additions & 16 deletions tsconfig.entry.json

This file was deleted.

6 changes: 2 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
"downlevelIteration": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"lib": ["dom", "ES2015", "dom.iterable", "esnext"],
"lib": ["dom", "dom.iterable", "esnext"],
"resolveJsonModule": true,
"moduleResolution": "node",
"skipLibCheck": true,
"strict": true,
"paths": {
Expand All @@ -17,6 +16,5 @@
"@lobehub/tts/react": ["./src/react"]
}
},
"exclude": ["react.d.ts", "server.d.ts"],
"include": ["src", "docs", "lib", ".dumirc.ts", "api", "**/*.ts", "**/*.d.ts", "**/*.tsx"]
"include": ["src", "docs", ".dumirc.ts", "api", "**/*.ts", "**/*.d.ts", "**/*.tsx"]
}

0 comments on commit e4b5d5c

Please sign in to comment.