Changeset 35509 for main/trunk


Ignore:
Timestamp:
2021-09-28T16:03:10+13:00 (3 years ago)
Author:
cstephen
Message:

Trigger an offline response with the filename "akl_mi_pk_0002_offline.wav" when in production mode.

Location:
main/trunk/model-interfaces-dev/atea/korero-maori-asr
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-interfaces-dev/atea/korero-maori-asr/README.md

    r35503 r35509  
    3939npm run lint
    4040```
     41### Notes
    4142
     43##### Secret File
     44
     45When in production mode, an audio file with the name `akl_mi_pk_0002_offline.wav` can be uploaded to force the interface to return the default offline response that is normally reserved for debugging. Useful for demonstration purposes on a live site when the Tuhituhi API is down.
  • main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/js/TranscribeModule.js

    r35495 r35509  
    123123     * Performs a query to transcribe the given audio files.
    124124     *
    125      * @param {FileList | File[]} files The files to upload.
     125     * @param {File[]} files The files to upload.
    126126     * @returns {Promise<TranscriptionModel[]>} The transcribed audio file.
    127127     * @throws {TranscriptionError} When the transcription request fails to complete.
    128128     */
    129129    async transcribeFiles(files) {
    130         if (process.env.NODE_ENV !== "production") {
     130        if (process.env.NODE_ENV !== "production" || files.some(file => file.name === "akl_mi_pk_0002_offline.wav")) {
    131131            return await this.transcribeFilesTest(files);
    132132        }
  • main/trunk/model-interfaces-dev/atea/korero-maori-asr/vue.config.js

    r35496 r35509  
    66module.exports = {
    77    // publicPath: "interfaces/atea/korero-maori-asr/dist",
    8     filenameHashing: false, // Allows us to easily setup direct links in our asr.xsl. You may want to change this for production in order to help with caching
     8    filenameHashing: false, // Allows us to easily setup direct links to the bundles in korero-maori-asr.xsl. You may want to change this for production in order to help with caching
    99
    1010    chainWebpack: config => {
Note: See TracChangeset for help on using the changeset viewer.