fix the bug: miss import after install

pull/1087/head
huangyuxin 3 years ago
parent cea5ffe0e4
commit 9fe0beee54

@ -11,15 +11,3 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from paddlespeech.s2t.utils.log import Log
try:
from .ctcdecoder import swig_wrapper
except:
logger = Log(__name__).getlog()
try:
from paddlespeech.s2t.utils import dynamic_pip_install
package_name = 'paddlespeech_ctcdecoders'
dynamic_pip_install.install(package_name)
except Exception as e:
logger.info("paddlespeech_ctcdecoders not installed!")

@ -33,6 +33,9 @@ except:
from paddlespeech.s2t.utils import dynamic_pip_install
package_name = 'paddlespeech_ctcdecoders'
dynamic_pip_install.install(package_name)
from paddlespeech.s2t.decoders.ctcdecoder.swig_wrapper import ctc_beam_search_decoder_batch # noqa: F401
from paddlespeech.s2t.decoders.ctcdecoder.swig_wrapper import ctc_greedy_decoder # noqa: F401
from paddlespeech.s2t.decoders.ctcdecoder.swig_wrapper import Scorer # noqa: F401
except Exception as e:
logger.info("paddlespeech_ctcdecoders not installed!")

Loading…
Cancel
Save