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:
Mohamed Boudra
2025-10-22 14:38:46 +02:00
co-authored by Claude
parent c30ef34ef7
commit 32d4944c58
26 changed files with 3157 additions and 1344 deletions
@@ -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
+5 -2
View File
@@ -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(