202406期 AI模拟面试机器人实战练习(下) 测试TTS API #701
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: HswOAuth/llm_course#701
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
运行命令python ttsApiTest.py 出现下面错误:
(tts2) root@autodl-container-d679488a61-bd1911eb:~/autodl-tmp/interviewer# python ttsApiTest.py
The cache for model files in Transformers v4.22.0 has been updated. Migrating your old cache. This is a one-time only operation. You can interrupt this and resume the migration later on by calling
transformers.utils.move_cache()
.0it [00:00, ?it/s]
Traceback (most recent call last):
File "/root/miniconda3/envs/tts2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 409, in hf_raise_for_status
response.raise_for_status()
File "/root/miniconda3/envs/tts2/lib/python3.8/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://hf-mirror.com/mms-tts-eng/resolve/main/config.json
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/root/miniconda3/envs/tts2/lib/python3.8/site-packages/transformers/utils/hub.py", line 403, in cached_file
resolved_file = hf_hub_download(
File "/root/miniconda3/envs/tts2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/root/miniconda3/envs/tts2/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 961, in hf_hub_download
return _hf_hub_download_to_cache_dir(
File "/root/miniconda3/envs/tts2/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 1068, in _hf_hub_download_to_cache_dir
_raise_on_head_call_error(head_call_error, force_download, local_files_only)
File "/root/miniconda3/envs/tts2/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 1596, in _raise_on_head_call_error
raise head_call_error
File "/root/miniconda3/envs/tts2/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 1484, in _get_metadata_or_catch_error
metadata = get_hf_file_metadata(
File "/root/miniconda3/envs/tts2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/root/miniconda3/envs/tts2/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 1401, in get_hf_file_metadata
r = _request_wrapper(
File "/root/miniconda3/envs/tts2/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 285, in _request_wrapper
response = _request_wrapper(
File "/root/miniconda3/envs/tts2/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 309, in _request_wrapper
hf_raise_for_status(response)
File "/root/miniconda3/envs/tts2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 459, in hf_raise_for_status
raise _format(RepositoryNotFoundError, message, response) from e
huggingface_hub.errors.RepositoryNotFoundError: 401 Client Error. (Request ID: Root=1-68023ec6-4225bd294e479d8d45cdc286;049299b4-f208-4c3f-bdc8-7a246170e966)
Repository Not Found for url: https://hf-mirror.com/mms-tts-eng/resolve/main/config.json.
Please make sure you specified the correct
repo_id
andrepo_type
.If you are trying to access a private or gated repo, make sure you are authenticated. For more details, see https://huggingface.co/docs/huggingface_hub/authentication
Invalid username or password.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "ttsApiTest.py", line 10, in
model = VitsModel.from_pretrained("mms-tts-eng")
File "/root/miniconda3/envs/tts2/lib/python3.8/site-packages/transformers/modeling_utils.py", line 3506, in from_pretrained
resolved_config_file = cached_file(
File "/root/miniconda3/envs/tts2/lib/python3.8/site-packages/transformers/utils/hub.py", line 426, in cached_file
raise EnvironmentError(
OSError: mms-tts-eng is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'
If this is a private repository, make sure to pass a token having permission to this repo either by logging in with
huggingface-cli login
or by passingtoken=<your_token>
(tts2) root@autodl-container-d679488a61-bd1911eb:~/autodl-tmp/interviewer#
需要下载模型,然后指定模型路径为本地下载路径