Audio problem: selecting PTB as preferred audio engine in v2023 1.2

If this template helps then use it. If not then just delete and start from scratch.

OS Win10
PsychoPy version 2023.1.2
Standard Standalone? (y/n) Y
What are you trying to achieve?:
I put together three experiments in PsychoPy about 2 years ago, and published them to Pavlovia. I am now trying to make some minor edits and publish to a new account / new license on Pavlovia.

The experiments use auditory stimuli.

I have installed the standalone version of PsychoPy 2023.1.2. The experiments were created using an older version, but I forget which.

The problems I am having are to do with the audio. I initially got some errors regarding the sampling rate. I up-sampled all of the audio to 48k sampling rate. However, I am now getting errors regarding the sound engine. I did a bit of reading around on here, and then used Tools - Plugins & Packages to install PTB. However, I still get the error below. I remember on previous versions of the PsychoPy you could select the preferred audio engine via File - Preferences, however this no longer appears to be an option.

When I run the experiment via the Psychopy Runner, the initial trial audio plays, but it crashes before the next trial loads.

Is this error telling me that PTB is still not selected as the preferred engine, and if so where do I find the option to do this?

Hello from the pygame community. https://www.pygame.org/contribute.html
2.6804     WARNING     We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use ['sounddevice', 'PTB', 'pyo', 'pygame'] (in that order).
7.8827     WARNING     User requested fullscreen with size [1024  768], but screen is actually [1920, 1080]. Using actual size
0.8880     WARNING     Monitor specification not found. Creating a temporary one...
  File "C:\Users\-----\------\Online Stroop\verbal_load_no_async\verbalLoad_230626_lastrun.py", line 994, in <module>
    PresentVerbalLoadAudio.setSound(condFilePath, secs=4.3, hamming=True)
  File "C:\Users\------\AppData\Roaming\psychopy3\packages\psychopy-sounddevice\psychopy_sounddevice\backend_sounddevice.py", line 392, in setSound
    raise err
  File "C:\Users\------\AppData\Roaming\psychopy3\packages\psychopy-sounddevice\psychopy_sounddevice\backend_sounddevice.py", line 382, in setSound
    label, s = streams.getStream(sampleRate=self.sampleRate,
  File "C:\Users\------\AppData\Roaming\psychopy3\packages\psychopy-sounddevice\psychopy_sounddevice\backend_sounddevice.py", line 97, in getStream
    return self._getStream(sampleRate,
  File "C:\Users\------\AppData\Roaming\psychopy3\packages\psychopy-sounddevice\psychopy_sounddevice\backend_sounddevice.py", line 135, in _getStream
    raise SoundFormatError(
psychopy.exceptions.SoundFormatError: Tried to create audio stream 48000_2_128 but 44100_2_128 already exists and win32 doesn't support multiple portaudio streams
################# Experiment ended with exit code 1 [pid:4260] #################

Ok so I’ve found where I select the PTB library under settings - audio. However, when I run the experiment now, it gets through one presentation in the first loop, and then crashes when it comes to the next presentation within that first loop, with this error:

70.2505     INFO     Loaded monitor calibration from ['2022_09_22 09:31']
70.4948     INFO     Investigating repo at C:\Users\___________\Research\Online Stroop\verbal_load_no_async
96.0607     INFO     Loaded monitor calibration from ['2022_09_22 09:31']
Generating PsychoPy script...

## Running: C:\Users\____________\Research\Online Stroop\verbal_load_no_async\verbalLoad_230626_lastrun.py ##
pygame 2.1.0 (SDL 2.0.16, Python 3.8.10)
Traceback (most recent call last):
  File "C:\Users\______\Research\Online Stroop\verbal_load_no_async\verbalLoad_230626_lastrun.py", line 1412, in <module>
    elif VerbalLoadMemoryTestAudio.isFinished:
AttributeError: 'SoundPTB' object has no attribute 'isFinished'
################ Experiment ended with exit code 1 [pid:24472] #################
129.3744     INFO     Loaded monitor calibration from ['2022_09_22 09:31']

I’m not sure what 'SoundPTB' object has no attribute 'isFinished' means?

Hello,

see here Referencing sound files - #13 by Ajna_Kertesz. Seems to be bug.

Best wishes Jens