feat(api): use Tencent 16k_zh_large ASR and remove local Whisper
Standardize ASR on Tencent's dialect-capable engine across all environments, drop faster-whisper from dependencies and deployment images, and add an expo-sqlite iOS vendor sync plus pod install in prebuild to prevent native build failures after npm install. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
51
app-expo/scripts/ensure-expo-sqlite-ios.js
Normal file
51
app-expo/scripts/ensure-expo-sqlite-ios.js
Normal file
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* expo-sqlite copies vendor/sqlite3/*.c into ios/ during `pod install` (see ExpoSQLite.podspec).
|
||||
* After a fresh `npm install`, Xcode can fail with missing sqlite3.c until pods run.
|
||||
* This script mirrors that copy so native builds work without an extra manual step.
|
||||
*/
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const appRoot = path.join(__dirname, '..');
|
||||
const pkgRoot = path.join(appRoot, 'node_modules', 'expo-sqlite');
|
||||
|
||||
function readUseLibSQL() {
|
||||
const propsPath = path.join(appRoot, 'ios', 'Podfile.properties.json');
|
||||
if (!fs.existsSync(propsPath)) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
const props = JSON.parse(fs.readFileSync(propsPath, 'utf8'));
|
||||
return props['expo.sqlite.useLibSQL'] === 'true';
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function main() {
|
||||
if (!fs.existsSync(pkgRoot)) {
|
||||
return;
|
||||
}
|
||||
if (readUseLibSQL()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const vendorDir = path.join(pkgRoot, 'vendor', 'sqlite3');
|
||||
const iosDir = path.join(pkgRoot, 'ios');
|
||||
for (const file of ['sqlite3.c', 'sqlite3.h']) {
|
||||
const src = path.join(vendorDir, file);
|
||||
const dest = path.join(iosDir, file);
|
||||
if (!fs.existsSync(src)) {
|
||||
console.warn(`[ensure-expo-sqlite-ios] missing vendor file: ${src}`);
|
||||
continue;
|
||||
}
|
||||
if (fs.existsSync(dest)) {
|
||||
continue;
|
||||
}
|
||||
fs.mkdirSync(iosDir, { recursive: true });
|
||||
fs.copyFileSync(src, dest);
|
||||
console.log(`[ensure-expo-sqlite-ios] copied ${file} -> ios/`);
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
@@ -47,6 +47,10 @@ done
|
||||
echo "==> expo prebuild --platform ios --clean"
|
||||
npx expo prebuild --platform ios --clean
|
||||
|
||||
echo "==> ensure expo-sqlite native sources + pod install"
|
||||
node scripts/ensure-expo-sqlite-ios.js
|
||||
(cd ios && pod install)
|
||||
|
||||
shopt -s nullglob
|
||||
WORKSPACES=(ios/*.xcworkspace)
|
||||
shopt -u nullglob
|
||||
|
||||
Reference in New Issue
Block a user