DeepSpeech/util/benchmark.py
2018-11-26 02:09:03 +03:00

16 lines
284 B
Python

#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
def keep_only_digits(s):
r'''
local helper to just keep digits
'''
fs = ''
for c in s:
if c.isdigit():
fs += c
return int(fs)