Translation Terrace
Translation Terrace is an Expo/React-Native application designed for a translation kiosk. It leverages an offline Whisper speech-to-text model and interfaces with a LibreTranslate server to provide seamless translation services.
Project Structure
translation-terraces/
├── expo-file-system/
│ └── next.js
├── @react-native-async-storage/
│ └── async-storage.ts
├── .ollama/
│ ├── ExampleComponent.tsx
│ └── ExampleTest.spec.tsx
├── package.json
├── README.md
└── ...
Technologies Used
- React-Native: Core framework for building the application.
- Whisper Speech-to-Text Model: Offline model for converting spoken language to text.
- LibreTranslate Server: Interface for translation services.
Installation Instructions
- Install Packages: Run
npm install
to install all necessary dependencies as listed inpackage.json
. - Prebuild Android: Since this project cannot be run using Expo Go, prebuild the Android app by running
npm run android
. - Run Unit Tests: Execute Jest unit tests with
npm run test
.
Usage Examples
Example 1: Initializing Whisper Model
import { initializeWhisper } from './path/to/whisper';
const initModel = async () => {
try {
await initializeWhisper();
console.log('Whisper model initialized successfully.');
} catch (error) {
console.error('Error initializing Whisper model:', error);
}
};
initModel();
Example 2: Translating Text
import { translateText } from './path/to/libreTranslate';
const translate = async () => {
try {
const translatedText = await translateText('Hello, world!', 'en', 'es');
console.log('Translated text:', translatedText);
} catch (error) {
console.error('Error translating text:', error);
}
};
translate();
Contributing Guidelines
- Create Feature Branch: Use the naming convention
<year>-<work week>_<username>_<feature_description>
for your feature branch. - Initiate Pull Request (PR): Open a PR and provide a detailed description of the changes made.
- Discuss Features: Suggest new features or improvements in GitTea issues.
License Information
This project is licensed under the MIT License. For more details, please refer to the LICENSE file.
Feel free to explore the codebase and contribute to Translation Terrace! If you have any questions or need further assistance, feel free to reach out.
Description
Languages
TypeScript
91.6%
Kotlin
4.9%
JavaScript
3.5%