MCPcopy Create free account
hub / github.com/modelscope/FunASR / write

Method write

funasr/models/campplus/utils.py:613–625  ·  view source on GitHub ↗

Write data to a given ``filepath`` with 'wb' mode. Note: ``write`` will create a directory if the directory of ``filepath`` does not exist. Args: obj (bytes): Data to be written. filepath (str or Path): Path to write data.

(obj: bytes, uri: Union[str, Path])

Source from the content-addressed store, hash-verified

611
612 @staticmethod
613 def write(obj: bytes, uri: Union[str, Path]) -> None:
614 """Write data to a given ``filepath`` with 'wb' mode.
615
616 Note:
617 ``write`` will create a directory if the directory of ``filepath``
618 does not exist.
619
620 Args:
621 obj (bytes): Data to be written.
622 filepath (str or Path): Path to write data.
623 """
624 storage = File._get_storage(uri)
625 return storage.write(obj, uri)
626
627 @staticmethod
628 def write_text(obj: str, uri: str, encoding: str = "utf-8") -> None:

Callers 13

compute_werFunction · 0.45
GetArgsFunction · 0.45
mainFunction · 0.45
main_hydraFunction · 0.45
format5res.pyFile · 0.45
normalize_textFunction · 0.45
writeMethod · 0.45
write_textMethod · 0.45
as_local_pathMethod · 0.45
as_local_pathMethod · 0.45

Calls 1

_get_storageMethod · 0.45

Tested by

no test coverage detected