MCPcopy
hub / github.com/modelscope/FunASR / read

Method read

funasr/download/file.py:341–351  ·  view source on GitHub ↗

Read data from a given ``filepath`` with 'rb' mode. Args: filepath (str or Path): Path to read data. Returns: bytes: Expected bytes object.

(uri: str)

Source from the content-addressed store, hash-verified

339
340 @staticmethod
341 def read(uri: str) -> bytes:
342 """Read data from a given ``filepath`` with 'rb' mode.
343
344 Args:
345 filepath (str or Path): Path to read data.
346
347 Returns:
348 bytes: Expected bytes object.
349 """
350 storage = File._get_storage(uri)
351 return storage.read(uri)
352
353 @staticmethod
354 def read_text(uri: Union[str, Path], encoding: str = "utf-8") -> str:

Callers 15

vad_segmentFunction · 0.45
setup.pyFile · 0.45
YeFunction · 0.45
JiFunction · 0.45
toFunction · 0.45
OoFunction · 0.45
UoFunction · 0.45
joFunction · 0.45
NoFunction · 0.45
qCFunction · 0.45
oFunction · 0.45
decoder.jsFile · 0.45

Calls 1

_get_storageMethod · 0.45

Tested by 7

load_audioFunction · 0.36
request_jsonFunction · 0.36
download_if_neededFunction · 0.36
transcribeFunction · 0.36
mainFunction · 0.36
mainFunction · 0.36
mainFunction · 0.36