-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Endpoint to transcribe videos #554
base: master
Are you sure you want to change the base?
Conversation
ekrojo77
commented
Dec 5, 2024
•
edited
Loading
edited
- Testing
- Endepunkt for å polle om filen er opprettet
- Bedre return fra GET
case Success(_) => Right(()) | ||
case Failure(ex) => returnLeftError(ex) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beholder disse i første omgang før vi vet hva som trengs av endepunkt. Men tror det rene transcribe-endepunktet er det som vil bli mest brukt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lisenspirk
audio-api/src/main/scala/no/ndla/audioapi/controller/TranscriptionController.scala
Show resolved
Hide resolved
audio-api/src/main/scala/no/ndla/audioapi/model/api/TranscriptionResultDTO.scala
Show resolved
Hide resolved
audio-api/src/main/scala/no/ndla/audioapi/service/TranscriptionService.scala
Show resolved
Hide resolved
audio-api/src/test/scala/no/ndla/audioapi/service/TranscriptionServiceTest.scala
Show resolved
Hide resolved
common/src/main/scala/no/ndla/common/brightcove/NdlaBrightcoveClient.scala
Show resolved
Hide resolved
audio-api/src/main/scala/no/ndla/audioapi/controller/TranscriptionController.scala
Outdated
Show resolved
Hide resolved
audio-api/src/main/scala/no/ndla/audioapi/controller/TranscriptionController.scala
Outdated
Show resolved
Hide resolved
audio-api/src/main/scala/no/ndla/audioapi/controller/TranscriptionController.scala
Show resolved
Hide resolved
audio-api/src/main/scala/no/ndla/audioapi/controller/TranscriptionController.scala
Outdated
Show resolved
Hide resolved
audio-api/src/main/scala/no/ndla/audioapi/controller/TranscriptionController.scala
Outdated
Show resolved
Hide resolved
val brightcoveClient: NdlaBrightcoveClient | ||
|
||
class NdlaBrightcoveClient { | ||
private val authUrl = "https://oauth.brightcove.com/v4/access_token" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Denne og videoSourceUrl endres nok ikkje, men kunne vore i AudioApiProperties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
La den i BaseProps i stedet, føltes litt stygt å trekke inn props fra audioApi til en common client
@@ -36,6 +37,13 @@ class AudioApiProperties extends BaseProps with DatabaseProps with StrictLogging | |||
val StorageName: String = propOrElse("AUDIO_FILE_S3_BUCKET", s"$Environment.audio.ndla") | |||
val StorageRegion: Option[String] = propOrNone("AUDIO_FILE_S3_BUCKET_REGION") | |||
|
|||
val TranscribeStorageName: String = propOrElse("TRANSCRIBE_FILE_S3_BUCKET_NAME", s"$Environment.transcribe.ndla") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kanskje bruke samme format som for filer.
val TranscribeStorageName: String = propOrElse("TRANSCRIBE_FILE_S3_BUCKET_NAME", s"$Environment.transcribe.ndla") | |
val TranscribeStorageName: String = propOrElse("TRANSCRIBE_FILE_S3_BUCKET", s"$Environment.transcribe.ndla") |
|
||
val BrightcoveClientId: String = prop("BRIGHTCOVE_API_CLIENT_ID") | ||
val BrightcoveClientSecret: String = prop("BRIGHTCOVE_API_CLIENT_SECRET") | ||
val BrightcoveAccountId: String = prop("NDLA_BRIGHTCOVE_ACCOUNT_ID") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Denne finnes allerede med dette navnet i secrets
val BrightcoveAccountId: String = prop("NDLA_BRIGHTCOVE_ACCOUNT_ID") | |
val BrightcoveAccountId: String = prop("BRIGHTCOVE_ACCOUNT_ID") |