I have installed ffmpeg as a dependency in my conda env but still get this error.
class UserSearchView(APIView):
def get(self, request, link):
url = config('BASE_URL')
querystring = {"track_url": f'{link}'}
headers = {
"X-RapidAPI-Key": config('API_KEY'),
"X-RapidAPI-Host": config('API_HOST')
}
response = requests.request("GET", url, headers=headers, params=querystring)
data = response.json()
filename = '{}.mp3'.format(response.text.split('/')[-1])
song = AudioSegment.from_file(response.content, format='mp3')
slices = song[::10000]
slices.export(filename, format="mp3")
return JsonResponse(data)
Trying to download an audio mp3 which I get the url as a json response, and then slices and save the slices somewhere.
When I do conda list I do get the the ffmpeg as a dependency