Recording Audio

PennController for IBEX Forums Support Recording Audio

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #5145
    gemma7290
    Participant

    Hello,

    I am setting up an experiment to record audio. However when I run the experiment on test mode I get the error message. [7:13:24] Recorder not initiated. Make sure the sequence of items contains an InitiateRecorder PennController. (PennController: 6)

    However, I have included the Audio Initiation Comman before the stimuli. Do you know what I am missing?

    PennController.InitiateRecorder("https://XXXXXXXXXXXXXX/ibex.php");
    PennController.Template( "XXXXXXXXX.tsv",
        row => PennController( "choice1"
        ,
        newVoiceRecorder("recorder")
          .print()
        ,  
        newText("nameInput", row.Sentence )
          .settings.center()
          .print()
        ,  
        // Adding a validation button (feels wrong to end the trial when the slider gets released)
        newButton("validate", "Next")
         .settings.center()
         .print()
         .wait()
      )
    );

    Thanks!

    #5147
    Jeremy
    Keymaster

    Hello,

    Do you have a Sequence command anywhere in your script? If so, you need to be explicit about when you want the InitiateRecorder trial to run. So for example you could do this (I’m shortening the commands from your code, consistently with PennController 1.7):

    Sequence( "init" , randomize("choice1") )
    
    InitiateRecorder("https://XXXXXXXXXXXXXX/ibex.php")
      .label("init")
    
    Template( "XXXXXXXXX.tsv",
        row => newTrial( "choice1"
        ,
        newVoiceRecorder("recorder")
          .print()
        ,  
        newText("nameInput", row.Sentence )
          .center()
          .print()
        ,  
        // Adding a validation button (feels wrong to end the trial when the slider gets released)
        newButton("validate", "Next")
         .center()
         .print()
         .wait()
      )
    )

    Jeremy

    #5173
    gemma7290
    Participant

    Hello Jeremy,

    Thank you very much! It worked! Now, unfortunately the recordings are not saving in the server.
    I get an error file in the server.

    [28-Apr-2020 14:09:28 UTC] PHP Fatal error: ‘continue’ not in the ‘loop’ or ‘switch’ context in /XXXXX/public_html/experiments/ibex.php on line 35

    Do you know what it might refer to?

    Thank you so much for your help!

    Gemma

    #5175
    Jeremy
    Keymaster

    Hello Gemma,

    This is really weird, it’s an error that comes from an old version of the PHP script from this page, I remember fixing it (on August 15, 2019 according to the logs). Did you make sure your PHP script is up to date?

    Jeremy

    #5176
    gemma7290
    Participant

    Hello Jeremy,

    I updated the script and it works now. Thank you so much!

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.