feat: migrate from NativeWind to react-native-unistyles and add Speechmatics audio
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -20,14 +20,14 @@ export function initializeTTS(ttsConfig: TTSConfig): void {
|
||||
config = {
|
||||
model: "tts-1",
|
||||
voice: "alloy",
|
||||
responseFormat: "mp3",
|
||||
responseFormat: "pcm",
|
||||
...ttsConfig,
|
||||
};
|
||||
openaiClient = new OpenAI({
|
||||
apiKey: ttsConfig.apiKey,
|
||||
});
|
||||
console.log(
|
||||
`✓ TTS (OpenAI) initialized with voice: ${config.voice}, model: ${config.model}`
|
||||
`✓ TTS (OpenAI) initialized with voice: ${config.voice}, model: ${config.model}, format: ${config.responseFormat}`
|
||||
);
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ export async function synthesizeSpeech(text: string): Promise<SpeechResult> {
|
||||
voice: config.voice!,
|
||||
input: text,
|
||||
// speed: 1.2,
|
||||
response_format: config.responseFormat as "mp3" | "opus" | "aac" | "flac",
|
||||
response_format: config.responseFormat as "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm",
|
||||
});
|
||||
|
||||
// Response is a stream, convert to buffer
|
||||
|
||||
@@ -13,7 +13,10 @@ import {
|
||||
function createServer() {
|
||||
const app = express();
|
||||
|
||||
// Basic authentication
|
||||
// Serve static files from public directory (no auth required for APK downloads)
|
||||
app.use("/public", express.static("public"));
|
||||
|
||||
// Basic authentication (skip for /public routes)
|
||||
app.use(
|
||||
basicAuth({
|
||||
users: { mo: "bo" },
|
||||
@@ -85,7 +88,7 @@ function main() {
|
||||
apiKey,
|
||||
voice: ttsVoice,
|
||||
model: ttsModel,
|
||||
responseFormat: "mp3",
|
||||
responseFormat: "pcm",
|
||||
});
|
||||
} else {
|
||||
console.warn(
|
||||
|
||||
Reference in New Issue
Block a user