Using third-party sound libraries

Hi, I decided to experiment with the PYO sound library. However, I ran into an incomprehensible problem. I get the sound if I call directly pick_and_play (), but using Panda3d events, the PYO functions are simply ignored. For this reason, I cannot configure asynchronous module launch, as I need to use Task Manager.

#! /usr/bin/env python   
# -*- coding: utf_8 -*-   
from pyo import * 

from direct.directbase import DirectStart
from direct.task import Task

s = Server(sr=44100, buffersize=512).boot()

sf = SfPlayer(path=["1.wav"])

# play sound
def pick_and_play():
    print ("pick_and_play")


base.accept('1', pick_and_play)