Skip to content

Commit

Permalink
Add test audio file
Browse files Browse the repository at this point in the history
  • Loading branch information
lincmba committed Jan 9, 2025
1 parent 89591e7 commit edad7a5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ class TextToForm(
var validResponse: QuestionnaireResponse? = null
var prompt = promptTemplate(transcript, questionnaire)

while (
retryCount < maxRetries && validResponse == null
) {

while (retryCount < maxRetries && validResponse == null) {
logger.info("Sending request to Gemini...")
val generatedText = generativeModel.generateContent(prompt).text

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class SpeechToTextTest {
}

private fun testTranscribeAudioToTextRealApi() {
val testFile = File("src/test/resources/sample_audio.wav")
val testFile = File("org/smartregister/fhircore/quest/resources/sample_conversation.mp3")
require(testFile.exists()) { "Test audio file not found at ${testFile.absolutePath}" }

val resultFile = speechToText.transcribeAudioToText(testFile)
Expand Down

0 comments on commit edad7a5

Please sign in to comment.