class PlaybackService(Thread):
...
@staticmethod
def _resolve_sound_uri(uri: str):
""" helper to resolve sound files full path"""
if uri is None:
return None
if uri.startswith("snd/") or uri.startswith("snd\\"):
local_uri = os.path.join(os.path.dirname(__file__), "res", uri)
if os.path.isfile(local_uri):
return local_uri
audio_file = resolve_resource_file(uri)
if audio_file is None or not exists(audio_file):
raise FileNotFoundError(f"{audio_file} does not exist")
return audio_file
Need to support snd\\ as an option in the URI in order for the path to construct properly. Another option is to not doing a string construction at all and to instead use path objects.
ovos_audio.service
Need to support
snd\\
as an option in the URI in order for the path to construct properly. Another option is to not doing a string construction at all and to instead use path objects.More to come, possibly...