質問編集履歴
2
エラーの全文を記載しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,10 +10,146 @@
|
|
10
10
|
### 発生している問題・エラーメッセージ
|
11
11
|
|
12
12
|
```
|
13
|
+
Traceback (most recent call last)
|
14
|
+
<ipython-input-64-cad93362898e> in <module>
|
15
|
+
----> 1 model.transcribe("out_exe.mp3")
|
16
|
+
|
17
|
+
18 frames
|
18
|
+
/usr/local/lib/python3.7/dist-packages/whisper/transcribe.py in transcribe(model, audio, verbose, temperature, compression_ratio_threshold, logprob_threshold, no_speech_threshold, condition_on_previous_text, **decode_options)
|
19
|
+
88 print("Detecting language using up to the first 30 seconds. Use `--language` to specify the language")
|
20
|
+
89 segment = pad_or_trim(mel, N_FRAMES).to(model.device).to(dtype)
|
21
|
+
---> 90 _, probs = model.detect_language(segment)
|
22
|
+
91 decode_options["language"] = max(probs, key=probs.get)
|
23
|
+
92 if verbose is not None:
|
24
|
+
|
25
|
+
/usr/local/lib/python3.7/dist-packages/torch/autograd/grad_mode.py in decorate_context(*args, **kwargs)
|
26
|
+
25 def decorate_context(*args, **kwargs):
|
27
|
+
26 with self.clone():
|
28
|
+
---> 27 return func(*args, **kwargs)
|
29
|
+
28 return cast(F, decorate_context)
|
30
|
+
29
|
31
|
+
|
32
|
+
/usr/local/lib/python3.7/dist-packages/whisper/decoding.py in detect_language(model, mel, tokenizer)
|
33
|
+
59 for j, c in zip(tokenizer.all_language_tokens, tokenizer.all_language_codes)
|
34
|
+
60 }
|
35
|
+
---> 61 for i in range(n_audio)
|
36
|
+
62 ]
|
37
|
+
63
|
38
|
+
|
39
|
+
/usr/local/lib/python3.7/dist-packages/whisper/decoding.py in <listcomp>(.0)
|
40
|
+
59 for j, c in zip(tokenizer.all_language_tokens, tokenizer.all_language_codes)
|
41
|
+
60 }
|
42
|
+
---> 61 for i in range(n_audio)
|
43
|
+
62 ]
|
44
|
+
63
|
45
|
+
|
46
|
+
/usr/local/lib/python3.7/dist-packages/whisper/tokenizer.py in all_language_codes(self)
|
47
|
+
226 @lru_cache()
|
48
|
+
227 def all_language_codes(self) -> Tuple[str]:
|
49
|
+
--> 228 return tuple(self.decode([l]).strip("<|>") for l in self.all_language_tokens)
|
50
|
+
229
|
51
|
+
230 @property
|
52
|
+
|
53
|
+
/usr/local/lib/python3.7/dist-packages/whisper/tokenizer.py in <genexpr>(.0)
|
54
|
+
226 @lru_cache()
|
55
|
+
227 def all_language_codes(self) -> Tuple[str]:
|
56
|
+
--> 228 return tuple(self.decode([l]).strip("<|>") for l in self.all_language_tokens)
|
57
|
+
229
|
58
|
+
230 @property
|
59
|
+
|
60
|
+
/usr/local/lib/python3.7/dist-packages/whisper/tokenizer.py in decode(self, token_ids, **kwargs)
|
61
|
+
139
|
62
|
+
140 def decode(self, token_ids: Union[int, List[int], np.ndarray, torch.Tensor], **kwargs):
|
63
|
+
--> 141 return self.tokenizer.decode(token_ids, **kwargs)
|
64
|
+
142
|
65
|
+
143 def decode_with_timestamps(self, tokens) -> str:
|
66
|
+
|
67
|
+
/usr/local/lib/python3.7/dist-packages/transformers/tokenization_utils_base.py in decode(self, token_ids, skip_special_tokens, clean_up_tokenization_spaces, **kwargs)
|
68
|
+
3428 """
|
69
|
+
3429 # Convert inputs to python lists
|
70
|
+
-> 3430 token_ids = to_py_obj(token_ids)
|
71
|
+
3431
|
72
|
+
3432 return self._decode(
|
73
|
+
|
74
|
+
/usr/local/lib/python3.7/dist-packages/transformers/utils/generic.py in to_py_obj(obj)
|
75
|
+
115 return {k: to_py_obj(v) for k, v in obj.items()}
|
76
|
+
116 elif isinstance(obj, (list, tuple)):
|
77
|
+
--> 117 return [to_py_obj(o) for o in obj]
|
78
|
+
118 elif is_tf_available() and _is_tensorflow(obj):
|
79
|
+
119 return obj.numpy().tolist()
|
80
|
+
|
81
|
+
/usr/local/lib/python3.7/dist-packages/transformers/utils/generic.py in <listcomp>(.0)
|
82
|
+
115 return {k: to_py_obj(v) for k, v in obj.items()}
|
83
|
+
116 elif isinstance(obj, (list, tuple)):
|
84
|
+
--> 117 return [to_py_obj(o) for o in obj]
|
85
|
+
118 elif is_tf_available() and _is_tensorflow(obj):
|
86
|
+
119 return obj.numpy().tolist()
|
87
|
+
|
88
|
+
/usr/local/lib/python3.7/dist-packages/transformers/utils/generic.py in to_py_obj(obj)
|
89
|
+
116 elif isinstance(obj, (list, tuple)):
|
90
|
+
117 return [to_py_obj(o) for o in obj]
|
91
|
+
--> 118 elif is_tf_available() and _is_tensorflow(obj):
|
92
|
+
119 return obj.numpy().tolist()
|
93
|
+
120 elif is_torch_available() and _is_torch(obj):
|
94
|
+
|
95
|
+
/usr/local/lib/python3.7/dist-packages/transformers/utils/generic.py in _is_tensorflow(x)
|
96
|
+
97
|
97
|
+
98 def _is_tensorflow(x):
|
98
|
+
---> 99 import tensorflow as tf
|
99
|
+
100
|
100
|
+
101 return isinstance(x, tf.Tensor)
|
101
|
+
|
102
|
+
/usr/local/lib/python3.7/dist-packages/tensorflow/__init__.py in <module>
|
103
|
+
35 import typing as _typing
|
104
|
+
36
|
105
|
+
---> 37 from tensorflow.python.tools import module_util as _module_util
|
106
|
+
38 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader
|
107
|
+
39
|
108
|
+
|
109
|
+
/usr/local/lib/python3.7/dist-packages/tensorflow/python/__init__.py in <module>
|
110
|
+
35
|
111
|
+
36 from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow
|
112
|
+
---> 37 from tensorflow.python.eager import context
|
113
|
+
38
|
114
|
+
39 # pylint: enable=wildcard-import
|
115
|
+
|
116
|
+
/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/context.py in <module>
|
117
|
+
27 import six
|
118
|
+
28
|
119
|
+
---> 29 from tensorflow.core.framework import function_pb2
|
120
|
+
30 from tensorflow.core.protobuf import config_pb2
|
121
|
+
31 from tensorflow.core.protobuf import coordination_config_pb2
|
122
|
+
|
123
|
+
/usr/local/lib/python3.7/dist-packages/tensorflow/core/framework/function_pb2.py in <module>
|
124
|
+
14
|
125
|
+
15
|
126
|
+
---> 16 from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2
|
127
|
+
17 from tensorflow.core.framework import node_def_pb2 as tensorflow_dot_core_dot_framework_dot_node__def__pb2
|
128
|
+
18 from tensorflow.core.framework import op_def_pb2 as tensorflow_dot_core_dot_framework_dot_op__def__pb2
|
129
|
+
|
130
|
+
/usr/local/lib/python3.7/dist-packages/tensorflow/core/framework/attr_value_pb2.py in <module>
|
131
|
+
14
|
132
|
+
15
|
133
|
+
---> 16 from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2
|
134
|
+
17 from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2
|
135
|
+
18 from tensorflow.core.framework import types_pb2 as tensorflow_dot_core_dot_framework_dot_types__pb2
|
136
|
+
|
137
|
+
/usr/local/lib/python3.7/dist-packages/tensorflow/core/framework/tensor_pb2.py in <module>
|
138
|
+
14
|
139
|
+
15
|
140
|
+
---> 16 from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resource__handle__pb2
|
141
|
+
17 from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2
|
142
|
+
18 from tensorflow.core.framework import types_pb2 as tensorflow_dot_core_dot_framework_dot_types__pb2
|
143
|
+
|
144
|
+
/usr/local/lib/python3.7/dist-packages/tensorflow/core/framework/resource_handle_pb2.py in <module>
|
145
|
+
148 ,
|
146
|
+
149 'DESCRIPTOR' : _RESOURCEHANDLEPROTO,
|
147
|
+
--> 150 '__module__' : 'tensorflow.core.framework.resource_handle_pb2'
|
148
|
+
151 # @@protoc_insertion_point(class_scope:tensorflow.ResourceHandleProto)
|
149
|
+
152 })
|
150
|
+
|
13
151
|
SystemError:google/protobuf/pyext/descriptor.cc:358: bad argument to internal function
|
14
152
|
|
15
|
-
Traceback (most recent call last)
|
16
|
-
<ipython-input-64-cad93362898e> in <module>
|
17
153
|
```
|
18
154
|
|
19
155
|
### 該当のソースコード
|
1
Tracebackは上記のようになりました
test
CHANGED
File without changes
|
test
CHANGED
@@ -11,6 +11,9 @@
|
|
11
11
|
|
12
12
|
```
|
13
13
|
SystemError:google/protobuf/pyext/descriptor.cc:358: bad argument to internal function
|
14
|
+
|
15
|
+
Traceback (most recent call last)
|
16
|
+
<ipython-input-64-cad93362898e> in <module>
|
14
17
|
```
|
15
18
|
|
16
19
|
### 該当のソースコード
|