fix: filename format bug

This commit is contained in:
Félix Voituret
2019-11-22 13:02:42 +01:00
parent c6bba68308
commit ced4028ce8
4 changed files with 4 additions and 43 deletions

View File

@@ -1,19 +0,0 @@
name: spleeter-cpu
channels:
- conda-forge
- anaconda
dependencies:
- python=3.7
- tensorflow=1.14.0
- ffmpeg
- pandas==0.25.1
- requests
- pip
- pip:
- museval==0.3.0
- musdb==0.3.1
- norbert==0.2.1
- spleeter
- ffmpeg-python

View File

@@ -1,20 +0,0 @@
name: spleeter-gpu
channels:
- conda-forge
- anaconda
dependencies:
- python=3.7
- tensorflow-gpu=1.14.0
- ffmpeg
- pandas==0.25.1
- requests
- pip
- pip:
- museval==0.3.0
- musdb==0.3.1
- norbert==0.2.1
- spleeter
- ffmpeg-python

View File

@@ -18,7 +18,7 @@ import json
from functools import partial
from multiprocessing import Pool
from pathlib import Path
from os.path import basename, join
from os.path import basename, join, splitext
from . import SpleeterError
from .audio.adapter import get_default_audio_adapter
@@ -121,7 +121,7 @@ class Separator(object):
duration=duration,
sample_rate=self._sample_rate)
sources = self.separate(waveform)
filename = basename(audio_descriptor)
filename = splitext(basename(audio_descriptor))
generated = []
for instrument, data in sources.items():
path = join(destination, filename_format.format(

View File

@@ -9,7 +9,7 @@ __license__ = 'MIT License'
import filecmp
from os.path import basename, exists, join
from os.path import splitext, exists, join
from tempfile import TemporaryDirectory
import pytest
@@ -19,7 +19,7 @@ from spleeter.audio.adapter import get_default_audio_adapter
from spleeter.separator import Separator
TEST_AUDIO_DESCRIPTOR = 'audio_example.mp3'
TEST_AUDIO_BASENAME = basename(TEST_AUDIO_DESCRIPTOR)
TEST_AUDIO_BASENAME = splitext(TEST_AUDIO_DESCRIPTOR)
TEST_CONFIGURATIONS = [
('spleeter:2stems', ('vocals', 'accompaniment')),
('spleeter:4stems', ('vocals', 'drums', 'bass', 'other')),