gpt4 book ai didi

text-to-speech - 更新后某些用户的 iOS 13 文本转语音 (TTS - AVSpeechSynthesisVoice) 崩溃

转载 作者:行者123 更新时间:2023-12-02 04:22:56 25 4
gpt4 key购买 nike

我们看到一小部分用户在更新到 iOS 13 后出现与 TTS 问题相关的奇怪崩溃。有人知道为什么会发生这种情况吗?有人遇到过同样的崩溃吗?

let voices = AVSpeechSynthesisVoice.speechVoices()

for voice in voices {
if voice.name == storedName {
synthVoice = voice
break
}
}

...

let utterance = AVSpeechUtterance(string: text)
utterance.voice = self.synthVoice
self.synthesizer.speak(utterance)

崩溃日志:

Error: Fatal Exception: std::logic_error: Unable to find resource `lang'[kLanguage].

8 libc++abi.dylib 0x19c929304 std::__terminate(void (*)()) + 16
9 libc++abi.dylib 0x19c928c58 __cxa_get_exception_ptr + 30
10 libc++abi.dylib 0x19c928c18 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) + 122
11 SiriTTS 0x19f877894 VoiceConfig::report_error(unsigned int, VoiceConfig::IfMissing, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 960
12 SiriTTS 0x19f877d88 VoiceConfigImpl::get_json(unsigned int, VoiceConfig::IfMissing) const + 144
13 SiriTTS 0x19f8e1210 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > VoiceConfig::get_param<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(unsigned int, VoiceConfig::IfMissing) const + 36
14 SiriTTS 0x19f848490 NashvilleAdapterStream::NashvilleAdapterStream(nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&, std::__1::shared_ptr<SharedObjectPool>) + 308
15 SiriTTS 0x19f8c0158 std::__1::__compressed_pair_elem<NashvilleAdapterStream, 1, false>::__compressed_pair_elem<nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&, std::__1::shared_ptr<SharedObjectPool>&, 0ul, 1ul>(std::__1::piecewise_construct_t, std::__1::tuple<nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&, std::__1::shared_ptr<SharedObjectPool>&>, std::__1::__tuple_indices<0ul, 1ul>) + 72
16 SiriTTS 0x19f8c00d0 std::__1::__shared_ptr_emplace<NashvilleAdapterStream, std::__1::allocator<NashvilleAdapterStream> >::__shared_ptr_emplace<nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&, std::__1::shared_ptr<SharedObjectPool>&>(std::__1::allocator<NashvilleAdapterStream>, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&&&, std::__1::shared_ptr<SharedObjectPool>&&&) + 40
17 SiriTTS 0x19f8c0078 std::__1::shared_ptr<NashvilleAdapterStream> std::__1::shared_ptr<NashvilleAdapterStream>::make_shared<nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&, std::__1::shared_ptr<SharedObjectPool>&>(nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&&&, std::__1::shared_ptr<SharedObjectPool>&&&) + 52
18 SiriTTS 0x19f8bffd8 std::__1::shared_ptr<Module> std::__1::__invoke_void_return_wrapper<std::__1::shared_ptr<Module> >::__call<void ModuleFactory::ModuleFactoryImpl::register_module<NashvilleAdapterStream>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'(nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&, std::__1::shared_ptr<SharedObjectPool>)&, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&, std::__1::shared_ptr<SharedObjectPool> >(void ModuleFactory::ModuleFactoryImpl::register_module<NashvilleAdapterStream>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'(nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&, std::__1::shared_ptr<SharedObjectPool>)&&&, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&&&, std::__1::shared_ptr<SharedObjectPool>&&) + 48
19 SiriTTS 0x19f8bdeb4 ModuleFactory::ModuleFactoryImpl::create(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&, std::__1::shared_ptr<SharedObjectPool>) + 164
20 SiriTTS 0x19f8bdda4 ModuleFactory::create(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&, std::__1::shared_ptr<SharedObjectPool>) + 60
21 SiriTTS 0x19f8652e4 GryphonPipelineFactory::pipeline_from_config(std::__1::shared_ptr<SharedObjectPool>, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> const&) + 472
22 SiriTTS 0x19f866a84
GryphonPipelineFactory::nashvilleFE_backend_pipeline(std::__1::shared_ptr<SharedObjectPool>) + 1140 23 SiriTTS 0x19f85ffb0 FeatureExtractorTarget::init_with_object_pool(std::__1::shared_ptr, bool) + 924
24 SiriTTS 0x19f86027c
FeatureExtractorTarget::init_with_install_path(char const*) + 272
25 TTSSpeechBundle 0x110480b50 (Missing)
26 TTSSpeechBundle 0x1104919c4 (Missing)
27 TTSSpeechBundle 0x110491a6c (Missing)
28 TTSSpeechBundle 0x11048ef44 (Missing)
29 TTSSpeechBundle 0x110490514 (Missing)
30 TTSSpeechBundle 0x11048eefc (Missing)
31 libsystem_pthread.dylib 0x19c8781f0 _pthread_start + 124
32 libsystem_pthread.dylib 0x19c87baf0 thread_start + 8

最佳答案

更新:问题似乎已在 iOS 13.2 中修复!耶!

在某些运行 IOS 13 的设备上看起来像是一个错误(在我的例子中是 iPhone SE 上的 13.1.2),

AVSpeechSynthesisVoice.speechVoices()

返回零。

此外,仅供引用,使用 AVSpeechSynthesisVoice 初始化程序设置语音,例如

AVSpeechSynthesisVoice(language: "fr-FR")

导致语音被设置为零,英语被用作后备/默认。

我已经就这两个问题提交了反馈...并且之前 this one 在 13 beta 期间修复了,但现在我不太确定...因为这个新问题要么取代它,要么是不同部门的工程师在交叉目的上工作的结果。

关于text-to-speech - 更新后某些用户的 iOS 13 文本转语音 (TTS - AVSpeechSynthesisVoice) 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58111214/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com