Prompt48 commited on
Commit
7565da9
·
verified ·
1 Parent(s): b5e959a

Upload edit\Qwen3-TTS-test\.venv\Lib\site-packages\librosa\_typing.py with huggingface_hub

Browse files
edit//Qwen3-TTS-test//.venv//Lib//site-packages//librosa//_typing.py ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ from typing import Callable, Generator, List, TypeVar, Union, Tuple, Any, Sequence
4
+ from typing_extensions import Literal, Never
5
+ import numpy as np
6
+ from numpy.typing import ArrayLike
7
+
8
+
9
+ _WindowSpec = Union[str, Tuple[Any, ...], float, Callable[[int], np.ndarray], ArrayLike]
10
+ _T = TypeVar("_T")
11
+ _IterableLike = Union[List[_T], Tuple[_T, ...], Generator[_T, None, None]]
12
+ _SequenceLike = Union[Sequence[_T], np.ndarray]
13
+ _ScalarOrSequence = Union[_T, _SequenceLike[_T]]
14
+
15
+ # The following definitions are copied from numpy/_typing/_scalars.py
16
+ # (We don't import them directly from numpy because they're an implementation detail.)
17
+ ###
18
+ ### START COPIED CODE
19
+ ###
20
+ _CharLike_co = Union[str, bytes]
21
+ # The 6 `<X>Like_co` type-aliases below represent all scalars that can be
22
+ # coerced into `<X>` (with the casting rule `same_kind`)
23
+ _BoolLike_co = Union[bool, np.bool_]
24
+ _UIntLike_co = Union[_BoolLike_co, "np.unsignedinteger[Any]"]
25
+ _IntLike_co = Union[_BoolLike_co, int, "np.integer[Any]"]
26
+ _FloatLike_co = Union[_IntLike_co, float, "np.floating[Any]"]
27
+ _ComplexLike_co = Union[_FloatLike_co, complex, "np.complexfloating[Any, Any]"]
28
+ _TD64Like_co = Union[_IntLike_co, np.timedelta64]
29
+
30
+ _NumberLike_co = Union[int, float, complex, "np.number[Any]", np.bool_]
31
+ _ScalarLike_co = Union[
32
+ int,
33
+ float,
34
+ complex,
35
+ str,
36
+ bytes,
37
+ np.generic,
38
+ ]
39
+ # `_VoidLike_co` is technically not a scalar, but it's close enough
40
+ _VoidLike_co = Union[Tuple[Any, ...], np.void]
41
+
42
+
43
+ # Padding modes in general
44
+ _ModeKind = Literal[
45
+ "constant",
46
+ "edge",
47
+ "linear_ramp",
48
+ "maximum",
49
+ "mean",
50
+ "median",
51
+ "minimum",
52
+ "reflect",
53
+ "symmetric",
54
+ "wrap",
55
+ "empty",
56
+ ]
57
+ ###
58
+ ### END COPIED CODE
59
+ ###
60
+
61
+ # Padding modes for head/tail padding
62
+ # These rule out padding modes that depend on the entire array
63
+ _STFTPad = Literal[
64
+ "constant",
65
+ "edge",
66
+ "linear_ramp",
67
+ "reflect",
68
+ "symmetric",
69
+ "empty",
70
+ ]
71
+
72
+ _PadMode = Union[_ModeKind, Callable[..., Any]]
73
+
74
+ _PadModeSTFT = Union[_STFTPad, Callable[..., Any]]
75
+
76
+
77
+ def _ensure_not_reachable(__arg: Never):
78
+ """
79
+ Ensure that a code path is not reachable, like typing_extension.assert_never.
80
+
81
+ This doesn't raise an exception so that we are forced to manually
82
+ raise a more user friendly exception afterwards.
83
+ """
84
+ ...