You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am trying to read an audio from src/androidMain/res then make transcription. Here is my code:
suspend fun func() {
val myAudioPath = "test_audio.mp3".toPath()
val audioSource = FileSource(path = myAudioPath, fileSystem = FileSystem.RESOURCES)
val request = TranscriptionRequest(
audio = audioSource,
model = ModelId("whisper-1"),
)
val transcription = openAI.transcription(request)
println(transcription.text)
}
However, I was warned "Unresolved reference: RESOURCES" while I could build the program normally. When I began running the program, I received an error: "file not found: test_audio.mp3". Is there any wrong with my code ? How can I fix it?
Furthermore, when I call FileSource(name, source), I found out that ByteArray do not have a member function named asSource(), however, such function appeared here. Could you please tell me how can I use it?
The text was updated successfully, but these errors were encountered:
NovemberJay
changed the title
[Brief Issue Description] FileSystem.RESOURCES unresolved
FileSystem.RESOURCES unresolved
Jun 14, 2024
Hi, I am trying to read an audio from src/androidMain/res then make transcription. Here is my code:
However, I was warned "Unresolved reference: RESOURCES" while I could build the program normally. When I began running the program, I received an error: "file not found: test_audio.mp3". Is there any wrong with my code ? How can I fix it?
Furthermore, when I call FileSource(name, source), I found out that ByteArray do not have a member function named asSource(), however, such function appeared here. Could you please tell me how can I use it?
The text was updated successfully, but these errors were encountered: