The Android API for YouTube provides access to audio only streams, you can see this if you use yt-dlp with the -F option to list all the available formats for a video.
You and your API Clients must not, and must not encourage, enable, or require others to: ... separate, isolate, or modify the audio or video components of any YouTube audiovisual content made available as part of, or in connection with, YouTube API Services. For example, you must not apply alternate audio tracks to videos;
we are talking about files on a public webserver, it's absolutely fair game to download and modify/recombine the bit's in those files however i please.
API ... API ... API.
this is the way!