This test app provides a simple UI to test the core functionality of the EkaScribe SDK with minimal configuration.
The test app includes:
- START RECORDING - Starts a new voice recording session
- PAUSE - Pauses the current recording
- RESUME - Resumes a paused recording
- STOP RECORDING - Stops recording and triggers transcription
The app uses minimal configuration:
- Mode: Consultation
- Language: English (India) -
en-IN - Model Type: Pro
- Output Format: Transcript only
- Patient Details: Test patient data
./gradlew installDebugThe TestActivity is set as the launcher activity. When you install and open the app, it will automatically launch the test screen.
On first launch, tap "START RECORDING" and grant the RECORD_AUDIO permission when prompted.
- Tap the START RECORDING button (green)
- Grant audio permission if prompted
- The status card will turn green and show "Recording"
- A session ID will be displayed
- Start speaking - the voice activity indicator will show real-time audio levels
- While recording, tap PAUSE (orange) to pause
- Tap RESUME (blue) to continue recording
- The voice activity monitoring continues even while paused
- Tap STOP RECORDING (red) when done
- The recording will be uploaded and processed
- Check logcat for processing updates
The app displays:
- Recording Status: Shows whether recording is active
- Session ID: Unique identifier for the current session
- Voice Activity: Real-time speech detection and amplitude
- "Speaking (amplitude)" when speech is detected
- "Silent (amplitude)" during silence
- Recorded Files: Number of audio segments recorded
All SDK events are logged with the following tags:
TestActivity- Main activity events and errorsMyLifecycleCallbacks- Session lifecycle events- Session started
- Session stopped
- Session paused
- Session resumed
- Errors
# View all test app logs
adb logcat -s TestActivity MyLifecycleCallbacks
# View SDK debug logs (if debugMode is enabled)
adb logcat | grep Voice2RxLocated in TestActivity.kt:
NetworkConfig(
tokenStorage = MyTokenStorage(),
appId = "scribe-android",
appVersionCode = 1,
appVersionName = "1.0.0",
apiCallTimeOutInSec = 30,
isDebugApp = true,
baseUrl = "https://api.eka.care/",
headers = mapOf()
)EkaScribeConfig(
clientId = "your-client-id",
networkConfig = networkConfig,
debugMode = true // Enable for detailed SDK logs
)Located in startRecording() method:
Voice2Rx.startVoice2Rx(
mode = Voice2RxType.CONSULTATION.value,
patientDetails = PatientDetails(
age = "30",
biologicalSex = "M",
name = "Test Patient",
patientId = "TEST-001",
visitId = "VISIT-001"
),
outputFormats = listOf(
Template(templateId = "transcript", templateName = "Transcript")
),
languages = listOf("en-IN"),
modelType = "pro",
onError = { /* error handling */ },
onStart = { /* success callback */ }
)Edit startRecording() in TestActivity.kt:
languages = listOf("hi"), // For Hindi
// or
languages = listOf("en-IN", "hi"), // For bilingual (max 2)outputFormats = listOf(
Template(templateId = "soap_note", templateName = "SOAP Note"),
Template(templateId = "transcript", templateName = "Transcript")
)
// Max 2 output formats allowedmodelType = "lite", // For faster processing
// or
modelType = "pro", // For higher accuracymode = Voice2RxType.DICTATION.value, // For dictation mode
// or
mode = Voice2RxType.CONSULTATION.value, // For consultation mode- Ensure RECORD_AUDIO permission is granted
- Go to App Settings > Permissions > Microphone and enable it
- Check logcat for error messages
- Verify network connectivity
- Ensure authentication token is valid
- Check microphone hardware
- Verify app has microphone access
- Test with louder speech
- Ensure
Voice2Rx.init()is called before using SDK functions - Check for initialization errors in logcat
- Launch app
- Grant microphone permission
- Tap START RECORDING
- Speak for 10-15 seconds
- Tap PAUSE (verify voice activity stops)
- Tap RESUME (verify voice activity resumes)
- Speak for another 10-15 seconds
- Tap STOP RECORDING
- Check logcat for upload/processing status
- Green status card when recording
- Real-time voice activity updates
- Toast messages for all button actions
- Session ID displayed after starting
- Lifecycle callbacks logged
app/src/main/java/com/eka/voice2rx/TestActivity.kt- Test UI implementationapp/src/main/AndroidManifest.xml- Activity declaration and permissions
After verifying basic functionality:
- Test with different languages
- Test with multiple output formats
- Test longer recording sessions
- Test network error scenarios
- Verify transcription results using
getSessionOutput()
For issues or questions about the SDK, refer to EKASCRIBE_SDK_DOCUMENTATION.md for complete API
reference.