├── .github
├── ISSUE_TEMPLATE
│ └── translations.md
└── workflows
│ ├── build_documentation.yml
│ ├── build_pr_documentation.yml
│ ├── quality.yml
│ └── upload_pr_documentation.yml
├── .gitignore
├── LICENSE
├── Makefile
├── README.md
├── assets
└── img
│ ├── cnn-feature-encoder.png
│ ├── speecht5.png
│ ├── speecht5_decoding.png
│ ├── transformers_blocks.png
│ ├── wav2vec2-ctc.png
│ ├── wav2vec2-input.png
│ └── whisper-input.png
├── chapters
├── bn
│ ├── _toctree.yml
│ ├── chapter0
│ │ ├── community.mdx
│ │ ├── get_ready.mdx
│ │ └── introduction.mdx
│ ├── chapter1
│ │ ├── audio_data.mdx
│ │ ├── introduction.mdx
│ │ ├── load_and_explore.mdx
│ │ ├── preprocessing.mdx
│ │ ├── quiz.mdx
│ │ ├── streaming.mdx
│ │ └── supplemental_reading.mdx
│ ├── chapter2
│ │ ├── asr_pipeline.mdx
│ │ ├── audio_classification_pipeline.mdx
│ │ ├── hands_on.mdx
│ │ └── introduction.mdx
│ └── events
│ │ └── introduction.mdx
├── en
│ ├── _toctree.yml
│ ├── chapter0
│ │ ├── community.mdx
│ │ ├── get_ready.mdx
│ │ └── introduction.mdx
│ ├── chapter1
│ │ ├── audio_data.mdx
│ │ ├── introduction.mdx
│ │ ├── load_and_explore.mdx
│ │ ├── preprocessing.mdx
│ │ ├── quiz.mdx
│ │ ├── streaming.mdx
│ │ └── supplemental_reading.mdx
│ ├── chapter2
│ │ ├── asr_pipeline.mdx
│ │ ├── audio_classification_pipeline.mdx
│ │ ├── hands_on.mdx
│ │ ├── introduction.mdx
│ │ └── tts_pipeline.mdx
│ ├── chapter3
│ │ ├── classification.mdx
│ │ ├── ctc.mdx
│ │ ├── introduction.mdx
│ │ ├── quiz.mdx
│ │ ├── seq2seq.mdx
│ │ └── supplemental_reading.mdx
│ ├── chapter4
│ │ ├── classification_models.mdx
│ │ ├── demo.mdx
│ │ ├── fine-tuning.mdx
│ │ ├── hands_on.mdx
│ │ └── introduction.mdx
│ ├── chapter5
│ │ ├── asr_models.mdx
│ │ ├── choosing_dataset.mdx
│ │ ├── demo.mdx
│ │ ├── evaluation.mdx
│ │ ├── fine-tuning.mdx
│ │ ├── hands_on.mdx
│ │ ├── introduction.mdx
│ │ └── supplemental_reading.mdx
│ ├── chapter6
│ │ ├── evaluation.mdx
│ │ ├── fine-tuning.mdx
│ │ ├── hands_on.mdx
│ │ ├── introduction.mdx
│ │ ├── pre-trained_models.mdx
│ │ ├── supplemental_reading.mdx
│ │ └── tts_datasets.mdx
│ ├── chapter7
│ │ ├── hands_on.mdx
│ │ ├── introduction.mdx
│ │ ├── speech-to-speech.mdx
│ │ ├── supplemental_reading.mdx
│ │ ├── transcribe-meeting.mdx
│ │ └── voice-assistant.mdx
│ ├── chapter8
│ │ ├── certification.mdx
│ │ └── introduction.mdx
│ └── events
│ │ └── introduction.mdx
├── es
│ ├── _toctree.yml
│ ├── chapter0
│ │ ├── community.mdx
│ │ ├── get_ready.mdx
│ │ └── introduction.mdx
│ ├── chapter1
│ │ ├── audio_data.mdx
│ │ ├── introduction.mdx
│ │ ├── load_and_explore.mdx
│ │ ├── preprocessing.mdx
│ │ ├── quiz.mdx
│ │ ├── streaming.mdx
│ │ └── supplemental_reading.mdx
│ └── chapter2
│ │ ├── asr_pipeline.mdx
│ │ ├── audio_classification_pipeline.mdx
│ │ ├── hands_on.mdx
│ │ └── introduction.mdx
├── fr
│ ├── _toctree.yml
│ ├── chapter0
│ │ ├── community.mdx
│ │ ├── get_ready.mdx
│ │ └── introduction.mdx
│ ├── chapter1
│ │ ├── audio_data.mdx
│ │ ├── introduction.mdx
│ │ ├── load_and_explore.mdx
│ │ ├── preprocessing.mdx
│ │ ├── quiz.mdx
│ │ ├── streaming.mdx
│ │ └── supplemental_reading.mdx
│ ├── chapter2
│ │ ├── asr_pipeline.mdx
│ │ ├── audio_classification_pipeline.mdx
│ │ ├── hands_on.mdx
│ │ └── introduction.mdx
│ ├── chapter3
│ │ ├── classification.mdx
│ │ ├── ctc.mdx
│ │ ├── introduction.mdx
│ │ ├── seq2seq.mdx
│ │ └── supplemental_reading.mdx
│ ├── chapter4
│ │ ├── classification_models.mdx
│ │ ├── demo.mdx
│ │ ├── fine-tuning.mdx
│ │ ├── hands_on.mdx
│ │ └── introduction.mdx
│ ├── chapter5
│ │ ├── asr_models.mdx
│ │ ├── choosing_dataset.mdx
│ │ ├── demo.mdx
│ │ ├── evaluation.mdx
│ │ ├── fine-tuning.mdx
│ │ ├── hands_on.mdx
│ │ ├── introduction.mdx
│ │ └── supplemental_reading.mdx
│ ├── chapter6
│ │ ├── evaluation.mdx
│ │ ├── fine-tuning.mdx
│ │ ├── hands_on.mdx
│ │ ├── introduction.mdx
│ │ ├── pre-trained_models.mdx
│ │ ├── supplemental_reading.mdx
│ │ └── tts_datasets.mdx
│ ├── chapter7
│ │ ├── hands-on.mdx
│ │ ├── introduction.mdx
│ │ ├── speech-to-speech.mdx
│ │ ├── supplemental_reading.mdx
│ │ ├── transcribe-meeting.mdx
│ │ └── voice-assistant.mdx
│ └── events
│ │ └── introduction.mdx
├── ko
│ ├── _toctree.yml
│ ├── chapter0
│ │ ├── community.mdx
│ │ ├── get_ready.mdx
│ │ └── introduction.mdx
│ ├── chapter1
│ │ ├── audio_data.mdx
│ │ ├── introduction.mdx
│ │ ├── load_and_explore.mdx
│ │ ├── preprocessing.mdx
│ │ ├── quiz.mdx
│ │ ├── streaming.mdx
│ │ └── supplemental_reading.mdx
│ ├── chapter2
│ │ ├── asr_pipeline.mdx
│ │ ├── audio_classification_pipeline.mdx
│ │ ├── hands_on.mdx
│ │ └── introduction.mdx
│ ├── chapter3
│ │ ├── classification.mdx
│ │ ├── ctc.mdx
│ │ ├── introduction.mdx
│ │ ├── quiz.mdx
│ │ ├── seq2seq.mdx
│ │ └── supplemental_reading.mdx
│ └── events
│ │ └── introduction.mdx
├── pt-BR
│ ├── _toctree.yml
│ ├── chapter0
│ │ ├── community.mdx
│ │ ├── get_ready.mdx
│ │ └── introduction.mdx
│ └── chapter1
│ │ ├── audio_data.mdx
│ │ ├── introduction.mdx
│ │ ├── load_and_explore.mdx
│ │ ├── preprocessing.mdx
│ │ ├── quiz.mdx
│ │ ├── streaming.mdx
│ │ └── supplemental_reading.mdx
├── ru
│ ├── _toctree.yml
│ ├── chapter0
│ │ ├── community.mdx
│ │ ├── get_ready.mdx
│ │ └── introduction.mdx
│ ├── chapter1
│ │ ├── audio_data.mdx
│ │ ├── introduction.mdx
│ │ ├── load_and_explore.mdx
│ │ ├── preprocessing.mdx
│ │ ├── quiz.mdx
│ │ ├── streaming.mdx
│ │ └── supplemental_reading.mdx
│ ├── chapter2
│ │ ├── asr_pipeline.mdx
│ │ ├── audio_classification_pipeline.mdx
│ │ ├── hands_on.mdx
│ │ └── introduction.mdx
│ ├── chapter3
│ │ ├── classification.mdx
│ │ ├── ctc.mdx
│ │ ├── introduction.mdx
│ │ ├── quiz.mdx
│ │ ├── seq2seq.mdx
│ │ └── supplemental_reading.mdx
│ ├── chapter4
│ │ ├── classification_models.mdx
│ │ ├── demo.mdx
│ │ ├── fine-tuning.mdx
│ │ ├── hands_on.mdx
│ │ └── introduction.mdx
│ ├── chapter5
│ │ ├── asr_models.mdx
│ │ ├── choosing_dataset.mdx
│ │ ├── demo.mdx
│ │ ├── evaluation.mdx
│ │ ├── fine-tuning.mdx
│ │ ├── hands_on.mdx
│ │ ├── introduction.mdx
│ │ └── supplemental_reading.mdx
│ ├── chapter6
│ │ ├── evaluation.mdx
│ │ ├── fine-tuning.mdx
│ │ ├── hands_on.mdx
│ │ ├── introduction.mdx
│ │ ├── pre-trained_models.mdx
│ │ ├── supplemental_reading.mdx
│ │ └── tts_datasets.mdx
│ ├── chapter7
│ │ ├── hands-on.mdx
│ │ ├── introduction.mdx
│ │ ├── speech-to-speech.mdx
│ │ ├── supplemental_reading.mdx
│ │ ├── transcribe-meeting.mdx
│ │ └── voice-assistant.mdx
│ ├── chapter8
│ │ ├── certification.mdx
│ │ └── introduction.mdx
│ ├── events
│ │ └── introduction.mdx
│ └── translation_agreements.txt
├── tr
│ ├── _toctree.yml
│ ├── chapter0
│ │ ├── community.mdx
│ │ ├── get_ready.mdx
│ │ └── introduction.mdx
│ ├── chapter1
│ │ ├── audio_data.mdx
│ │ ├── introduction.mdx
│ │ ├── load_and_explore.mdx
│ │ ├── preprocessing.mdx
│ │ ├── quiz.mdx
│ │ ├── streaming.mdx
│ │ └── supplemental_reading.mdx
│ └── chapter2
│ │ ├── asr_pipeline.mdx
│ │ ├── audio_classification_pipeline.mdx
│ │ ├── hands_on.mdx
│ │ ├── introduction.mdx
│ │ └── tts_pipeline.mdx
├── unpublished
│ └── chapter9
│ │ ├── audioldm.mdx
│ │ ├── dance_diffusion.mdx
│ │ ├── introduction.mdx
│ │ ├── music_generation.mdx
│ │ └── riffusion.mdx
└── zh-CN
│ ├── _toctree.yml
│ ├── chapter0
│ ├── community.mdx
│ ├── get_ready.mdx
│ └── introduction.mdx
│ ├── chapter1
│ ├── audio_data.mdx
│ ├── introduction.mdx
│ ├── load_and_explore.mdx
│ ├── preprocessing.mdx
│ ├── quiz.mdx
│ ├── streaming.mdx
│ └── supplemental_reading.mdx
│ ├── chapter2
│ ├── asr_pipeline.mdx
│ ├── audio_classification_pipeline.mdx
│ ├── hands_on.mdx
│ └── introduction.mdx
│ ├── chapter3
│ ├── classification.mdx
│ ├── ctc.mdx
│ ├── introduction.mdx
│ ├── quiz.mdx
│ ├── seq2seq.mdx
│ └── supplemental_reading.mdx
│ ├── chapter5
│ ├── asr_models.mdx
│ ├── choosing_dataset.mdx
│ ├── demo.mdx
│ ├── evaluation.mdx
│ ├── fine-tuning.mdx
│ ├── hands_on.mdx
│ ├── introduction.mdx
│ └── supplemental_reading.mdx
│ ├── chapter6
│ ├── evaluation.mdx
│ ├── fine-tuning.mdx
│ ├── hands_on.mdx
│ ├── introduction.mdx
│ ├── pre-trained_models.mdx
│ ├── supplemental_reading.mdx
│ └── tts_datasets.mdx
│ └── chapter8
│ ├── certification.mdx
│ └── introduction.mdx
├── requirements.txt
└── utils
├── carbon-config.json
├── code_formatter.py
├── generate_notebooks.py
└── validate_translation.py
/.github/workflows/build_documentation.yml:
--------------------------------------------------------------------------------
1 | name: Build documentation
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 |
8 | jobs:
9 | build:
10 | uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@main
11 | with:
12 | commit_sha: ${{ github.sha }}
13 | package: audio-transformers-course
14 | package_name: audio-course
15 | path_to_docs: audio-transformers-course/chapters/
16 | additional_args: --not_python_module
17 | languages: en bn ko es zh-CN ru fr tr pt-BR
18 | secrets:
19 | hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }}
20 |
--------------------------------------------------------------------------------
/.github/workflows/build_pr_documentation.yml:
--------------------------------------------------------------------------------
1 | name: Build PR Documentation
2 |
3 | on:
4 | pull_request:
5 |
6 | concurrency:
7 | group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
8 | cancel-in-progress: true
9 |
10 | jobs:
11 | build:
12 | uses: huggingface/doc-builder/.github/workflows/build_pr_documentation.yml@main
13 | with:
14 | commit_sha: ${{ github.event.pull_request.head.sha }}
15 | pr_number: ${{ github.event.number }}
16 | package: audio-transformers-course
17 | package_name: audio-course
18 | path_to_docs: audio-transformers-course/chapters/
19 | additional_args: --not_python_module
20 | languages: en bn ko es zh-CN ru fr tr pt-BR
21 |
--------------------------------------------------------------------------------
/.github/workflows/quality.yml:
--------------------------------------------------------------------------------
1 | name: Quality checks
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 | pull_request:
8 |
9 | jobs:
10 | quality:
11 | runs-on: ubuntu-latest
12 | steps:
13 | - uses: actions/checkout@v2
14 | - name: Set up Python 3.8
15 | uses: actions/setup-python@v2
16 | with:
17 | python-version: 3.8
18 | - name: Install Python dependencies
19 | run: pip install black
20 | - name: Run quality check
21 | run: make quality
--------------------------------------------------------------------------------
/.github/workflows/upload_pr_documentation.yml:
--------------------------------------------------------------------------------
1 | name: Upload PR Documentation
2 |
3 | on:
4 | workflow_run:
5 | workflows: ["Build PR Documentation"]
6 | types:
7 | - completed
8 |
9 | jobs:
10 | build:
11 | uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@main
12 | with:
13 | package_name: audio-course
14 | hub_base_path: https://moon-ci-docs.huggingface.co/learn
15 | secrets:
16 | hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }}
17 | comment_bot_token: ${{ secrets.COMMENT_BOT_TOKEN }}
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .vscode
2 | .idea/
3 |
4 | # Logs
5 | logs
6 | *.log
7 | npm-debug.log*
8 | yarn-debug.log*
9 | yarn-error.log*
10 |
11 | # Runtime data
12 | pids
13 | *.pid
14 | *.seed
15 | *.pid.lock
16 |
17 | # Directory for instrumented libs generated by jscoverage/JSCover
18 | lib-cov
19 |
20 | # Coverage directory used by tools like istanbul
21 | coverage
22 |
23 | # nyc test coverage
24 | .nyc_output
25 |
26 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
27 | .grunt
28 |
29 | # Bower dependency directory (https://bower.io/)
30 | bower_components
31 |
32 | # node-waf configuration
33 | .lock-wscript
34 |
35 | # Compiled binary addons (http://nodejs.org/api/addons.html)
36 | build/Release
37 |
38 | # Dependency directories
39 | node_modules/
40 | jspm_packages/
41 |
42 | # Typescript v1 declaration files
43 | typings/
44 |
45 | # Optional npm cache directory
46 | .npm
47 |
48 | # Optional eslint cache
49 | .eslintcache
50 |
51 | # Optional REPL history
52 | .node_repl_history
53 |
54 | # Output of 'npm pack'
55 | *.tgz
56 |
57 | # dotenv environment variables file
58 | .env
59 |
60 | # gatsby files
61 | .cache/
62 | public
63 |
64 | # Mac files
65 | .DS_Store
66 |
67 | # Yarn
68 | yarn-error.log
69 | yarn.lock
70 | .pnp/
71 | .pnp.js
72 | # Yarn Integrity file
73 | .yarn-integrity
74 |
75 | # Sylvain notes folder
76 | notes
77 |
78 | # Ignore Colab notebooks
79 | nbs/
80 |
81 | # Byte-compiled
82 | __pycache__/
83 | .cache/
84 |
85 | # Temporary files
86 | tmp-docs
87 |
88 | # Jupyter Notebook
89 | .ipynb_checkpoints
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: quality style
2 |
3 | # Check code formatting
4 | quality:
5 | python utils/code_formatter.py --check_only
6 |
7 | # Format code samples automatically and check if there are any problems left that need manual fixing
8 | style:
9 | python utils/code_formatter.py
10 |
--------------------------------------------------------------------------------
/assets/img/cnn-feature-encoder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huggingface/audio-transformers-course/4bc95b750205face0900f796f04bae58c54384b5/assets/img/cnn-feature-encoder.png
--------------------------------------------------------------------------------
/assets/img/speecht5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huggingface/audio-transformers-course/4bc95b750205face0900f796f04bae58c54384b5/assets/img/speecht5.png
--------------------------------------------------------------------------------
/assets/img/speecht5_decoding.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huggingface/audio-transformers-course/4bc95b750205face0900f796f04bae58c54384b5/assets/img/speecht5_decoding.png
--------------------------------------------------------------------------------
/assets/img/transformers_blocks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huggingface/audio-transformers-course/4bc95b750205face0900f796f04bae58c54384b5/assets/img/transformers_blocks.png
--------------------------------------------------------------------------------
/assets/img/wav2vec2-ctc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huggingface/audio-transformers-course/4bc95b750205face0900f796f04bae58c54384b5/assets/img/wav2vec2-ctc.png
--------------------------------------------------------------------------------
/assets/img/wav2vec2-input.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huggingface/audio-transformers-course/4bc95b750205face0900f796f04bae58c54384b5/assets/img/wav2vec2-input.png
--------------------------------------------------------------------------------
/assets/img/whisper-input.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/huggingface/audio-transformers-course/4bc95b750205face0900f796f04bae58c54384b5/assets/img/whisper-input.png
--------------------------------------------------------------------------------
/chapters/bn/chapter0/community.mdx:
--------------------------------------------------------------------------------
1 | # 🤗 সম্প্রদায় যোগদান করুন!
2 |
3 | আমরা আপনাকে আমাদের [Discord](http://hf.co/join/discord) যোগদান করার জন্যে আমন্ত্রণ করছি। ওখানে আপনি আপনার মতন আরো শিক্ষার্থীদের
4 | সাথে যোগাযোগ করার সুযোগ পাবেন, এছাড়াও আপনি নিজের মতামত অন্যদের সাথে বিনিময় করার সুযোগ পাবেন, প্রশ্ন করতে পারবেন, অন্যদের সাথে সহযোগিতা
5 | করতে পারবেন এবং নিজের হাতে-করি অনুশীলনীর সম্পর্কে মূল্যবান প্রতিক্রিয়া পাবেন।
6 |
7 | আমাদের দলও Discord এ সক্রিয়, এবং তারা যখন আপনার প্রয়োজন তখন সহায়তা এবং নির্দেশনা প্রদানের জন্য আছে।
8 | আমাদের সম্প্রদায়ে যোগদান করার মাদ্ধমে আপনি পাঠক্রমের সাথে অনুপ্রাণিত, নিযুক্ত এবং সংযুক্ত থাকতে পারবে। আমরা আপনাকে সেখানে দেখার অপেক্ষায় আছি!
9 |
10 | ## Discord কি?
11 |
12 | ডিসকর্ড একটি বিনামূল্যের চ্যাট প্ল্যাটফর্ম। আপনি যদি Slack ব্যবহার করে থাকেন তবে আপনি এটি বেশ একই রকম পাবেন। 🤗 Discord সার্ভার হলো
13 | ১৮ ০০০ এর বেশি A.I. বিশেষজ্ঞ, শিক্ষার্থী এবং উত্সাহীদের একটি সমৃদ্ধশালী সম্প্রদায় যার আপনি একটি অংশ হতে পারেন।
14 |
15 | ## Discord এর পরিচালনা করা
16 |
17 | একবার আপনি আমাদের ডিসকর্ড সার্ভারে Sign Up করলে, আপনাকে `#role-assignment`-এ ক্লিক করে আপনার আগ্রহের বিষয়গুলি বেছে নিতে হব।
18 | বাম দিকে আপনি আপনার পছন্দ হিসাবে অনেক বিভিন্ন বিভাগ চয়ন করতে পারেন. এই কোর্সের অন্যান্য শিক্ষার্থীদের যোগ দিতে, নিশ্চিত করুন "ML for Audio and Speech" ক্লিক করতে।
19 | চ্যানেলগুলি অন্বেষণ করুন এবং `#introduce-yourself` চ্যানেলে আপনার সম্পর্কে কিছু জিনিস শেয়ার করুন যাতে আমরা আপনাকে আরো জানতে পারি।
20 |
21 | ## Audio course সংক্রান্ত চ্যানেল
22 |
23 | আমাদের ডিসকর্ড সার্ভারে বিভিন্ন বিষয়ে ফোকাস করা অনেক চ্যানেল রয়েছে। আপনি গবেষণা পত্রের আলোচনা, সংগঠিত ইভেন্ট সম্পর্কে ধারণা পাবেন এবং তাতে
24 | অংশগ্রহণ করার সুযোগ এবং আরো অনেক কিছু পাবেন।
25 | একজন audio পাঠক্রমের শিক্ষার্থী হিসাবে, আপনি নিম্নলিখিত চ্যানেলগুলোকে বিশেষভাবে প্রাসঙ্গিক খুঁজে পেতে পারেন:
26 |
27 | * `#audio-announcements`: পাঠক্রম সম্পর্কে আপডেট, audio ইভেন্ট ঘোষণা এবং 🤗 সম্পর্কিত আরও অনেক কিছু খবর পাবেন।
28 | * `#audio-study-group`: ধারনা বিনিময় করার জায়গা, পাঠক্রম সম্পর্কে প্রশ্ন জিজ্ঞাসা করুন এবং আলোচনা শুরু করুন।
29 | * `#audio-discuss`: audio সম্পর্কিত বিষয় নিয়ে আলোচনা করার একটি সাধারণ জায়গা।
30 |
31 | `#audio-study-group`-এ যোগদানের পাশাপাশি, নির্দ্বিধায় আপনার নিজস্ব স্টাডি গ্রুপ তৈরি করুন, একসাথে শেখা সবসময়ই সহজ!
--------------------------------------------------------------------------------
/chapters/bn/chapter0/get_ready.mdx:
--------------------------------------------------------------------------------
1 | # প্রস্তুতি পর্ব
2 |
3 | আমরা আশা করি আপনি পাঠক্রমটি শুরু করতে উত্তেজিত, এবং আমরা এই পৃষ্ঠাটি আপনার প্রস্তুতির শুরু করার জন্যে ডিজাইন করেছি!
4 |
5 | ## পদক্ষেপ ১. Sign up
6 |
7 | সমস্ত আপডেট এবং বিশেষ সামাজিক ইভেন্টগুলির সাথে আপ টু ডেট থাকতে, কোর্সে Sign Up করুন ৷
8 |
9 | [👉 SIGN UP](http://eepurl.com/insvcI)
10 |
11 | ## পদক্ষেপ ২. 🤗 account তৈরী করুন
12 |
13 | আপনার যদি এখনও একটি 🤗 account না থাকে, একটি 🤗 account তৈরি করুন (এটি বিনামূল্যে)। হাতে-কলমে কাজগুলি সম্পূর্ণ করার জন্য আপনার এটির
14 | প্রয়োজন হব। এছাড়াও এটি আপনার সমাপ্তির শংসাপত্র গ্রহণ করতে, pre-trained models গুলি অন্বেষণ করতে, ডেটাসেটগুলি অ্যাক্সেস করতে এবং আরও
15 | অনেক কিছু করতে সাহায্য করবে ।
16 |
17 | [👉 🤗 account তৈরি করুন](https://huggingface.co/join)
18 |
19 | ## পদক্ষেপ ৩. Transformer models এর যাচাই করে নিন (আপনার যদি প্রয়োজন পরে তবেই)
20 |
21 | আমরা অনুমান করি যে আপনার Deep Learning এর সাথে পরিচয় আছে এবং Transformers models এর সাথে সাধারণ পরিচিতি রয়েছে।
22 | আপনার যদি Transformers models এর ব্যাপারে যাচাই করার প্রয়োজন পরে তাহলে আমাদের [NLP Course](https://huggingface.co/course/chapter1/1) এর সাহায্য নিতে পারেন।
23 |
24 | ## পদক্ষেপ ৪. আপনার সেটআপ চেক করুন
25 |
26 | আপনার যা যা প্রয়োজন হবে:
27 | - ইন্টারনেট সংযোগ সহ একটি কম্পিউটার
28 | - [Google Colab](https://colab.research.google.com) এর প্রয়োজন হবে হাতে-করি অনুশীলনীর জন্যে। বিনামূল্যের সংস্করণটি যথেষ্ট.
29 |
30 | আপনি যদি আগে কখনো Google Colab ব্যবহার না করে থাকেন তাহলে এটি দেখুন - [official introduction notebook](https://colab.research.google.com/notebooks/intro.ipynb).
31 |
32 | ## পদক্ষেপ ৫. 🤗 সম্প্রদায় যোগদান করুন
33 |
34 | আমাদের Discord সার্ভারে Sign Up করুন, সেই জায়গা যেখানে আপনি আপনার সহপাঠীদের সাথে ধারনা এবং তথ্য বিনিময় করতে পারেন এবং আমাদের সাথে যোগাযোগ করতে পারেন (🤗 Team)।
35 |
36 | [👉 🤗 সম্প্রদায় যোগদান করুন](http://hf.co/join/discord)
37 |
38 | আমাদের সম্প্রদায়ের সম্পর্কে আরো জানতে পরের [পাতায় যান](community)।
39 |
--------------------------------------------------------------------------------
/chapters/bn/chapter1/introduction.mdx:
--------------------------------------------------------------------------------
1 | # অধ্যায় ১. অডিও ডাটার সাথে কাজ করার পদ্ধতিসমূহ
2 |
3 | ## এই অধ্যায় থেকে তুমি কি কি শিখবে?
4 |
5 | প্রতিটি অডিও বা speech সংক্রান্ত কাজ একটি অডিও ফাইল দিয়ে শুরু হয়। আমরা এই কাজগুলি সমাধান করার জন্য ডুব দিতে পারার আগে, এই ফাইলগুলি
6 | আসলে কী ধারণ করে এবং কীভাবে তাদের সাথে কাজ করতে হয় তা বোঝা খুবই গুরুত্বপূর্ণ।
7 |
8 | এই অধ্যায়ে, আপনি তরঙ্গরূপ সহ অডিও ডেটা সম্পর্কিত sampling rate, spectrogram এর মতন মৌলিক পরিভাষাগুলির একটি উপলব্ধি লাভ করবেন,
9 | এহকারাও আপনি অডিও লোডিং এবং প্রিপ্রসেসিং সহ অডিও ডেটাসেটগুলির সাথে কীভাবে কাজ করবেন তাও শিখবেন এবং কীভাবে বড় ডেটাসেটগুলি দক্ষতার সাথে স্ট্রিম করা যায়।
10 |
11 | এই অধ্যায়ের শেষে, আপনি প্রয়োজনীয় audio ডেটা সম্পর্কিত পরিভাষাগুলির একটি শক্তিশালী উপলব্ধি করতে পারবেন এবং
12 | বিভিন্ন অ্যাপ্লিকেশনের জন্য অডিও ডেটাসেটের সাথে কাজ করার জন্য প্রয়োজনীয় দক্ষতা অর্জন করবেন। এই অধ্যায় এ আপনি যে জ্ঞান অর্জন করবেন তা পাঠক্রমের অবশিষ্টাংশ বোঝার জন্য একটি ভিত্তি স্থাপন করবে।
--------------------------------------------------------------------------------
/chapters/bn/chapter1/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # আরো জানো
2 |
3 | এই অধ্যায়ে অডিও ডেটার ব্যাপারে বোঝা এবং এটির সাথে কাজ করা সম্পর্কিত অনেক মৌলিক ধারণাগুলিকে কভার করা করেছে৷ আরো জানতে চান? এখানে আপনি
4 | অতিরিক্ত সংস্থানগুলি পাবেন যা আপনাকে বিষয়গুলি সম্পর্কে আপনার বোঝার গভীরে সাহায্য করবে এবং আপনার শেখার অভিজ্ঞতা উন্নত করবে।
5 |
6 | নিম্নলিখিত ভিডিওতে, xiph.org থেকে মন্টি মন্টগোমারি, আধুনিক ডিজিটাল এবং ভিনটেজ অ্যানালগ বেঞ্চ সরঞ্জাম উভয় ব্যবহার করে
7 | sampling, quantization, bit-depth এর বিশ্লেষণ করেছেন। ভিডিওটি দেখুন:
8 |
9 |
10 |
11 | আপনি যদি ডিজিটাল সিগন্যাল প্রসেসিংয়ের আরও গভীরে যেতে চান তবে ব্রায়ান ম্যাকফির(যিনি New York University র মিউজিক টেকনোলজি এবং
12 | ডেটা সায়েন্সের একজন সহকারী অধ্যাপক এবং `librosa` প্যাকেজের প্রধান রক্ষণাবেক্ষণকার) লেখা ["Digital Signals Theory" book](https://brianmcfee.net/dstbook-site/content/intro.html)
13 | বইটি পড়ুন।
14 |
15 |
16 |
--------------------------------------------------------------------------------
/chapters/bn/chapter2/hands_on.mdx:
--------------------------------------------------------------------------------
1 | # হাতে-করি অনুশীলন
2 |
3 | এই অনুশীলনটি গ্রেড করা হয়নি এবং কোর্সের বাকি অংশ জুড়ে আপনি যে টুলস এবং লাইব্রেরিগুলি ব্যবহার করবেন তার সাথে পরিচিত হতে সাহায্য করার উদ্দেশ্যে করা
4 | হয়েছে। আপনি যদি ইতিমধ্যেই Google Colab, 🤗 datasets, librosa এবং 🤗 transformers ব্যবহারে অভিজ্ঞ হয়ে থাকেন, তাহলে আপনি এই অনুশীলনটি
5 | এড়িয়ে যেতে পারেন।
6 |
7 | ১. একটি [Google Colab](https://colab.research.google.com) নোটবুক তৈরি করুন।
8 |
9 | ২. স্ট্রিমিং মোডে আপনার পছন্দের ভাষায় [`facebook/voxpopuli` ডেটাসেট](https://huggingface.co/datasets/facebook/voxpopuli) এর `train`
10 | স্প্লিটটি লোড করতে 🤗 datasets ব্যবহার করুন।
11 |
12 | ৩. ডেটাসেটের `train` অংশ থেকে তৃতীয় উদাহরণটি পান এবং এটি অন্বেষণ করুন। এই উদাহরণে যে বৈশিষ্ট্যগুলি রয়েছে তা প্রদত্ত, আপনি এই ডেটাসেটটি কী
13 | ধরণের অডিও কাজগুলির জন্য ব্যবহার করতে পারেন?
14 |
15 | ৪. এই উদাহরণের তরঙ্গরূপ এবং spectrogram প্লট করুন।
16 |
17 | ৫. [🤗 Hub](https://huggingface.co/models) এ যান, pre-trained models গুলো অন্বেষণ করুন এবং এমন একটি মডেল খুঁজুন যা আপনি আগে
18 | বেছে নেওয়া ভাষার জন্য automatic speech recognition এর জন্য ব্যবহার করা যেতে পারে। আপনি যে মডেলটি পেয়েছেন তার সাথে একটি সংশ্লিষ্ট pipeline
19 | তৈরী করুন এবং উদাহরণটি প্রতিলিপি করুন।
20 |
21 | ৬. উদাহরণে দেওয়া ট্রান্সক্রিপশনের সাথে pipeline থেকে আপনি যে ট্রান্সক্রিপশন পেয়েছেন তার তুলনা করুন।
22 |
23 |
24 | আপনি যদি এই অনুশীলনের সাথে সমস্যায় পড়েন, তাহলে নির্দ্বিধায় একটি [উদাহরণ সমাধান](https://colab.research.google.com/drive/1NGyo5wFpRj8TMfZOIuPaJHqyyXCITftc?usp=sharing) দেখুন।
25 | কিছু আকর্ষণীয় আবিষ্কার করলেন? একটি দুর্দান্ত মডেল পাওয়া গেছে? একটি সুন্দর স্পেকট্রোগ্রাম পেয়েছেন? টুইটারে আপনার কাজ এবং আবিষ্কারগুলি ভাগ করে নিন বিনা দ্বিধায়!
26 |
27 | পরবর্তী অধ্যায়গুলিতে আপনি বিভিন্ন audio transformers architecture সম্পর্কে আরও শিখবেন এবং আপনার নিজের তৈরী মডেলগুলোকে train করবেন!
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/chapters/bn/chapter2/introduction.mdx:
--------------------------------------------------------------------------------
1 | # অধ্যায় ২. অডিও অ্যাপ্লিকেশনের সূচনা
2 |
3 | Hugging Face অডিও কোর্সের দ্বিতীয় পাঠক্রমে স্বাগতম! পূর্বে, আমরা অডিও ডেটার মৌলিক বিষয়গুলি অন্বেষণ করেছি৷
4 | এবং 🤗 datasets এবং 🤗 transformers লাইব্রেরি ব্যবহার করে অডিও ডেটাসেটের সাথে কিভাবে কাজ করতে হয় তা শিখেছি। আমরা বিভিন্ন বিষয়ে আলোচনা করেছি যেমন -
5 | sampling rate, amplitude, bit depth, তরঙ্গরূপ এবং spectrogram এর ধারণা এবং কিভাবে ডেটা প্রিপ্রসেস করা যায় তা দেখেছি।
6 |
7 | এই মুহুর্তে আপনি অডিও কাজগুলি সম্পর্কে জানতে আগ্রহী হতে পারেন যা 🤗 transformers পরিচালনা করতে পারে এবং আপনার কাছে তা ভালো ভাবে জানার জন্য
8 | প্রয়োজনীয় সমস্ত ভিত্তি রয়েছে! চলুন কিছু মন ছুঁয়ে যাওয়া অডিও টাস্কের উদাহরণ দেখে নেওয়া যাক:
9 |
10 | * **Audio classification**: সহজেই অডিও ক্লিপগুলিকে বিভিন্ন বিভাগে শ্রেণীবদ্ধ করুন। একটি রেকর্ডিং একটি ঘেউ ঘেউ করা কুকুর বা বিড়াল এর মিউ
11 | কিনা তা আপনি সনাক্ত করতে পারেন, বা একটি গান কোন সঙ্গীত ঘরানার অন্তর্গত তাও বলে দিতে পারেন।
12 | * **Automatic speech recognition**: অডিও ক্লিপগুলিকে স্বয়ংক্রিয়ভাবে প্রতিলিপি করে পাঠ্যে রূপান্তর করুন। আপনি একটি রেকর্ডিং থেকে টেক্সট পেতে পারেন,
13 | যেমন "আপনি আজ কেমন আছেন?"। নোট নেওয়ার জন্য বরং উপকারী!
14 | * **Speaker diarization**: কখনো ভেবেছেন কে রেকর্ডিংয়ে কথা বলছে? 🤗 transformers সাহায্যে আপনি কোন স্পিকারটি কখন কথা বলছে তা সনাক্ত করতে পারবেন।
15 | * **Text to speech**: এর মাদ্ধমে আপনি একটি পাঠ্যের একটি বর্ণিত সংস্করণ তৈরি করুন যা একটি audio book তৈরি করতে ব্যবহার করা যেতে পারে, অথবা
16 | একটি গেমে একটি NPC-কে ভয়েস দিন, 🤗 transformers দিয়ে, আপনি সহজেই এই কাজগুলি করতে পারবেন!
17 |
18 | এই ইউনিটে, আপনি শিখবেন কিভাবে 🤗 transformers থেকে `pipeline()` ফাংশন ব্যবহার করে এই কয়েকটি কাজের জন্য pre-trained মডেল ব্যবহার করতে হয়।
19 | বিশেষ করে, আমরা দেখব কিভাবে pre-trained মডেলগুলি audio classification এবং automatic speech recognition এর জন্য ব্যবহার করা যেতে পারে।
20 | চলুন শুরু করি!
21 |
--------------------------------------------------------------------------------
/chapters/bn/events/introduction.mdx:
--------------------------------------------------------------------------------
1 | # লাইভ সেশন এবং কর্মশালা
2 |
3 | নতুন অডিও Transformers কোর্স: Live Launch Event with Paige Bailey (DeepMind), Seokhwan Kim (Amazon Alexa AI), and Brian McFee (Librosa)
4 |
5 |
6 |
7 | Hugging Face অডিও কোর্স টিমের সাথে একটি লাইভ AMA এর রেকর্ডিং:
8 |
9 |
--------------------------------------------------------------------------------
/chapters/en/chapter0/community.mdx:
--------------------------------------------------------------------------------
1 | # Join the community!
2 |
3 | We invite you to [join our vibrant and supportive community on Discord](http://hf.co/join/discord). You will have the opportunity to connect with
4 | like-minded learners, exchange ideas, and get valuable feedback on your hands-on exercises. You can ask questions,
5 | share resources, and collaborate with others.
6 |
7 | Our team is also active on Discord, and they are available to provide support and guidance when you need
8 | it. Joining our community is an excellent way to stay motivated, engaged, and connected, and we look forward to seeing
9 | you there!
10 |
11 | ## What is Discord?
12 |
13 | Discord is a free chat platform. If you've used Slack, you'll find it quite similar. The Hugging Face Discord server
14 | is a home to a thriving community of 18 000 AI experts, learners and enthusiasts that you can be a part of.
15 |
16 | ## Navigating Discord
17 |
18 | Once you sign up to our Discord server, you'll need to pick the topics you're interested in by clicking `#role-assignment`
19 | at the left. You can choose as many different categories as you like. To join other learners of this course, make sure
20 | to click "ML for Audio and Speech".
21 | Explore the channels and share a few things about you in the `#introduce-yourself` channel.
22 |
23 | ## Audio course channels
24 |
25 | There are many channels focused on various topics on our Discord server. You'll find people discussing papers, organizing
26 | events, sharing their projects and ideas, brainstorming, and so much more.
27 |
28 | As an audio course learner, you may find the following set of channels particularly relevant:
29 |
30 | * `#audio-announcements`: updates about the course, news from the Hugging Face related to everything audio, event announcements, and more.
31 | * `#audio-study-group`: a place to exchange ideas, ask questions about the course and start discussions.
32 | * `#audio-discuss`: a general place to have discussions about things related to audio.
33 |
34 | In addition to joining the `#audio-study-group`, feel free to create your own study group, learning together is always easier!
35 |
--------------------------------------------------------------------------------
/chapters/en/chapter0/get_ready.mdx:
--------------------------------------------------------------------------------
1 | # Get ready to take the course
2 |
3 | We hope that you are excited to get started with the course, and we have designed this page to make sure you have
4 | everything you need to jump right in!
5 |
6 | ## Step 1. Sign up
7 |
8 | To stay up to date with all the updates and special social events, sign up to the course.
9 |
10 | [👉 SIGN UP](http://eepurl.com/insvcI)
11 |
12 | ## Step 2. Get a Hugging Face account
13 |
14 | If you don't yet have one, create a Hugging Face account (it's free). You'll need it to complete hands-on tasks, to
15 | receive your certificate of completion, to explore pre-trained models, to access datasets and more.
16 |
17 | [👉 CREATE HUGGING FACE ACCOUNT](https://huggingface.co/join)
18 |
19 | ## Step 3. Brush up on fundamentals (if you need to)
20 |
21 | We assume that you are familiar with deep learning basics, and have general familiarity with transformers. If you need
22 | to brush up on your understanding of transformers, check out our [NLP Course](https://huggingface.co/course/chapter1/1).
23 |
24 | ## Step 4. Check your setup
25 |
26 | To go through the course materials you will need:
27 | - A computer with an internet connection
28 | - [Google Colab](https://colab.research.google.com) for hands-on exercises. The free version is enough. If you have never used Google Colab before, check out this [official introduction notebook](https://colab.research.google.com/notebooks/intro.ipynb).
29 |
30 |
31 |
32 | As an alternative to the free tier of Google Colab, you can use your own local setup, or Kaggle Notebooks. Kaggle Notebooks
33 | offer a fixed number of GPU hours and have similar functionality to Google Colab, however, there are differences when it
34 | comes to sharing your models on 🤗 Hub (e.g. for completing assignments). If you decide to use Kaggle Notebooks as your
35 | tool of choice, check out the [example Kaggle notebook](https://www.kaggle.com/code/michaelshekasta/test-notebook) created by
36 | [@michaelshekasta](https://github.com/michaelshekasta). This notebook illustrates how you can train and share your
37 | trained model on 🤗 Hub.
38 |
39 |
40 |
41 | ## Step 5. Join the community
42 |
43 | Sign up to our Discord server, the place where you can exchange ideas with your classmates and reach out to us (the Hugging Face team).
44 |
45 | [👉 JOIN THE COMMUNITY ON DISCORD](http://hf.co/join/discord)
46 |
47 | To learn more about our community on Discord and how to make the most of it, check out the [next page](community).
48 |
--------------------------------------------------------------------------------
/chapters/en/chapter1/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Unit 1. Working with audio data
2 |
3 | ## What you'll learn in this unit
4 |
5 | Every audio or speech task starts with an audio file. Before we can dive into solving these tasks, it's important to
6 | understand what these files actually contain, and how to work with them.
7 |
8 | In this unit, you will gain an understanding of the fundamental terminology related to audio data, including waveform,
9 | sampling rate, and spectrogram. You will also learn how to work with audio datasets, including loading and preprocessing
10 | audio data, and how to stream large datasets efficiently.
11 |
12 | By the end of this unit, you will have a strong grasp of the essential audio data terminology and will be equipped with the
13 | skills necessary to work with audio datasets for various applications. The knowledge you'll gain in this unit is going to
14 | lay a foundation to understanding the remainder of the course.
--------------------------------------------------------------------------------
/chapters/en/chapter1/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # Learn more
2 |
3 | This unit covered many fundamental concepts relevant to understanding of audio data and working with it.
4 | Want to learn more? Here you will find additional resources that will help you deepen your understanding of the topics and
5 | enhance your learning experience.
6 |
7 | In the following video, Monty Montgomery from xiph.org presents a real-time demonstrations of sampling, quantization,
8 | bit-depth, and dither on real audio equipment using both modern digital analysis and vintage analog bench equipment, check it out:
9 |
10 |
11 |
12 | If you'd like to dive deeper into digital signal processing, check out the free ["Digital Signals Theory" book](https://brianmcfee.net/dstbook-site/content/intro.html)
13 | authored by Brian McFee, an Assistant Professor of Music Technology and Data Science at New York University and the principal maintainer
14 | of the `librosa` package.
15 |
16 |
--------------------------------------------------------------------------------
/chapters/en/chapter2/hands_on.mdx:
--------------------------------------------------------------------------------
1 | # Hands-on exercise
2 |
3 | This exercise is not graded and is intended to help you become familiar with the tools and libraries that you will be using throughout the rest of the course. If you are already experienced in using Google Colab, 🤗 Datasets, librosa and 🤗 Transformers, you may choose to skip this exercise.
4 |
5 | 1. Create a [Google Colab](https://colab.research.google.com) notebook.
6 | 2. Use 🤗 Datasets to load the train split of the [`facebook/voxpopuli` dataset](https://huggingface.co/datasets/facebook/voxpopuli) in language of your choice in streaming mode.
7 | 3. Get the third example from the `train` part of the dataset and explore it. Given the features that this example has, what kinds of audio tasks can you use this dataset for?
8 | 4. Plot this example's waveform and spectrogram.
9 | 5. Go to [🤗 Hub](https://huggingface.co/models), explore pretrained models and find one that can be used for automatic speech recognition for the language that you have picked earlier. Instantiate a corresponding pipeline with the model you found, and transcribe the example.
10 | 6. Compare the transcription that you get from the pipeline to the transcription provided in the example.
11 |
12 | If you struggle with this exercise, feel free to take a peek at an [example solution](https://colab.research.google.com/drive/1NGyo5wFpRj8TMfZOIuPaJHqyyXCITftc?usp=sharing).
13 | Discovered something interesting? Found a cool model? Got a beautiful spectrogram? Feel free to share your work and discoveries on Twitter!
14 |
15 | In the next chapters you'll learn more about various audio transformer architectures and will train your own model!
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/chapters/en/chapter2/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Unit 2. A gentle introduction to audio applications
2 |
3 | Welcome to the second unit of the Hugging Face audio course! Previously, we explored the fundamentals of audio data
4 | and learned how to work with audio datasets using the 🤗 Datasets and 🤗 Transformers libraries. We discussed various
5 | concepts such as sampling rate, amplitude, bit depth, waveform, and spectrograms, and saw how to preprocess data to
6 | prepare it for a pre-trained model.
7 |
8 | At this point you may be eager to learn about the audio tasks that 🤗 Transformers can handle, and you have all the foundational
9 | knowledge necessary to dive in! Let's take a look at some of the mind-blowing audio task examples:
10 |
11 | * **Audio classification**: easily categorize audio clips into different categories. You can identify whether a recording
12 | is of a barking dog or a meowing cat, or what music genre a song belongs to.
13 | * **Automatic speech recognition**: transform audio clips into text by transcribing them automatically. You can get a text
14 | representation of a recording of someone speaking, like "How are you doing today?". Rather useful for note taking!
15 | * **Speaker diarization**: Ever wondered who's speaking in a recording? With 🤗 Transformers, you can identify which speaker
16 | is talking at any given time in an audio clip. Imagine being able to differentiate between "Alice" and "Bob" in a recording
17 | of them having a conversation.
18 | * **Text to speech**: create a narrated version of a text that can be used to produce an audio book, help with accessibility,
19 | or give a voice to an NPC in a game. With 🤗 Transformers, you can easily do that!
20 |
21 | In this unit, you'll learn how to use pre-trained models for some of these tasks using the `pipeline()` function from 🤗 Transformers.
22 | Specifically, we'll see how the pre-trained models can be used for audio classification, automatic speech recognition and audio generation.
23 | Let's get started!
24 |
25 |
--------------------------------------------------------------------------------
/chapters/en/chapter3/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # Supplemental reading and resources
2 |
3 | If you'd like to further explore different Transformer architectures, and learn about their various applications in speech processing, check
4 | out this recent paper:
5 |
6 | ### Transformers in Speech Processing: A Survey
7 |
8 | by Siddique Latif, Aun Zaidi, Heriberto Cuayahuitl, Fahad Shamshad, Moazzam Shoukat, Junaid Qadir
9 |
10 | "The remarkable success of transformers in the field of natural language processing has sparked the interest of the
11 | speech-processing community, leading to an exploration of their potential for modeling long-range dependencies within
12 | speech sequences. Recently, transformers have gained prominence across various speech-related domains, including
13 | automatic speech recognition, speech synthesis, speech translation, speech para-linguistics, speech enhancement, s
14 | poken dialogue systems, and numerous multimodal applications. In this paper, we present a comprehensive survey that
15 | aims to bridge research studies from diverse subfields within speech technology. By consolidating findings from across
16 | the speech technology landscape, we provide a valuable resource for researchers interested in harnessing the power of
17 | transformers to advance the field. We identify the challenges encountered by transformers in speech processing while
18 | also offering insights into potential solutions to address these issues."
19 |
20 | [arxiv.org/abs/2303.11607](https://arxiv.org/abs/2303.11607)
21 |
--------------------------------------------------------------------------------
/chapters/en/chapter4/demo.mdx:
--------------------------------------------------------------------------------
1 | # Build a demo with Gradio
2 |
3 | In this final section on audio classification, we'll build a [Gradio](https://gradio.app) demo to showcase the music
4 | classification model that we just trained on the [GTZAN](https://huggingface.co/datasets/marsyas/gtzan) dataset. The first
5 | thing to do is load up the fine-tuned checkpoint using the `pipeline()` class - this is very familiar now from the section
6 | on [pre-trained models](classification_models). You can change the `model_id` to the namespace of your fine-tuned model
7 | on the Hugging Face Hub:
8 |
9 | ```python
10 | from transformers import pipeline
11 |
12 | model_id = "sanchit-gandhi/distilhubert-finetuned-gtzan"
13 | pipe = pipeline("audio-classification", model=model_id)
14 | ```
15 |
16 | Secondly, we'll define a function that takes the filepath for an audio input and passes it through the pipeline. Here,
17 | the pipeline automatically takes care of loading the audio file, resampling it to the correct sampling rate, and running
18 | inference with the model. We take the models predictions of `preds` and format them as a dictionary object to be displayed on the
19 | output:
20 |
21 | ```python
22 | def classify_audio(filepath):
23 | preds = pipe(filepath)
24 | outputs = {}
25 | for p in preds:
26 | outputs[p["label"]] = p["score"]
27 | return outputs
28 | ```
29 |
30 | Finally, we launch the Gradio demo using the function we've just defined:
31 |
32 | ```python
33 | import gradio as gr
34 |
35 | demo = gr.Interface(
36 | fn=classify_audio, inputs=gr.Audio(type="filepath"), outputs=gr.outputs.Label()
37 | )
38 | demo.launch(debug=True)
39 | ```
40 |
41 | This will launch a Gradio demo similar to the one running on the Hugging Face Space:
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/chapters/en/chapter4/hands_on.mdx:
--------------------------------------------------------------------------------
1 | # Hands-on exercise
2 |
3 | It's time to get your hands on some Audio models and apply what you have learned so far.
4 | This exercise is one of the four hands-on exercises required to qualify for a course completion certificate.
5 |
6 | Here are the instructions.
7 | In this unit, we demonstrated how to fine-tune a Hubert model on `marsyas/gtzan` dataset for music classification. Our example achieved 83% accuracy.
8 | Your task is to improve upon this accuracy metric.
9 |
10 | Feel free to choose any model on the [🤗 Hub](https://huggingface.co/models) that you think is suitable for audio classification,
11 | and use the exact same dataset [`marsyas/gtzan`](https://huggingface.co/datasets/marsyas/gtzan) to build your own classifier.
12 |
13 | Your goal is to achieve 87% accuracy on this dataset with your classifier. You can choose the exact same model, and play with the training hyperparameters,
14 | or pick an entirely different model - it's up to you!
15 |
16 | For your result to count towards your certificate, don't forget to push your model to Hub as was shown in this unit with
17 | the following `**kwargs` at the end of the training:
18 |
19 | ```python
20 | kwargs = {
21 | "dataset_tags": "marsyas/gtzan",
22 | "dataset": "GTZAN",
23 | "model_name": f"{model_name}-finetuned-gtzan",
24 | "finetuned_from": model_id,
25 | "tasks": "audio-classification",
26 | }
27 |
28 | trainer.push_to_hub(**kwargs)
29 | ```
30 |
31 | Here are some additional resources that you may find helpful when working on this exercise:
32 | * [Audio classification task guide in Transformers documentation](https://huggingface.co/docs/transformers/tasks/audio_classification)
33 | * [Hubert model documentation](https://huggingface.co/docs/transformers/model_doc/hubert)
34 | * [M-CTC-T model documentation](https://huggingface.co/docs/transformers/model_doc/mctct)
35 | * [Audio Spectrogram Transformer documentation](https://huggingface.co/docs/transformers/model_doc/audio-spectrogram-transformer)
36 | * [Wav2Vec2 documentation](https://huggingface.co/docs/transformers/model_doc/wav2vec2)
37 |
38 | Feel free to build a demo of your model, and share it on Discord! If you have questions, post them in the #audio-study-group channel.
39 |
--------------------------------------------------------------------------------
/chapters/en/chapter4/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Unit 4. Build a music genre classifier
2 |
3 | ## What you'll learn and what you'll build
4 |
5 | Audio classification is one of the most common applications of transformers in audio and speech processing. Like other
6 | classification tasks in machine learning, this task involves assigning one or more labels to an audio recording based on
7 | its content. For example, in the case of speech, we might want to detect when wake words like "Hey Siri" are spoken, or
8 | infer a key word like "temperature" from a spoken query like "What is the weather today?". Environmental sounds
9 | provide another example, where we might want to automatically distinguish between sounds such as "car horn", "siren",
10 | "dog barking", etc.
11 |
12 | In this section, we'll look at how pre-trained audio transformers can be applied to a range of audio classification tasks.
13 | We'll then fine-tune a transformer model on the task of music classification, classifying songs into genres like "pop" and
14 | "rock". This is an important part of music streaming platforms like [Spotify](https://en.wikipedia.org/wiki/Spotify), which
15 | recommend songs that are similar to the ones the user is listening to.
16 |
17 | By the end of this section, you'll know how to:
18 |
19 | * Find suitable pre-trained models for audio classification tasks
20 | * Use the 🤗 Datasets library and the Hugging Face Hub to select audio classification datasets
21 | * Fine-tune a pretrained model to classify songs by genre
22 | * Build a Gradio demo that lets you classify your own songs
23 |
--------------------------------------------------------------------------------
/chapters/en/chapter5/hands_on.mdx:
--------------------------------------------------------------------------------
1 | # Hands-on exercise
2 |
3 | In this unit, we explored the challenges of fine-tuning ASR models, acknowledging the time and resources required to
4 | fine-tune a model like Whisper (even a small checkpoint) on a new language. To provide a hands-on experience, we have
5 | designed an exercise that allows you to navigate the process of fine-tuning an ASR model while using a smaller dataset.
6 | The main goal of this exercise is to familiarize you with the process rather than expecting production-level results.
7 | We have intentionally set a low metric to ensure that even with limited resources, you should be able to achieve it.
8 |
9 | Here are the instructions:
10 | * Fine-tune the `”openai/whisper-tiny”` model using the American English ("en-US") subset of the `”PolyAI/minds14”` dataset.
11 | * Use the first **450 examples for training**, and the rest for evaluation. Ensure you set `num_proc=1` when pre-processing the dataset using the `.map` method (this will ensure your model is submitted correctly for assessment).
12 | * To evaluate the model, use the `wer` and `wer_ortho` metrics as described in this Unit. However, *do not* convert the metric into percentages by multiplying by 100 (E.g. if WER is 42%, we’ll expect to see the value of 0.42 in this exercise).
13 |
14 | Once you have fine-tuned a model, make sure to upload it to the 🤗 Hub with the following `kwargs`:
15 | ```
16 | kwargs = {
17 | "dataset_tags": "PolyAI/minds14",
18 | "finetuned_from": "openai/whisper-tiny",
19 | "tasks": "automatic-speech-recognition",
20 | }
21 | ```
22 | You will pass this assignment if your model’s normalised WER (`wer`) is lower than **0.37**.
23 |
24 | Feel free to build a demo of your model, and share it on Discord! If you have questions, post them in the #audio-study-group channel.
25 |
--------------------------------------------------------------------------------
/chapters/en/chapter5/introduction.mdx:
--------------------------------------------------------------------------------
1 | # What you'll learn and what you'll build
2 |
3 | In this section, we’ll take a look at how Transformers can be used to convert spoken speech into text, a task known _speech recognition_.
4 |
5 |
6 |

7 |
8 |
9 | Speech recognition, also known as automatic speech recognition (ASR) or speech-to-text (STT), is one of the most popular
10 | and exciting spoken language processing tasks. It’s used in a wide range of applications, including dictation, voice assistants,
11 | video captioning and meeting transcriptions.
12 |
13 | You’ve probably made use of a speech recognition system many times before without realising! Consider the digital
14 | assistant in your smartphone device (Siri, Google Assistant, Alexa). When you use these assistants, the first thing that
15 | they do is transcribe your spoken speech to written text, ready to be used for any downstream tasks (such as finding you
16 | the weather 🌤️).
17 |
18 | Have a play with the speech recognition demo below. You can either record yourself using your microphone, or drag and
19 | drop an audio sample for transcription:
20 |
21 |
22 |
23 | Speech recognition is a challenging task as it requires joint knowledge of audio and text. The input audio might have
24 | lots of background noise and be spoken by speakers with different accents, making it difficult to pick out the spoken
25 | speech. The written text might have characters which don’t have an acoustic sound, such as punctuation, which are difficult
26 | to infer from audio alone. These are all hurdles we have to tackle when building effective speech recognition systems!
27 |
28 | Now that we’ve defined our task, we can begin looking into speech recognition in more detail. By the end of this Unit,
29 | you'll have a good fundamental understanding of the different pre-trained speech recognition models available and how to
30 | use them with the 🤗 Transformers library. You'll also know the procedure for fine-tuning an ASR model on a domain or
31 | language of choice, enabling you to build a performant system for whatever task you encounter. You'll be able to showcase
32 | your model to your friends and family by building a live demo, one that takes any spoken speech and converts it to text!
33 |
34 | Specifically, we’ll cover:
35 |
36 | * [Pre-trained models for speech recognition](asr_models)
37 | * [Choosing a dataset](choosing_dataset)
38 | * [Evaluation and metrics for speech recognition](evaluation)
39 | * [How to fine-tune an ASR system with the Trainer API](fine-tuning)
40 | * [Building a demo](demo)
41 | * [Hands-on exercise](hands_on)
42 |
--------------------------------------------------------------------------------
/chapters/en/chapter5/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # Supplemental reading and resources
2 |
3 | This unit provided a hands-on introduction to speech recognition, one of the most popular tasks in the audio domain.
4 | Want to learn more? Here you will find additional resources that will help you deepen your understanding of the topics and
5 | enhance your learning experience.
6 |
7 | * [Whisper Talk](https://www.youtube.com/live/fZMiD8sDzzg?feature=share) by Jong Wook Kim: a presentation on the Whisper model, explaining the motivation, architecture, training and results, delivered by Whisper author Jong Wook Kim
8 | * [End-to-End Speech Benchmark (ESB)](https://arxiv.org/abs/2210.13352): a paper that comprehensively argues for using the orthographic WER as opposed to the normalised WER for evaluating ASR systems and presents an accompanying benchmark
9 | * [Fine-Tuning Whisper for Multilingual ASR](https://huggingface.co/blog/fine-tune-whisper): an in-depth blog post that explains how the Whisper model works in more detail, and the pre- and post-processing steps involved with the feature extractor and tokenizer
10 | * [Fine-tuning MMS Adapter Models for Multi-Lingual ASR](https://huggingface.co/blog/mms_adapters): an end-to-end guide for fine-tuning Meta AI's new [MMS](https://ai.facebook.com/blog/multilingual-model-speech-recognition/) speech recognition models, freezing the base model weights and only fine-tuning a small number of *adapter* layers
11 | * [Boosting Wav2Vec2 with n-grams in 🤗 Transformers](https://huggingface.co/blog/wav2vec2-with-ngram): a blog post for combining CTC models with external language models (LMs) to combat spelling and punctuation errors
12 |
--------------------------------------------------------------------------------
/chapters/en/chapter6/evaluation.mdx:
--------------------------------------------------------------------------------
1 | # Evaluating text-to-speech models
2 |
3 | During the training time, text-to-speech models optimize for the mean-square error loss (or mean absolute error) between
4 | the predicted spectrogram values and the generated ones. Both MSE and MAE encourage the model to minimize the difference
5 | between the predicted and target spectrograms. However, since TTS is a one-to-many mapping problem, i.e. the output spectrogram for a given text can be represented in many different ways, the evaluation of the resulting text-to-speech (TTS) models is much
6 | more difficult.
7 |
8 | Unlike many other computational tasks that can be objectively
9 | measured using quantitative metrics, such as accuracy or precision, evaluating TTS relies heavily on subjective human analysis.
10 |
11 | One of the most commonly employed evaluation methods for TTS systems is conducting qualitative assessments using mean
12 | opinion scores (MOS). MOS is a subjective scoring system that allows human evaluators to rate the perceived quality of
13 | synthesized speech on a scale from 1 to 5. These scores are typically gathered through listening tests, where human
14 | participants listen to and rate the synthesized speech samples.
15 |
16 | One of the main reasons why objective metrics are challenging to develop for TTS evaluation is the subjective nature of
17 | speech perception. Human listeners have diverse preferences and sensitivities to various aspects of speech, including
18 | pronunciation, intonation, naturalness, and clarity. Capturing these perceptual nuances with a single numerical value
19 | is a daunting task. At the same time, the subjectivity of the human evaluation makes it challenging to compare and
20 | benchmark different TTS systems.
21 |
22 | Furthermore, this kind of evaluation may overlook certain important aspects of speech synthesis, such as naturalness,
23 | expressiveness, and emotional impact. These qualities are difficult to quantify objectively but are highly relevant in
24 | applications where the synthesized speech needs to convey human-like qualities and evoke appropriate emotional responses.
25 |
26 | In summary, evaluating text-to-speech models is a complex task due to the absence of one truly objective metric. The most common
27 | evaluation method, mean opinion scores (MOS), relies on subjective human analysis. While MOS provides valuable insights
28 | into the quality of synthesized speech, it also introduces variability and subjectivity.
29 |
--------------------------------------------------------------------------------
/chapters/en/chapter6/hands_on.mdx:
--------------------------------------------------------------------------------
1 | # Hands-on exercise
2 |
3 | In this unit, we have explored text-to-speech audio task, talked about existing datasets, pretrained
4 | models and nuances of fine-tuning SpeechT5 for a new language.
5 |
6 | As you've seen, fine-tuning models for text-to-speech task can be challenging in low-resource scenarios. At the same time,
7 | evaluating text-to-speech models isn't easy either.
8 |
9 | For these reasons, this hands-on exercise will focus on practicing the skills rather than achieving a certain metric value.
10 |
11 | Your objective for this task is to fine-tune SpeechT5 on a dataset of your choosing. You have the freedom to select
12 | another language from the same `voxpopuli` dataset, or you can pick any other dataset listed in this unit.
13 |
14 | Be mindful of the training data size! For training on a free tier GPU from Google Colab, we recommend limiting the training
15 | data to about 10-15 hours.
16 |
17 | Once you have completed the fine-tuning process, share your model by uploading it to the Hub. Make sure to tag your model
18 | as a `text-to-speech` model either with appropriate kwargs, or in the Hub UI.
19 |
20 | Remember, the primary aim of this exercise is to provide you with ample practice, allowing you to refine your skills and
21 | gain a deeper understanding of text-to-speech audio tasks.
22 |
--------------------------------------------------------------------------------
/chapters/en/chapter6/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Unit 6. From text to speech
2 |
3 | In the previous unit, you learned how to use Transformers to convert spoken speech into text. Now let's flip the
4 | script and see how you can transform a given input text into an audio output that sounds like human speech.
5 |
6 | The task we will study in this unit is called "Text-to-speech" (TTS). Models capable of converting text into audible
7 | human speech have a wide range of potential applications:
8 |
9 | * Assistive apps: think about tools that can leverage these models to enable visually-impaired people to access digital content through the medium of sound.
10 | * Audiobook narration: converting written books into audio form makes literature more accessible to individuals who prefer to listen or have difficulty with reading.
11 | * Virtual assistants: TTS models are a fundamental component of virtual assistants like Siri, Google Assistant, or Amazon Alexa. Once they have used a classification model to catch the wake word, and used ASR model to process your request, they can use a TTS model to respond to your inquiry.
12 | * Entertainment, gaming and language learning: give voice to your NPC characters, narrate game events, or help language learners with examples of correct pronunciation and intonation of words and phrases.
13 |
14 | These are just a few examples, and I am sure you can imagine many more! However, with so much power comes the responsibility,
15 | and it is important to highlight that TTS models have the potential to be used for malicious purposes.
16 | For example, with sufficient voice samples, malicious actors could potentially create convincing fake audio recordings, leading to
17 | the unauthorized use of someone's voice for fraudulent purposes or manipulation. If you plan to collect data for fine-tuning
18 | your own systems, carefully consider privacy and informed consent. Voice data should be obtained with explicit consent
19 | from individuals, ensuring they understand the purpose, scope, and potential risks associated with their voice being used
20 | in a TTS system. Please use text-to-speech responsibly.
21 |
22 | ## What you'll learn and what you'll build
23 |
24 | In this unit we will talk about:
25 |
26 | * [Datasets suitable for text-to-speech training](tts_datasets)
27 | * [Pre-trained models for text-to-speech](pre-trained_models)
28 | * [Fine-tuning SpeechT5 on a new language](fine-tuning)
29 | * [Evaluating TTS models](evaluation)
30 |
--------------------------------------------------------------------------------
/chapters/en/chapter6/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # Supplemental reading and resources
2 |
3 | This unit introduced the text-to-speech task, and covered a lot of ground.
4 | Want to learn more? Here you will find additional resources that will help you deepen your understanding of the topics
5 | and enhance your learning experience.
6 |
7 | * [HiFi-GAN: Generative Adversarial Networks for Efficient and High Fidelity Speech Synthesis](https://arxiv.org/pdf/2010.05646.pdf): a paper introducing HiFi-GAN for speech synthesis.
8 | * [X-Vectors: Robust DNN Embeddings For Speaker Recognition](https://www.danielpovey.com/files/2018_icassp_xvectors.pdf): a paper introducing X-Vector method for speaker embeddings.
9 | * [FastSpeech 2: Fast and High-Quality End-to-End Text to Speech](https://arxiv.org/pdf/2006.04558.pdf): a paper introducing FastSpeech 2, another popular text-to-speech model that uses a non-autoregressive TTS method.
10 | * [A Vector Quantized Approach for Text to Speech Synthesis on Real-World Spontaneous Speech](https://arxiv.org/pdf/2302.04215v1.pdf): a paper introducing MQTTS, an autoregressive TTS system that replaces mel-spectrograms with quantized discrete representation.
11 |
--------------------------------------------------------------------------------
/chapters/en/chapter7/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Unit 7. Putting it all together 🪢
2 |
3 | Well done on making it to Unit 7 🥳 You're just a few steps away from completing the course and acquiring the final few
4 | skills you need to navigate the field of Audio ML. In terms of understanding, you already know everything there is to know!
5 | Together, we've comprehensively covered the main topics that constitute the audio domain and their accompanying theory
6 | (audio data, audio classification, speech recognition and text-to-speech). What this Unit aims to deliver is a framework
7 | for **putting it all together**: now that you know how each of these tasks work in isolation, we're going to explore how
8 | you can combine them together to build some real-world applications.
9 |
10 | ## What you'll learn and what you'll build
11 |
12 | In this Unit, we'll cover the following three topics:
13 |
14 | * [Speech-to-speech translation](speech-to-speech): translate speech from one language into speech in a different language
15 | * [Creating a voice assistant](voice-assistant): build your own voice assistant that works in a similar way to Alexa or Siri
16 | * [Transcribing meetings](transcribe-meeting): transcribe a meeting and label the transcript with who spoke when
17 |
--------------------------------------------------------------------------------
/chapters/en/chapter7/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # Supplemental reading and resources
2 |
3 | This Unit pieced together many components from previous units, introducing the tasks of speech-to-speech translation,
4 | voice assistants and speaker diarization. The supplemental reading material is thus split into these three new tasks
5 | for your convenience:
6 |
7 | Speech-to-speech translation:
8 | * [STST with discrete units](https://ai.facebook.com/blog/advancing-direct-speech-to-speech-modeling-with-discrete-units/) by Meta AI: a direct approach to STST through encoder-decoder models
9 | * [Hokkien direct speech-to-speech translation](https://ai.facebook.com/blog/ai-translation-hokkien/) by Meta AI: a direct approach to STST using encoder-decoder models with a two-stage decoder
10 | * [Leveraging unsupervised and weakly-supervised data to improve direct STST](https://arxiv.org/abs/2203.13339) by Google: proposes new approaches for leveraging unsupervised and weakly supervised data for training direct STST models and a small change to the Transformer architecture
11 | * [Translatotron-2](https://google-research.github.io/lingvo-lab/translatotron2/) by Google: a system that is able to retain speaker characteristics in translated speech
12 |
13 | Voice Assistant:
14 | * [Accurate wakeword detection](https://www.amazon.science/publications/accurate-detection-of-wake-word-start-and-end-using-a-cnn) by Amazon: a low latency approach for wakeword detection for on-device applications
15 | * [RNN-Transducer Architecture](https://arxiv.org/pdf/1811.06621.pdf) by Google: a modification to the CTC architecture for streaming on-device ASR
16 |
17 | Meeting Transcriptions:
18 | * [pyannote.audio Technical Report](https://huggingface.co/pyannote/speaker-diarization/blob/main/technical_report_2.1.pdf) by Hervé Bredin: this report describes the main principles behind the `pyannote.audio` speaker diarization pipeline
19 | * [Whisper X](https://arxiv.org/pdf/2303.00747.pdf) by Max Bain et al.: a superior approach to computing word-level timestamps using the Whisper model
--------------------------------------------------------------------------------
/chapters/en/chapter8/certification.mdx:
--------------------------------------------------------------------------------
1 | # Get your certificate of completion
2 |
3 | The certification process is completely free.
4 | * To get a certificate of completion: you need to pass 3 out of 4 hands-on assignments.
5 | * To get a certificate of excellence: you need to pass 4 out of 4 hands-on assignments.
6 |
7 | The requirements for each assignment are listed in the respective units:
8 | * [Unit 4 Hands-on](../chapter4/hands_on)
9 | * [Unit 5 Hands-on](../chapter5/hands_on)
10 | * [Unit 6 Hands-on](../chapter6/hands_on)
11 | * [Unit 7 Hands-on](../chapter7/hands_on)
12 |
13 | For the assignments that require to train a model, make sure to push your model that meets the requirements to Hub with relevant `kwargs`.
14 | For the demo assignment in Unit 7, make sure that your demo is `public`.
15 |
16 | For self-evaluation and to see what units you passed/not passed, you can use the following space:
17 | [Check My Progress - Audio Course](https://huggingface.co/spaces/MariaK/Check-my-progress-Audio-Course)
18 |
19 | Once you qualify for a certificate, go to the [Audio Course Certification](https://huggingface.co/spaces/MariaK/Audio-Course-Certification) space.
20 | This space implements additional checks to ensure your submissions meet the assessment criteria.
21 |
22 | Type your Hugging Face username, your first name, last name in the text fields and click on the "Check if I pass and get the certificate" button.
23 |
24 | If you passed 3 out of 4 hands-on assignments, you will receive the certificate of completion.
25 | If you passed 4 out of 4 hands-on assignments, you will receive the certificate of excellence.
26 |
27 | You can download your certificate in pdf format and png format. Don't hesitate to share your certificate on Twitter
28 | (tag me @mariakhalusova and @huggingface) and on LinkedIn.
29 |
30 | If you do not meet the certification criteria, don't be discouraged! Go back to the
31 | [Check My Progress - Audio Course](https://huggingface.co/spaces/MariaK/Check-my-progress-Audio-Course) space to see which
32 | units you need to do again to get your certificate. If you are experiencing any issue with either of the spaces,
33 | let us know!
34 |
--------------------------------------------------------------------------------
/chapters/en/chapter8/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Congratulations!
2 |
3 | You have worked hard to reach this point, and we'd like to congratulate you on completing this Audio course!
4 |
5 | Throughout this course, you gained foundational understanding of audio data, explored new concepts, and developed
6 | practical skills working with Audio Transformers.
7 |
8 | From the basics of working with audio data and pre-trained checkpoints via pipelines, to building real-world
9 | audio applications, you have discovered how you can build systems that can not only understand sound but also create it.
10 |
11 | As this field is dynamic and ever-evolving, we encourage you to stay curious and continuously explore new models, research
12 | advancements, and new applications. When building your own new and exciting audio applications, make sure to always keep
13 | ethical implications in mind, and carefully consider the potential impact on individuals and society as a whole.
14 |
15 | Thank you for joining this audio course, we hope you thoroughly enjoyed this educational experience, as
16 | much as we relished crafting it. Your feedback and contributions are welcome in
17 | the [course GitHub repo](https://github.com/huggingface/audio-transformers-course).
18 |
19 | To learn how you can obtain your well-deserved certificate of completion, if you successfully passed the hands-on assignments,
20 | check out the [next page](certification).
21 |
22 | Finally, to stay connected with the Audio Course Team, you can follow us on Twitter:
23 |
24 | * Maria Khalusova: [@mariakhalusova](https://twitter.com/mariaKhalusova)
25 | * Sanchit Gandhi: [@sanchitgandhi99](https://twitter.com/sanchitgandhi99)
26 | * Matthijs Hollemans: [@mhollemans](https://twitter.com/mhollemans)
27 | * Vaibhav (VB) Srivastav: [@reach_vb](https://twitter.com/reach_vb)
28 |
29 | Stay curious and train Transformers! :)
30 |
--------------------------------------------------------------------------------
/chapters/en/events/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Live sessions and workshops
2 |
3 | New Audio Transformers Course: Live Launch Event with Paige Bailey (DeepMind), Seokhwan Kim (Amazon Alexa AI), and Brian McFee (Librosa)
4 |
5 |
6 |
7 | The recording of a Live AMA with the Hugging Face Audio course team:
8 |
9 |
10 |
--------------------------------------------------------------------------------
/chapters/es/chapter0/community.mdx:
--------------------------------------------------------------------------------
1 | # ¡Únete a la comunidad!
2 |
3 | Te invitamos a [unirte a nuestra comunidad dinámica y amigable en Discord](http://hf.co/join/discord). Tendrás la oportunidad de conectar
4 | con estudiantes con intereses similares, intercambiar ideas y obtener retroalimentación valiosa en los ejercicios prácticos. Puedes hacer
5 | tus preguntas, compartir recursos y colaborar con otros.
6 |
7 | Nuestro equipo también está activo en Discord y estará disponible para brindarte apoyo y orientación cuando lo necesites.
8 | Unirte a nuestra comunidad es una excelente manera de mantenerte motivado, activo y conectado,
9 | ¡Esperamos verte allí!
10 |
11 | ## ¿Qué es Discord?
12 |
13 | Discord es una plataforma gratuita de chat. Si has usado Slack, lo encontrarás bastante similar.
14 | El servidor de Discord de Hugging Face es el hogar de una próspera comunidad de 18 000 expertos en IA,
15 | estudiantes y entusiastas, a la cual puedes unirte.
16 |
17 | ## Navegando en Discord
18 |
19 | Una vez que te hayas registrado en nuestro servidor de Discord, deberás elegir los temas que te interesan haciendo clic en #role-assignment
20 | ubicado la izquierda. Puedes elegir tantas categorías diferentes como desees. Para unirte a otros estudiantes de este curso, asegúrate de hacer
21 | clic en "ML for Audio and Speech".
22 | Explora los canales y comparte algunas cosas sobre ti en el canal `#introduce-yourself`.
23 |
24 | ## Canales del curso de audio
25 |
26 | Hay muchos canales enfocados en varios temas en nuestro servidor de Discord. Encontrarás a personas discutiendo artículos, organizando eventos,
27 | compartiendo sus proyectos e ideas, haciendo lluvia de ideas y mucho más.
28 |
29 | Como estudiante del curso de audio, es posible que encuentres especialmente relevantes los siguientes canales:
30 |
31 | * `#audio-announcements`: actualizaciones sobre el curso, noticias de Hugging Face relacionadas con todo lo relacionado con el audio, anuncios de eventos y más.
32 | * `#audio-study-group`: un lugar para intercambiar ideas, hacer preguntas sobre el curso e iniciar discusiones.
33 | * `#audio-discuss`: un lugar general para tener discusiones sobre temas relacionados con el audio.
34 |
35 | Además de unirte al `#audio-study-group`, ¡siéntete libre de crear tu propio grupo de estudio, aprender juntos siempre es más fácil!
36 |
--------------------------------------------------------------------------------
/chapters/es/chapter0/get_ready.mdx:
--------------------------------------------------------------------------------
1 | # Prepárate para tomar el curso
2 |
3 | Esperamos que estes emocionado de empezar este curso, hemos diseñado esta página para asegurarnos que ¡tienes
4 | todo para comenzar!
5 |
6 | ## Paso 1. Suscríbete.
7 |
8 | Para estar al tanto de todas las actualizaciones y los eventos sociales, suscríbete al curso.
9 |
10 | [👉 SUSCRIBETE](http://eepurl.com/insvcI)
11 |
12 | ## Paso 2. Crea una cuenta de Hugging Face.
13 |
14 | Si aún no tienes una, crea una cuenta de Hugging Face (Es gratis). La necesitarás para completar los ejercicios
15 | prácticos, para recibir el certificado de finalización, explorar modelos pre-entrenados, acceder a conjuntos de datos y mucho más.
16 |
17 | [👉 CREA TU CUENTA DE HUGGING FACE](https://huggingface.co/join)
18 |
19 | ## Paso 3. Repasa los fundamentos (si lo necesitas)
20 |
21 | Asumimos que estas familiarizado con los conceptos básicos de deep learning y transformers. Si necesitas afianzar tu
22 | comprensión de transformers, mira nuestro [Curso de NLP](https://huggingface.co/course/chapter1/1).
23 |
24 | ## Paso 4. Revisa tu setup
25 |
26 | Para realizar el curso necesitarás:
27 | - Un computadot con conexión a internet.
28 | - [Google Colab](https://colab.research.google.com) para los ejercicios prácticos. La versión gratuita es suficiente.
29 |
30 | Si nunca has usado Google Colab antes, revisa la [introducción oficial](https://colab.research.google.com/notebooks/intro.ipynb).
31 |
32 | ## Paso 5. Únete a la comunidad.
33 |
34 | Suscríbete a nuestro servidor de Discord, el lugar donde puedes intercambiar tus ideas con tus compañeros de curso y conctactar con nosotros (El equipo de Hugging Face).
35 |
36 | [👉 UNETE A LA COMUNIDAD DE DISCORD](http://hf.co/join/discord)
37 |
38 | para aprender más acerda de nuestra comuninda en Discord y como sacar el mayor provecho, Mira la [siguiente página](community)
39 |
40 |
--------------------------------------------------------------------------------
/chapters/es/chapter1/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Unidad 1. Trabajando con datos de audio
2 |
3 | ## ¿Qué aprenderás?
4 |
5 | Cada tarea de audio o voz empieza con un archivo de audio. Antes de poder resolver estas tareas, es importante
6 | que comprendas que tipo de información contienen estos archivos y como trabajar con ellos.
7 |
8 | En esta unidad, entenderás la terminología fundamental relacionada con los datos de audio, incluyendo formas de onda,
9 | frecuencia de muestreo y espectrograma. Tambien aprenderas como trabajar con bases de datos de audio, lo que incluye
10 | cargar y preprocesar datos de audio y como trabajar en modo streaming con una base de datos grande de manera eficiente.
11 |
12 | Al finalizar esta unidad, tendrás un sólido conocimiento de la terminología esencial de los datos de audio y estarás equipado
13 | con las habilidades necesarias para trabajar con conjuntos de datos de audio en diversas aplicaciones. El conocimiento que adquirirás
14 | en esta unidad sentará las bases para comprender el resto del curso.
--------------------------------------------------------------------------------
/chapters/es/chapter1/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # Sigue aprendiendo
2 |
3 | Esta unidad abarcó muchos conceptos fundamentales que son relevantes para entender los datos de audio y trabajar con ellos.
4 | ¿Quieres aprender más? Aquí encontraras recursos adicionales que te ayudaran a profundizar en tu entendimiento de los temas
5 | y mejorará tu experiencia de aprendizaje.
6 |
7 | En el siguiente video, Monty Montgomery de xiph.org presenta demonstraciones en tiempo real de sampleo, cuantización,
8 | profundidad en bits, dither y equipamiento de audio usando tanto herramientas digitales de analisis modernas como equipo vintage,
9 | Dale un vistazo:
10 |
11 |
12 |
13 | Si deseas adentrarte más en el procesamiento digital de señales, echa un vistazo al libro gratuito ["Digital Signals Theory" book](https://brianmcfee.net/dstbook-site/content/intro.html)
14 | escrito por Brian McFee, Profesor Asistente de Tecnología Musical y Ciencia de Datos en la Universidad de Nueva York y
15 | principal mantenedor del paquete `librosa`.
16 |
17 |
18 |
--------------------------------------------------------------------------------
/chapters/es/chapter2/hands_on.mdx:
--------------------------------------------------------------------------------
1 | # Ejercicio práctico
2 |
3 | Este ejericio no es calificable y esta pensado para ayudarte a familiarizar con las herramientas y librerias que estaras usando a traves del curso. Si ya tienes experiencia al usar Google Colab, 🤗 Datasets, librosa y 🤗 Transformers, puedes saltar este ejercicio.
4 |
5 | 1. Crea un cuaderno de [Google Colab](https://colab.research.google.com)
6 | 2. Usa para descargar la partición train de [`facebook/voxpopuli` dataset](https://huggingface.co/datasets/facebook/voxpopuli) en el idioma de tu elección usando el modo de transmisión(streaming).
7 | 3. Obten el tercer ejemplo del subconjunto `train` y exploralo. Dadas las caracteristicas que tiene este ejemplo, ¿En cuales tareas de audio puedes usar este dataset?
8 | 4. Gráfica la forma de onda y el espectrograma.
9 | 5. Ve al [🤗 Hub](https://huggingface.co/models), y explora modelos pre-entrenados que puedan ser usados para el reconocimiento automático de la voz en el idioma de tu elección.
10 | 6. Compara la transcripción que obtienes de la pipeline con la transcripción original.
11 |
12 | Si tienes problemas completando este ejercicio, puedes mirar la [solución](https://colab.research.google.com/drive/1NGyo5wFpRj8TMfZOIuPaJHqyyXCITftc?usp=sharing).
13 | ¿Has descubierto algo interesante? ¿Encontraste un buen modelo? ¿Obtuviste un bello espectrograma? Comparte tus descubrimientos en Twitter.
14 |
15 | En el siguiente capitulo aprenderás mas acerca de las arquitecturas para audio de transformers y entrenaras tu propio modelo
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/chapters/es/chapter2/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Unidad 2. Una introducción amigable a las aplicaciones de audio
2 |
3 | Bienvenido a la segunda unidad del curso de audio de Hugging Face¡, Anteriormente, exploramos los conceptos fundamentales
4 | de los datos de audio y aprendimo como trabajar con conjuntos de datos de audio usando las librerias 🤗 Datasets y 🤗 Transformers.
5 | Discutimos diferentes conceptos como frecuencia de muestreo, amplitud, profundidad de bits, forma de onda y espectrogramas, y vimos
6 | como preprocesar datos para un modelo pre-entrenado.
7 |
8 | En este punto quiza estes ansioso por aprender acerca de las tareas de audio que 🤗 Transformers puede realizar, y ahora que tienes
9 | los conocimientos fundamentales para comprenderlo todo, echemos un vistazo a unos impresionantes ejemplos de aplicaciones de audio.
10 |
11 | * **Clasificación de Audio**: Categorizar facilmente un clip de audio. Puedes identificar si una grabación es de un ladrido de un perro
12 | o un maullido de gato, o a que género corresponde una cación.
13 | * **Reconocimiento automático de voz**: Transformar un clip de audio en texto a traves de una transcripción automática. Puedes obtener
14 | la representación en texto de una grabación en donde alguien habla. Muy útil para tomar notas!
15 | * **Diarización de hablantes** Alguna vez te has preguntado ¿Quién habla en una grabación? con 🤗 Transformers, puedes identificar
16 | que persona esta hablando en un determinado tiempo del clip de audio. Imaginate ser capaz de de diferencias entre "Alice" y "Bob"
17 | en una grabación en donde ambos estan teniendo una conversación.
18 | * **Texto a voz**: Crear una narración a partir de un texto que puede ser usada para crear un audio book, ayuda con la accesibilidad,
19 | o le da la voz a un NPC en un juego. con 🤗 Transformers puedes hacer facilmente esto
20 |
21 | En esta unidad, tu aprenderas como usar modelos pre entrenados para algunas de estas tareas usando la función `pipeline()` de 🤗 Transformers.
22 | Especificamente, veremos como usar modelos pre-entrenados para las tareas de clasificación de audio y reconocimiento automático de la voz.
23 | Comencemos!
24 |
25 |
26 |
--------------------------------------------------------------------------------
/chapters/fr/chapter0/community.mdx:
--------------------------------------------------------------------------------
1 | # Rejoignez la communauté !
2 |
3 | Nous vous invitons à [rejoindre notre communauté sur Discord](http://hf.co/join/discord). Vous aurez la possibilité d'échanger avec des apprenants, de partager des idées et d'obtenir un retour d'information précieux sur vos exercices pratiques. Vous pouvez poser des questions, partager des ressources et collaborer avec d'autres.
4 |
5 | Notre équipe est également active sur Discord et se tient à votre disposition pour vous apporter son soutien et ses conseils en cas de besoin. Rejoindre notre communauté est un excellent moyen de rester motivé, engagé et connecté, et nous avons hâte de vous y voir !
6 |
7 | ## Qu'est-ce que Discord ?
8 |
9 | Discord est une plateforme de chat gratuite. Si vous avez utilisé Slack, vous la trouverez assez similaire. Le serveur Discord d'Hugging Face abrite une communauté florissante de 18 000 experts, apprenants et passionnés d'IA dont vous pouvez faire partie.
10 |
11 | ## Naviguer sur Discord
12 |
13 | Une fois inscrit à notre serveur Discord, vous devrez choisir les sujets qui vous intéressent en cliquant sur `#role-assignment` à gauche. Vous pouvez choisir autant de catégories différentes que vous le souhaitez. Pour rejoindre d'autres apprenants de ce cours, assurez-vous de cliquer sur "ML for Audio and Speech".
14 | Explorez les canaux et présentez-vous dans le canal `#introduce-yourself`.
15 |
16 | ## Canaux du cours
17 |
18 | Il existe de nombreux canaux axés sur différents sujets sur notre serveur Discord. Vous y trouverez des gens qui discutent d'articles, organisent des événements, partagent leurs projets et leurs idées, font du *brainstorming*, et bien plus encore.
19 |
20 | En tant qu'apprenant du cours audio, vous trouverez peut-être les canaux suivants particulièrement pertinents :
21 | * `#audio-announcements` : mises à jour sur le cours, nouvelles de Hugging Face en rapport avec tout ce qui concerne l'audio, annonces d'événements, et plus encore.
22 | * `#audio-study-group` : un lieu pour échanger des idées, poser des questions sur le cours et entamer des discussions.
23 | * `#audio-discuss` : un endroit général pour discuter de tout ce qui concerne l'audio.
24 |
25 | En plus de rejoindre le canal `#audio-study-group`, n'hésitez pas à créer votre propre groupe d'étude, apprendre ensemble est toujours plus facile !
--------------------------------------------------------------------------------
/chapters/fr/chapter0/get_ready.mdx:
--------------------------------------------------------------------------------
1 | # Se préparer à suivre le cours
2 |
3 | Nous espérons que vous êtes impatient de commencer le cours, et nous avons conçu cette page pour nous assurer que vous avez tout ce dont vous avez besoin pour vous lancer !
4 |
5 | ## Étape 1. Avoir un compte Hugging Face
6 |
7 | Si vous n'en avez pas encore, créez [un compte Hugging Face](https://huggingface.co/join) (c'est gratuit). Vous en aurez besoin pour effectuer des tâches pratiques, pour recevoir votre certificat d'achèvement, pour explorer des modèles pré-entraînés, pour accéder à des jeux de données et plus encore.
8 |
9 | ## Étape 2. Révisez les principes fondamentaux (si vous en avez besoin).
10 |
11 | Nous supposons que vous connaissez les bases de l'apprentissage profond et que vous êtes familiarisés avec les *transformers*. Si vous avez besoin de rafraîchir vos connaissances sur ces modèles, consultez notre [cours sur le NLP](https://huggingface.co/course/fr/chapter1/1).
12 |
13 | ## Étape 3. Vérifiez votre configuration
14 |
15 | Pour parcourir les supports de cours, vous aurez besoin des éléments suivants :
16 | - Un ordinateur avec une connexion Internet
17 | - [Google Colab](https://colab.research.google.com) pour les exercices pratiques. La version gratuite suffit.
18 |
19 | Si vous n'avez jamais utilisé Google Colab, consultez ce *notebook* d'introduction officiel (https://colab.research.google.com/notebooks/intro.ipynb).
20 |
21 | ## Étape 4. Rejoignez la communauté
22 |
23 | Inscrivez-vous sur notre serveur [Discord](http://hf.co/join/discord), l'endroit où vous pouvez échanger des idées avec vos camarades de classe et nous contacter (l'équipe d'Hugging Face).
24 | Pour en savoir plus sur notre Discord et comment en tirer le meilleur parti, consultez la [page suivante](community).
--------------------------------------------------------------------------------
/chapters/fr/chapter1/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Unité 1 : Travailler avec des données audio
2 |
3 | ## Ce que vous apprendrez dans cette unité
4 |
5 | Chaque tâche audio ou vocale commence par un fichier audio. Avant de pouvoir résoudre ces tâches, il est important de comprendre ce que ces fichiers contiennent réellement et comment les utiliser.
6 |
7 | Dans cette unité, vous acquerrez une compréhension de la terminologie fondamentale liée aux données audio, notamment la forme d'onde, la fréquence d'échantillonnage et le spectrogramme. Vous apprendrez également à travailler avec des jeux de données audio, y compris le chargement et le prétraitement des données audio, et à streamer efficacement de grands jeux de données.
8 |
9 | À la fin de cette unité, vous maîtriserez la terminologie essentielle des données audio et serez équipé des compétences nécessaires pour travailler avec des jeux de données audio pour diverses applications. Les connaissances issues de cette unité vont jeter les bases de la compréhension du reste du cours.
--------------------------------------------------------------------------------
/chapters/fr/chapter1/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # En apprendre encore plus
2 |
3 | Cette unité couvre de nombreux concepts fondamentaux permettant de comprendre les données audio et de travailler avec elles.
4 | Vous voulez en savoir plus ? Vous trouverez ici des ressources supplémentaires qui vous aideront à approfondir votre compréhension des sujets et à améliorer votre expérience d'apprentissage.
5 |
6 | Dans la vidéo suivante, Monty Montgomery de xiph.org présente une démonstration en temps réel de l'échantillonnage, de la quantification, la profondeur de bits et le dither sur un équipement audio réel en utilisant à la fois une analyse numérique moderne et un équipement analogique vintage, regardez-la :
7 |
8 |
9 |
10 | Si vous souhaitez approfondir le traitement des signaux numériques, consultez le livre gratuit (en anglais) [*Digital Signals Theory*](https://brianmcfee.net/dstbook-site/content/intro.html) écrit par Brian McFee, professeur assistant de technologie musicale et de science des données à l'Université de New York et principal responsable de `librosa`.
--------------------------------------------------------------------------------
/chapters/fr/chapter2/hands_on.mdx:
--------------------------------------------------------------------------------
1 | # Exercice pratique
2 |
3 | Cet exercice n'est pas noté et a pour but de vous aider à vous familiariser avec les outils et les bibliothèques que vous utiliserez pendant le reste du cours. Si vous avez déjà l'habitude d'utiliser Google Colab, 🤗 *Datasets*, librosa et 🤗 *Transformers*, vous pouvez choisir de passer cet exercice.
4 |
5 | 1. Créez un *notebook* [Google Colab](https://colab.research.google.com).
6 | 2. Utilisez 🤗 *Datasets* pour charger le split d'entraînement du jeu de données [`facebook/voxpopuli`](https://huggingface.co/datasets/facebook/voxpopuli) dans la langue de votre choix en mode streaming.
7 | 3. Récupérez le troisième exemple de la partie `train` du jeu de données et explorez-le. Compte tenu des caractéristiques de cet exemple, pour quels types de tâches audio pouvez-vous utiliser ce jeu de données ?
8 | 4. Tracez la forme d'onde et le spectrogramme de cet exemple.
9 | 5. Allez sur le [🤗 *Hub*](https://huggingface.co/models), explorez les modèles pré-entraînés et trouvez-en un qui peut être utilisé pour la reconnaissance automatique de la parole dans la langue que vous avez choisie plus tôt. Instanciez un pipeline correspondant avec le modèle que vous avez trouvé, et transcrivez l'exemple.
10 | 6. Comparez la transcription que vous obtenez du pipeline à la transcription fournie dans l'exemple.
11 |
12 | Si cet exercice vous pose problème, n'hésitez pas à jeter un coup d'œil à un [exemple de solution](https://colab.research.google.com/drive/1NGyo5wFpRj8TMfZOIuPaJHqyyXCITftc?usp=sharing).
13 | Vous avez découvert quelque chose d'intéressant ? Vous avez trouvé un modèle intéressant ? Vous avez un beau spectrogramme ? N'hésitez pas à partager votre travail et vos découvertes sur Twitter !
14 |
15 | Dans les prochains chapitres, vous en apprendrez plus sur les différentes architectures de transformers audio et vous entraînerez votre propre modèle !
16 |
--------------------------------------------------------------------------------
/chapters/fr/chapter2/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Unité 2 : Une introduction en douceur aux applications audio
2 |
3 | Bienvenue dans la deuxième unité du cours audio Hugging Face ! Précédemment, nous avons exploré les principes fondamentaux des données audio et appris à travailler avec des jeux de données audio en utilisant les bibliothèques 🤗 *Datasets* et 🤗 *Transformers*.
4 | Nous avons abordé divers concepts tels que la fréquence d'échantillonnage, l'amplitude, la profondeur de bits, la forme d'onde et les spectrogrammes, et nous avons vu comment prétraiter les données pour les préparer à un modèle pré-entraîné.
5 |
6 | À ce stade, vous êtes peut-être impatient de découvrir les tâches audio que 🤗 *Transformers* peut gérer, et vous avez toutes les connaissances de base nécessaires pour vous y plonger ! Jetons un coup d'œil à quelques exemples de tâches audio époustouflantes :
7 |
8 | **Classification audio** : classez facilement les clips audio dans différentes catégories. Vous pouvez déterminer si un enregistrement est celui d'un chien qui aboie ou d'un chat qui miaule, ou à quel genre musical appartient une chanson.
9 | **Reconnaissance automatique de la parole** : transformez les clips audio en texte en les transcrivant automatiquement. Vous pouvez obtenir une représentation textuelle d'un enregistrement de quelqu'un qui parle, comme "Comment allez-vous aujourd'hui ?". Plutôt utile pour la prise de notes !
10 | **Diagnostic du locuteur** : Vous vous êtes déjà demandé qui parlait dans un enregistrement ? Avec 🤗 *Transformers*, vous pouvez identifier le locuteur qui parle à un moment donné dans un clip audio. Imaginez que vous puissiez faire la différence entre "Alice" et "Bob" dans un enregistrement de leur conversation.
11 | **Text to speech** : créer une version narrée d'un texte qui peut être utilisée pour produire un livre audio, aider à l'accessibilité ou donner une voix à un PNJ dans un jeu. Avec 🤗 *Transformers*, vous pouvez facilement le faire !
12 |
13 | Dans cette unité, vous apprendrez à utiliser des modèles pré-entraînés pour certaines de ces tâches en utilisant la fonction `pipeline()` de 🤗 *Transformers*.
14 | Plus précisément, nous verrons comment les modèles pré-entraînés peuvent être utilisés pour la classification audio et la reconnaissance automatique de la parole.
15 | C'est parti !
16 |
--------------------------------------------------------------------------------
/chapters/fr/chapter3/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # Lectures et ressources supplémentaires
2 |
3 | Si vous souhaitez explorer les différentes architectures de transformers et découvrir leurs diverses applications dans le traitement de la parole, consultez ce papier : [Transformers in Speech Processing: A Survey](https://arxiv.org/abs/2303.11607)
4 | par Siddique Latif, Aun Zaidi, Heriberto Cuayahuitl, Fahad Shamshad, Moazzam Shoukat, Junaid Qadir
5 |
6 | "Le succès remarquable des *transformers* dans le domaine du traitement du langage naturel a suscité l'intérêt de la communauté du traitement de la parole, ce qui a conduit à une exploration de leur potentiel pour modéliser les dépendances à longue portée dans les séquences de parole. Récemment, les *transformers* ont gagné en importance dans divers domaines liés à la parole, notamment la reconnaissance automatique de la parole, la synthèse de la parole, la traduction de la parole, la para-linguistique de la parole, l'amélioration de la parole, les systèmes de dialogue parlé et de nombreuses applications multimodales. Dans cet article, nous présentons une étude complète qui vise à faire le lien entre les études de recherche de divers sous-domaines de la technologie de la parole. En consolidant les résultats obtenus dans le domaine des technologies de la parole, nous fournissons une ressource précieuse aux chercheurs désireux d'exploiter la puissance des *transformers* pour faire avancer le domaine. Nous identifions les défis rencontrés par les *transformers* dans le traitement de la parole tout en proposant des solutions potentielles pour résoudre ces problèmes."
7 |
--------------------------------------------------------------------------------
/chapters/fr/chapter4/demo.mdx:
--------------------------------------------------------------------------------
1 | # Construire une démo avec Gradio
2 |
3 | Dans cette dernière section sur la classification audio, nous allons construire une démo avec [*Gradio*](https://gradio.app) pour présenter le modèle de classification musicale que nous venons d'entraîner sur le jeu de données [GTZAN](https://huggingface.co/datasets/marsyas/gtzan).
4 | La première chose à faire est de charger le *checkpoint* *finetuné* en utilisant la classe `pipeline()` que vous connaissez grâce à la section sur les [modèles pré-entraînés](classification_models). Vous pouvez changer le `model_id` avec le nom de votre modèle *finetuné* et présent sur *Hub* :
5 |
6 | ```python
7 | from transformers import pipeline
8 |
9 | model_id = "sanchit-gandhi/distilhubert-finetuned-gtzan"
10 | pipe = pipeline("audio-classification", model=model_id)
11 | ```
12 |
13 | Deuxièmement, nous allons définir une fonction qui prend le chemin du fichier d'une entrée audio et le passe à travers le pipeline.
14 | Ici, le pipeline s'occupe automatiquement de charger le fichier audio, de le ré-échantillonner à la bonne fréquence d'échantillonnage, et de lancer l'inférence avec le modèle.
15 | Nous prenons les prédictions de `preds` du modèle et les formatons en tant qu'objet dictionnaire à afficher sur la sortie :
16 |
17 | ```python
18 | def classify_audio(filepath):
19 | preds = pipe(filepath)
20 | outputs = {}
21 | for p in preds:
22 | outputs[p["label"]] = p["score"]
23 | return outputs
24 | ```
25 |
26 | Enfin, nous lançons la démo Gradio en utilisant la fonction que nous venons de définir :
27 |
28 | ```python
29 | import gradio as gr
30 |
31 | demo = gr.Interface(
32 | fn=classify_audio, inputs=gr.Audio(type="filepath"), outputs=gr.outputs.Label()
33 | )
34 | demo.launch(debug=True)
35 | ```
36 |
37 | Ceci lancera une démo similaire à celle qui tourne sur le *Space* :
38 |
39 |
--------------------------------------------------------------------------------
/chapters/fr/chapter4/hands_on.mdx:
--------------------------------------------------------------------------------
1 | # Exercice pratique
2 |
3 | Il est temps de manipuler les modèles audio et d'appliquer ce que vous avez appris jusqu'à présent. Cet exercice est l'un des quatre exercices pratiques requis pour obtenir un certificat de fin de cours.
4 |
5 | Voici les instructions.
6 | Dans cette unité, nous avons démontré comment *finetuner* un modèle HuBERT sur le jeu de données `marsyas/gtzan` pour de la classification de musique. Notre exemple a atteint une précision de 83%.
7 | Votre tâche consiste à améliorer cette mesure de précision.
8 |
9 | Vous pouvez choisir n'importe quel modèle sur le [🤗 *Hub*](https://huggingface.co/models) que vous pensez adapté à la classification audio, et utiliser exactement le même jeu de données [`marsyas/gtzan`](https://huggingface.co/datasets/marsyas/gtzan) pour construire votre propre classifieur.
10 |
11 | Votre objectif est d'atteindre une précision de 87% sur ce jeu de données. Vous pouvez choisir exactement le même modèle, et jouer avec les hyperparamètres d'entraînement, ou choisir un modèle complètement différent. A vous de décider !
12 |
13 | Pour que votre résultat soit pris en compte dans votre certificat, n'oubliez pas de pousser votre modèle sur le *Hub* comme cela a été montré dans cette unité avec les `**kwargs` suivants à la fin de l'entraînement :
14 |
15 | ```python
16 | kwargs = {
17 | "dataset_tags": "marsyas/gtzan",
18 | "dataset": "GTZAN",
19 | "model_name": f"{model_name}-finetuned-gtzan",
20 | "finetuned_from": model_id,
21 | "tasks": "audio-classification",
22 | }
23 |
24 | trainer.push_to_hub(**kwargs)
25 | ```
26 |
27 | Voici quelques ressources supplémentaires qui pourraient vous être utiles dans le cadre de cet exercice :
28 | * [Guide de classification audio dans la documentation de 🤗 Transformers](https://huggingface.co/docs/transformers/tasks/audio_classification)
29 | * [Documentation du modèle HuBERT](https://huggingface.co/docs/transformers/model_doc/hubert)
30 | * [Documentation du modèle M-CTC-T](https://huggingface.co/docs/transformers/model_doc/mctct)
31 | * [Audio Spectrogram Transformer documentation](https://huggingface.co/docs/transformers/model_doc/audio-spectrogram-transformer)
32 | * [Documentation du Wav2Vec2](https://huggingface.co/docs/transformers/model_doc/wav2vec2)
33 |
34 | N'hésitez pas à créer une démo de votre modèle et à la partager sur Discord ! Si vous avez des questions, posez-les dans le canal `#audio-study-group`.
--------------------------------------------------------------------------------
/chapters/fr/chapter4/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Unité 4 : Construire un classifieur de genres musicaux
2 |
3 | ## Ce que vous allez apprendre et construire
4 |
5 | La classification d'audio est l'une des applications les plus courantes des *transformers* dans le traitement du son et de la parole. Comme d'autres tâches de classification dans l'apprentissage automatique, cette tâche consiste à attribuer une ou plusieurs étiquettes à un enregistrement audio en fonction de son contenu. Par exemple, dans le cas de la parole, nous pourrions vouloir détecter quand des mots de réveil comme « Hey Siri » sont prononcés, ou déduire un mot clé comme « température » d'une requête vocale comme « Quel temps fait-il aujourd'hui ? ». Les sons environnementaux constituent un autre exemple : nous pourrions vouloir distinguer automatiquement des sons tels que « klaxon de voiture », « sirène », « aboiement de chien », etc.
6 |
7 | Dans cette section, nous verrons comment les *transformers* audio pré-entraînés peuvent être appliqués à une série de tâches de classification d'audio.
8 | Nous allons ensuite *finetuner* un *transformer* sur la tâche de classification de la musique, en classant les chansons dans des genres comme « pop » et « rock ». Il s'agit d'une partie importante des plateformes de streaming musical, qui recommandent des chansons similaires à celles que l'utilisateur est en train d'écouter.
9 | À la fin de cette section, vous saurez comment :
10 |
11 | * Trouver des modèles pré-entraînés appropriés pour les tâches de classification d'audio
12 | * Utiliser la bibliothèque 🤗 *Datasets* et le *Hub* pour sélectionner des jeux de données de classification d'audio
13 | * *Finetuner * un modèle pré-entraîné pour classer les chansons par genre
14 | * Construire une démo *Gradio* permettant de classer vos propres chansons
--------------------------------------------------------------------------------
/chapters/fr/chapter5/hands_on.mdx:
--------------------------------------------------------------------------------
1 | # Exercice pratique
2 |
3 | Dans cette unité, nous avons exploré les défis du *finetuning* des modèles d'ASR, en mettant en avant le temps et les ressources nécessaires pour *finetuner* un modèle comme Whisper (même un petit *checkpoint*) sur une nouvelle langue.
4 | Afin de fournir une expérience pratique, nous avons conçu un exercice qui vous permet de naviguer dans le processus de *finetuning* d'un modèle d'ASR tout en utilisant un jeu de données plus petit.
5 | L'objectif principal de cet exercice est de vous familiariser avec le processus plutôt que de vous attendre à des résultats de niveau production.
6 | Nous avons délibérément fixé une métrique basse pour que vous puissiez l'atteindre, même avec des ressources limitées.
7 |
8 | Voici les instructions :
9 | * *Finetuner* le modèle `"openai/whisper-tiny"` en utilisant le sous-échantillon anglais américain ("en-US") du jeu de données `"PolyAI/minds14"`.
10 | * Utilisez les premiers **450 exemples pour l'entraînement**, et le reste pour l'évaluation. Assurez-vous de mettre `num_proc=1` lors du pré-traitement du jeu de données en utilisant la méthode `.map` (ceci assurera que votre modèle est soumis correctement lors de l'évaluation).
11 | * Pour évaluer le modèle, utilisez les métriques `wer` et `wer_ortho` comme décrit dans cette unité. Cependant, *ne convertissez pas* la métrique en pourcentages en la multipliant par 100 (par exemple, si WER est de 42%, nous nous attendons à voir la valeur de 0,42 dans cet exercice).
12 |
13 | Une fois que vous avez *finetuné* un modèle, assurez-vous de le télécharger sur le 🤗 *Hub* avec les `kwargs` suivants :
14 |
15 | ```
16 | kwargs = {
17 | "dataset_tags" : "PolyAI/minds14",
18 | "finetuned_from" : "openai/whisper-tiny",
19 | "tasks" : "automatic-speech-recognition",
20 | }
21 | ```
22 |
23 | Nous considérons cet exercice réussi si le WER normalisé (`wer`) de votre modèle est inférieur à **0.37**.
24 |
25 | N'hésitez pas à construire une démo de votre modèle obtenu et à la partager sur Discord ! Si vous avez des questions, posez-les dans le canal ``#audio-study-group`.
26 |
--------------------------------------------------------------------------------
/chapters/fr/chapter5/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # Lectures et ressources complémentaires
2 |
3 | Cette unité est une introduction pratique à la reconnaissance automatique de la parole, l'une des tâches les plus populaires dans le domaine audio.
4 | Vous voulez en savoir plus ? Vous trouverez ici des ressources supplémentaires (en anglais) qui vous aideront à approfondir votre compréhension du sujet et à améliorer votre expérience d'apprentissage.
5 |
6 | * [Whisper Talk](https://www.youtube.com/live/fZMiD8sDzzg?feature=share) par Jong Wook Kim : une présentation du modèle Whisper, expliquant la motivation, l'architecture, l'entraînement et les résultats, par l'auteur du modèle.
7 | * [End-to-End Speech Benchmark (ESB)](https://arxiv.org/abs/2210.13352) : un papier qui plaide en faveur de l'utilisation du WER orthographique plutôt que du WER normalisé pour l'évaluation des systèmes de reconnaissance automatique de la parole et qui présente un benchmark correspondant.
8 | * [Fine-Tuning Whisper for Multilingual ASR](https://huggingface.co/blog/fine-tune-whisper) : un article de blog qui explique le fonctionnement du modèle Whisper de manière plus détaillée, ainsi que les étapes de pré- et post-traitement impliquées dans l'extracteur de caractéristiques et le *tokenizer*.
9 | * [Fine-tuning MMS Adapter Models for Multi-Lingual ASR](https://huggingface.co/blog/mms_adapters) : un guide complet pour *finetuner* les nouveaux modèles de reconnaissance vocale [MMS](https://ai.facebook.com/blog/multilingual-model-speech-recognition/) de Meta, en gelant les poids du modèle de base et en ne finetunant qu'un petit nombre de couches.
10 | * Boosting Wav2Vec2 with n-grams in 🤗 Transformers](https://huggingface.co/blog/wav2vec2-with-ngram) : un article de blog pour combiner les modèles CTC avec des modèles de langage externes pour combattre les erreurs d'orthographe et de ponctuation.
11 |
--------------------------------------------------------------------------------
/chapters/fr/chapter6/evaluation.mdx:
--------------------------------------------------------------------------------
1 | # Évaluation des modèles de synthèse vocale
2 |
3 | Pendant la période d'entraînement, les modèles de synthèse vocale optimisent la perte d'erreur quadratique moyenne (ou l'erreur absolue moyenne) entre les valeurs prédites du spectrogramme et celles générées. La MSE et la MAE encouragent toutes deux le modèle à minimiser la différence entre les spectrogrammes prédits et les spectrogrammes cibles.
4 | Toutefois, étant donné que la synthèse vocale est un problème d'association un-à-plusieurs, c'est-à-dire que le spectrogramme de sortie pour un texte donné peut être représenté de nombreuses manières différentes, l'évaluation des modèles de synthèse vocale qui en résultent est beaucoup plus difficile.
5 |
6 | Contrairement à de nombreuses autres tâches informatiques qui peuvent être mesurées objectivement à l'aide de paramètres quantitatifs, tels que l'exactitude ou la précision, l'évaluation des modèles de synthèse vocale repose en grande partie sur une analyse humaine subjective.
7 |
8 | L'une des méthodes d'évaluation les plus couramment employées pour les systèmes de reconnaissance vocale consiste à réaliser des évaluations qualitatives à l'aide de scores d'opinion moyens (MOS pour *mean opinion scores*). Le MOS est un système de notation subjectif qui permet aux évaluateurs humains de noter la qualité perçue de la parole synthétisée sur une échelle de 1 à 5. Ces scores sont généralement recueillis lors de tests d'écoute, au cours desquels des participants humains écoutent et évaluent des échantillons de parole synthétisée.
9 |
10 | L'une des principales raisons pour lesquelles il est difficile de développer des mesures objectives pour l'évaluation de la synthèse vocale est la nature subjective de la perception de la parole. Les auditeurs humains ont des préférences et des sensibilités diverses pour différents aspects de la parole, notamment la prononciation, l'intonation, le naturel et la clarté. Saisir ces nuances perceptives avec une seule valeur numérique est une tâche ardue. En même temps, la subjectivité de l'évaluation humaine rend difficile la comparaison et l'étalonnage de différents systèmes de traitement de la parole.
11 |
12 | En outre, ce type d'évaluation peut négliger certains aspects importants de la synthèse vocale, tels que le naturel, l'expressivité et l'impact émotionnel. Ces qualités sont difficiles à quantifier objectivement mais sont très importantes dans les applications où la parole synthétisée doit transmettre des qualités humaines et susciter des réactions émotionnelles appropriées.
13 |
14 | En résumé, l'évaluation des modèles de synthèse vocale est une tâche complexe en raison de l'absence d'une mesure véritablement objective. La méthode d'évaluation la plus courante, le MOS, repose sur une analyse humaine subjective. Bien qu'il fournisse des informations précieuses sur la qualité de la parole synthétisée, il introduit également de la variabilité et de la subjectivité.
--------------------------------------------------------------------------------
/chapters/fr/chapter6/hands_on.mdx:
--------------------------------------------------------------------------------
1 | # Exercice pratique
2 |
3 | Dans cette unité, nous avons exploré la tâche audio de synthèse vocale, parlé des jeux de données existants, des modèles pré-entraînés et des nuances du *finetuning* de SpeechT5 pour une nouvelle langue.
4 |
5 | Comme vous l'avez vu, le *finetuning* des modèles pour la tâche de synthèse vocale peut s'avérer difficile dans des scénarios à faibles ressources. Parallèlement, l'évaluation des modèles de synthèse vocale n'est pas facile non plus.
6 |
7 | Pour ces raisons, cet exercice pratique se concentrera sur la mise en pratique des compétences plutôt que sur l'obtention d'une certaine valeur de métrique.
8 |
9 | Votre objectif pour cette tâche est de *finetuner* SpeechT5 sur un jeu de données de votre choix. Vous pouvez choisir une autre langue dans le même jeu de données `voxpopuli`, ou tout autre jeu de données listé dans cette unité.
10 |
11 | Faites attention à la taille des données d'entraînement ! Pour s'entraîner sur un GPU gratuit de Google Colab, nous recommandons de limiter les données d'entraînement à environ 10-15 heures.
12 |
13 | Une fois que vous avez terminé le processus de *finetuné*, partagez votre modèle en le téléchargeant sur le *Hub*. Assurez-vous de marquer votre modèle comme un modèle `text-to-speech` soit avec les kwargs appropriés, soit dans l'interface utilisateur du *Hub*.
14 |
15 | Rappelez-vous, le but principal de cet exercice est de vous fournir une grande pratique, vous permettant d'affiner vos compétences et d'acquérir une compréhension plus profonde des tâches audio de synthèse vocale.
--------------------------------------------------------------------------------
/chapters/fr/chapter6/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Unité 6 : Du texte à la parole
2 |
3 | Dans l'unité précédente, vous avez appris à utiliser les *transformers* pour convertir la parole en texte. Maintenant, inversons le scénario et voyons comment vous pouvez transformer un texte d'entrée donné en une sortie audio qui ressemble à de la parole.
4 |
5 | La tâche que nous allons étudier dans cette unité s'appelle "*Text-to-speech*" (TTS) ou synthèse vocale. Les modèles capables de gérer cette tâche ont un large éventail d'applications potentielles :
6 |
7 | * Applications d'assistance : des outils permettant aux malvoyants d'accéder au contenu numérique par le biais du son.
8 | * Narrations de livres audio : rendre la littérature plus accessible aux personnes qui préfèrent écouter ou qui ont des difficultés à lire.
9 | * Assistants virtuels : les modèles TTS sont un élément fondamental des assistants virtuels tels que Siri, Google Assistant ou Amazon Alexa. Une fois qu'ils ont utilisé un modèle de classification pour repérer le mot déclencheur et un modèle ASR pour traiter la demande, ils peuvent utiliser un modèle de TTS pour répondre à votre demande.
10 | * Divertissement, jeux et apprentissage des langues : donnez une voix à vos personnages, racontez des événements d’un jeu ou aidez les apprenants en leur donnant des exemples de prononciation et d'intonation correctes des mots et des phrases.
11 |
12 | Il ne s'agit là que de quelques exemples, et je suis sûr que vous pouvez en imaginer beaucoup d'autres ! Il est important de souligner que les modèles de TTS peuvent être utilisés à des fins malveillantes.
13 | Par exemple, avec suffisamment d'échantillons de voix, il serait possible potentiellement de créer de faux enregistrements audio convaincants, conduisant à l'utilisation non autorisée de la voix d'une personne à des fins frauduleuses ou de manipulation.
14 | Si vous envisagez de collecter des données pour *finetuner* vos propres systèmes, examinez attentivement la question de la protection de la vie privée et du consentement.
15 | Les données vocales doivent être obtenues avec le consentement explicite des personnes, en veillant à ce qu'elles comprennent l'objectif, la portée et les risques potentiels associés à l'utilisation de leur voix dans un système de synthèse vocale. Utilisez la synthèse vocale de manière responsable.
16 |
17 | ## Ce que vous allez apprendre et construire
18 |
19 | Dans cette unité, nous parlerons de :
20 |
21 | * [Jeux de données pour entraîner un modèle de synthèse vocale](tts_datasets)
22 | * [Modèles pré-entraînés de synthèse vocale](pre-trained_models)
23 | * [*Finetuning* du modèle SpeechT5 sur une nouvelle langue](fine-tuning)
24 | * [Evaluation des modèles TTS](evaluation)
--------------------------------------------------------------------------------
/chapters/fr/chapter6/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # Lectures et ressources complémentaires
2 |
3 | Cette unité a introduit la tâche de synthèse vocale et a couvert beaucoup de terrain.
4 | Vous voulez en savoir plus ? Vous trouverez ici des ressources qui vous aideront à approfondir votre compréhension des sujets et à améliorer votre expérience d'apprentissage.
5 |
6 | * [HiFi-GAN : Generative Adversarial Networks for Efficient and High Fidelity Speech Synthesis](https://arxiv.org/pdf/2010.05646.pdf) : article présentant HiFi-GAN pour la synthèse vocale.
7 | * [X-Vectors : Robust DNN Embeddings For Speaker Recognition](https://www.danielpovey.com/files/2018_icassp_xvectors.pdf) : article présentant la méthode X-Vector pour l'intégration des locuteurs.
8 | * [FastSpeech 2 : Fast and High-Quality End-to-End Text to Speech](https://arxiv.org/pdf/2006.04558.pdf) : un article présentant FastSpeech 2, un autre modèle de synthèse vocale populaire qui utilise une méthode de TTS non autorégressive.
9 | * [A Vector Quantized Approach for Text to Speech Synthesis on Real-World Spontaneous Speech](https://arxiv.org/pdf/2302.04215v1.pdf) : un article présentant MQTTS, un système TTS autorégressif qui remplace les mel-spectrogrammes par une représentation discrète quantifiée.
--------------------------------------------------------------------------------
/chapters/fr/chapter7/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Unité 7. Rassemblement de tous les éléments
2 |
3 | Bravo d'être arrivé à l'unité 7 ! Vous êtes à quelques pas de terminer le cours et d'acquérir les dernières compétences dont vous avez besoin pour naviguer dans le domaine de l'apprentissage machine audio.
4 | En termes de compréhension, vous savez déjà tout ce qu'il y a à savoir.
5 | Ensemble, nous avons couvert de manière exhaustive les principaux sujets qui constituent le domaine audio et la théorie qui les accompagne (données, classification, reconnaissance de la parole et synthèse vocale).
6 | L'objectif de cette unité est de fournir un cadre pour **assembler tout cela** : maintenant que vous savez comment chacune de ces tâches fonctionne indépendamment, nous allons explorer comment vous pouvez les combiner pour construire des applications du monde réel.
7 |
8 | ## Ce que vous allez apprendre et construire
9 |
10 | Dans cette unité, nous aborderons les trois sujets suivants :
11 |
12 | * [Traduction parole-à-parole](speech-to-speech) : traduire l'audio d'une langue en audio dans une autre langue.
13 | * [Créer un assistant vocal](voice-assistant) : créer votre propre assistant vocal qui fonctionne de la même manière qu'Alexa ou Siri.
14 | * [Transcription de réunions](transcribe-meeting) : transcrire une réunion et indiquez sur la transcription qui a parlé et à quel moment.
--------------------------------------------------------------------------------
/chapters/fr/chapter7/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # Lectures et ressources complémentaires
2 |
3 | Cette unité a rassemblé de nombreux éléments des unités précédentes, en introduisant les tâches de traduction vocale (audio à audio), les assistants vocaux et séparation des locuteurs.
4 | Le matériel de lecture supplémentaire est donc divisé en ces trois nouvelles tâches :
5 |
6 | Traduction vocale (audio à audio) :
7 | * [STST avec unités discrètes](https://ai.facebook.com/blog/advancing-direct-speech-to-speech-modeling-with-discrete-units/) par Meta AI : une approche directe de la STST par le biais de modèles encodeur-décodeur.
8 | * [Hokkien direct speech-to-speech translation](https://ai.facebook.com/blog/ai-translation-hokkien/) par Meta AI : une approche directe de STST en utilisant des modèles encodeur-décodeur avec un décodeur en deux étapes.
9 | * [Leveraging unsupervised and weakly-supervised data to improve direct STST](https://arxiv.org/abs/2203.13339) par Google : propose de nouvelles approches pour tirer parti des données non supervisées et faiblement supervisées pour entraîner les modèles STST directs et une petite modification de l'architecture du *transformer*.
10 | * [Translatotron-2](https://google-research.github.io/lingvo-lab/translatotron2/) par Google : un système capable de conserver les caractéristiques du locuteur dans la traduction de parole.
11 |
12 | Assistant vocal :
13 | * [Accurate wakeword detection](https://www.amazon.science/publications/accurate-detection-of-wake-word-start-and-end-using-a-cnn) par Amazon : une approche à faible latence pour la détection des mots déclencheur pour les applications sur appareil.
14 | * [Architecture RNN-Transducteur](https://arxiv.org/pdf/1811.06621.pdf) par Google : une modification de l'architecture CTC pour l'ASR en *streaming* sur appareil.
15 |
16 | Transcriptions de réunions :
17 | * [pyannote.audio Technical Report](https://huggingface.co/pyannote/speaker-diarization/blob/main/technical_report_2.1.pdf) par Hervé Bredin : ce rapport décrit les principes fondamentaux du pipeline de séparation des locuteurs `pyannote.audio`.
18 | * [Whisper X](https://arxiv.org/pdf/2303.00747.pdf) par Max Bain et al. : une approche supérieure pour calculer les horodatages au niveau des mots en utilisant le modèle Whisper.
19 |
--------------------------------------------------------------------------------
/chapters/fr/events/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Sessions en direct et ateliers
2 |
3 | ## Sessions en direct
4 |
5 | Evènement de lancement du cours en direct avec [Paige Bailey](https://dynamicwebpaige.github.io/info/) (DeepMind), [Seokhwan Kim](https://seokhwankim.github.io/) (Amazon Alexa AI) et [Brian McFee](https://brianmcfee.net/) (Librosa) :
6 |
7 |
8 |
9 |
10 | Enregistrement du direct "Demandez-moi n'importe quoi" avec l'équipe de Hugging Face du cours :
11 |
12 |
13 |
14 |
15 | ## Ateliers
16 |
17 | ### Hugging Face Machine Learning for Audio Study Group
18 |
19 | Fin 2021 / début 2022, un groupe d'études sur les modèles audio était actif sur le Discord de Hugging Face.
20 | Il consistait principalement en des présentations d'articles scientifiques, d'outils et de discussions sur le sujet de l'application de l'apprentissage automatique dans le domaine de l'audio.
21 | Vous pouvez retrouver les enregistrements des présentations sur la [chaîne YouTube de Hugging Face](https://www.youtube.com/watch?v=cAviRhkqdnc&list=PLo2EIpI_JMQtOQK_B4G97yn1QWZ4Xi4Tu).
22 | Les supports et *notebooks* utilisés dans les présentations sont disponibles sur le [GitHub de VB](https://github.com/Vaibhavs10/ml-with-audio).
23 |
24 |
25 | ### Whisper Fine-Tuning Event
26 |
27 | En décembre 2022, un évènement pour *finetuner* le modèle Whisper dans plusieurs langues a été organisé.
28 | Vous pouvez retrouver les informations le concernant sur la page [suivante](https://github.com/huggingface/community-events/tree/main/whisper-fine-tuning-event) (en anglais).
29 |
--------------------------------------------------------------------------------
/chapters/ko/_toctree.yml:
--------------------------------------------------------------------------------
1 | - title: 0단원. 코스에 오신 것을 환영합니다!
2 | sections:
3 | - local: chapter0/introduction
4 | title: 이 코스에서 기대할 수 있는 것들
5 | - local: chapter0/get_ready
6 | title: 준비하기
7 | - local: chapter0/community
8 | title: 커뮤니티에 참여하기
9 |
10 | - title: 1단원. 오디오 데이터 다루기
11 | sections:
12 | - local: chapter1/introduction
13 | title: 학습할 내용들
14 | - local: chapter1/audio_data
15 | title: 오디오 데이터에 대하여
16 | - local: chapter1/load_and_explore
17 | title: 오디오 데이터셋 불러오기 및 탐색하기
18 | - local: chapter1/preprocessing
19 | title: 오디오 데이터 전처리하기
20 | - local: chapter1/streaming
21 | title: 오디오 데이터 스트리밍하기
22 | - local: chapter1/quiz
23 | title: 퀴즈
24 | quiz: 1
25 | - local: chapter1/supplemental_reading
26 | title: 참고자료들
27 |
28 | - title: 2단원. 오디오의 응용에 대한 소개
29 | sections:
30 | - local: chapter2/introduction
31 | title: 오디오의 응용 개요
32 | - local: chapter2/audio_classification_pipeline
33 | title: 파이프라인을 이용한 오디오 분류
34 | - local: chapter2/asr_pipeline
35 | title: 파이프라인을 이용한 자동 음성 인식
36 | - local: chapter2/hands_on
37 | title: 실습 과제
38 |
39 | - title: 3단원. 오디오용 트랜스포머 아키텍처
40 | sections:
41 | - local: chapter3/introduction
42 | title: 트랜스퍼모델 돌아보기
43 | - local: chapter3/ctc
44 | title: CTC 아키텍처
45 | - local: chapter3/seq2seq
46 | title: Seq2Seq 아키텍처
47 | - local: chapter3/classification
48 | title: 오디오 분류 아키텍처
49 | - local: chapter3/quiz
50 | title: 퀴즈
51 | quiz: 3
52 | - local: chapter3/supplemental_reading
53 | title: 보충자료 및 리소스
54 |
55 | - title: 코스 이벤트
56 | sections:
57 | - local: events/introduction
58 | title: 라이브 세션과 워크샵
--------------------------------------------------------------------------------
/chapters/ko/chapter0/community.mdx:
--------------------------------------------------------------------------------
1 | # 커뮤니티에 참여해보세요![[join-the-community]]
2 |
3 | [활발하고 지원이 풍부한 우리의 디스코드 커뮤니티](http://hf.co/join/discord)에 여러분을 초대합니다. 여러분은 이곳에서 같은 생각을 가진 학습자들을 만나고, 아이디어를 교환하며, 실습 과제에 대한 소중한 피드백을 받으실 수 있습니다. 질문을 하고, 자료를 공유하며 다른 사람들과 협력을 해보세요.
4 |
5 | 우리 팀도 디스코드에서 활동하고 있으며 여러분께 지원과 안내를 해드립니다. 커뮤니티에 가입하는 것은 참여적이고 동기를 부여받을 수 있게 해주며 소통을 유지할 수 있는 훌륭한 방법입니다. 여러분을 커뮤니티에서 만나 뵙기를 기대합니다!
6 |
7 | ## 디스코드가 뭔가요?[[what-is-discord]]
8 |
9 | 디스코드는 무료 채팅 플랫폼입니다. 슬랙을 써보신적 있으시다면 그것과 비슷하다고 생각하시면 됩니다. 허깅페이스 디스코드 서버는 18,000명의 AI 전문가, 학습자 및 애호가로 구성된 활발한 커뮤니티로, 여러분도 참여하실 수 있습니다.
10 |
11 | ## 디스코드 탐색하기[[navigating-discord]]
12 |
13 | 디스코드 서버에 가입하시면 왼쪽의 `#role-assignment`를 클릭하여 관심있는 주제를 선택하셔야 합니다. 주제는 원하시는 만큼 선택하실 수 있으며 다른 학습자들과 같이하기 위해선 반드시 "ML for Audio and Speech"를 클릭하셔야 합니다.
14 | 채널을 살펴보고 `#introduce-yourself`에서 여러분을 소개해보세요.
15 |
16 | ## 오디오 코스 채널[[audio-course-channels]]
17 |
18 | 우리의 디스코드 서버에는 다양한 주제의 채널들이 있습니다. 논문에 대한 토론, 이벤트 꾸리기, 프로젝트와 아이디어 공유, 브레인스토밍 등 다양한 활동을 찾아보실 수 있습니다.
19 |
20 | 다음의 채널들은 오디오 코스 학습을 위해 관련이 있는 채널들입니다:
21 |
22 | * `#audio-announcements`: 코스 업데이트, 허깅페이스의 오디오와 관련된 모든 뉴스들, 이벤트 공지 등을 전합니다.
23 | * `#audio-study-group`: 아이디어를 교환하고 코스에 대한 질문과 토론을 합니다.
24 | * `#audio-discuss`: 오디오와 관련된 일반적인 토론을 합니다.
25 |
26 | `#audio-study-group` 외에도 자유롭게 자신의 학습 그룹을 만들어보세요. 함께 배우면 더 쉽습니다!
27 |
--------------------------------------------------------------------------------
/chapters/ko/chapter0/get_ready.mdx:
--------------------------------------------------------------------------------
1 | # 코스 준비하기[[get-ready-to-take-the-course]]
2 |
3 | 코스에 대한 기대가 크신가요? 이 페이지는 여러분이 바로 시작하실 수 있도록 준비를 도와드립니다.
4 |
5 | ## 1단계. 등록하기[[step-1-sign-up]]
6 |
7 | 모든 업데이트와 소셜 이벤트에 대한 최신 소식을 받아보려면 코스에 등록하세요.
8 |
9 | [👉 등록하기](http://eepurl.com/insvcI)
10 |
11 | ## 2단계. Hugging Face 계정 만들기[[step-2-get-a-hugging-face-account]]
12 |
13 | 아직 허깅페이스 계정이 없다면, 계정을 만드세요(무료입니다). 실습과제 완료, 수료 인증, 사전학습 모델 탐색, 데이터셋에 접근 등을 위해 필요합니다.
14 |
15 | [👉 HUGGING FACE 계정 생성](https://huggingface.co/join)
16 |
17 | ## 3단계. 기초지식 점검하기(필요한 경우)[[step-3-brush-up-on-fundamentals-if-you-need-to]]
18 |
19 | 우린 여러분이 딥러닝과 트랜스포머에 대해 대략적으로 이해를 하고 있다고 가정합니다. 트랜스포머에 대한 이해가 필요하다면 우리의 [NLP 코스](https://huggingface.co/course/chapter1/1)를 참고하세요.
20 |
21 | ## 4단계. 설정 확인하기[[step-4-check-your-setup]]
22 |
23 | 코스 자료를 보기 위해서는 다음이 필요합니다:
24 | - 인터넷 연결이 가능한 컴퓨터
25 | - 실습과제를 위한 [Google Colab](https://colab.research.google.com). 무료버전이면 충분합니다.
26 |
27 | Google Colab을 사용해본적이 없으시다면, 이 [공식 소개 노트북](https://colab.research.google.com/notebooks/intro.ipynb)을 참고하세요.
28 |
29 | ## 5단계. 커뮤니티 참여하기[[step-5-join-the-community]]
30 |
31 | 동료 수강생들과 아이디어를 공유하고 허깅페이스팀과 연락할 수 있는 디스코드 서버에 가입하세요.
32 |
33 | [👉 디스코드 참여](http://hf.co/join/discord)
34 |
35 | 이 디스코드 커뮤니티에 대해 더 알아보고 싶으시다면 [다음 페이지](community)를 참고하세요.
36 |
--------------------------------------------------------------------------------
/chapters/ko/chapter1/introduction.mdx:
--------------------------------------------------------------------------------
1 | # 1단원. 오디오 데이터 다루기[[unit-1-working-with-audio-data]]
2 |
3 | ## 이 단원에서 배울 내용[[what-youll-learn-in-this-unit]]
4 |
5 | 모든 오디오작업과 음성 작업은 오디오 파일부터 시작됩니다. 이러한 작업을 해결하기에 앞서, 이 파일들이 실제로 무엇을 담고 있는지, 그리고 어떻게 작업해야할지에 대해 이해하는 것이 중요합니다.
6 |
7 | 이 단원에선 파형(waveform), 샘플링 속도(sampling rate), 스펙트로그램(spectrogram)과 같은 오디오 데이터와 연관된 기본 용어에 대하여 배웁니다. 또한 오디오 데이터를 불러오고 전처리하는 방법, 큰 데이터셋을 효율적으로 스트리밍하는 방법 등 오디오 데이터셋을 다루는 법도 배우게 됩니다.
8 |
9 | 이 단원을 마치면 오디오 데이터 용어들에 대한 확실한 이해와 오디오 데이터셋의 다양한 응용작업을 위해 필요한 기술들을 습득하게 될것입니다. 이 단원에서 습득하게 될 지식은 코스의 나머지 과정을 이해하기 위해 필요한 기초가 됩니다.
10 |
--------------------------------------------------------------------------------
/chapters/ko/chapter1/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # 더 알아보기[[learn-more]]
2 |
3 | 이 단원에서는 오디오 데이터와 이를 다루는 데 관련된 많은 기본 개념들을 다루었습니다.
4 | 더 알고 싶으신가요? 여기에서 주제에 대한 더 깊은 이해를 돕고 학습 경험을 향상시킬 수 있는 추가 자료들을 찾아보실 수 있습니다.
5 |
6 | 아래 비디오에서는 xiph.org의 Monty Montgomery가 현대 디지털 분석 장비와 오래된 아날로그 벤치 장비를 이용해 실제 오디오 장비에서의 샘플링, 양자화, 비트뎁스, 디더(dither)를 실시간 시연으로 보여줍니다. 확인해보세요:
7 |
8 |
9 |
10 | 디지털 신호 처리에 대해 더 깊게 다뤄보고 싶으시다면 `librosa` 패키지의 주요 메인테이너이자 Assistant Professor of Music Technology and Data Science at New York University인 Brian McFee가 저술한 무료 책 ["Digital Signals Theory"](https://brianmcfee.net/dstbook-site/content/intro.html)를 확인해보세요.
11 |
--------------------------------------------------------------------------------
/chapters/ko/chapter2/asr_pipeline.mdx:
--------------------------------------------------------------------------------
1 | # 파이프라인을 이용한 자동 음성 인식[[automatic-speech-recognition-with-a-pipeline]]
2 |
3 | 자동 음성 인식(ASR)은 음성 오디오 녹음을 텍스트로 변환하는 작업입니다. 이 작업은 매우 다양하게 실용적으로 쓰일 수가 있습니다. 비디오 자막 생성부터 Siri나 Alexa같은 가상 비서의 음성명령에 이르기까지요.
4 |
5 | 이번 섹션에선 이전의 MINDS-14 데이터셋의 청구서 지불 방법에 대해 묻는 사람의 음성 녹음을 `automatic-speech-recognition` 파이프라인을 이용해 텍스트로 변환하는 방법을 알아보겠습니다.
6 |
7 | 시작을 위해 데이터를 준비해야 합니다. 아직 준비하지 않았다면, [Audio classification with a pipeline](introduction.mdx)에서 했던것처럼 데이터셋을 불러오고 16 kHz로 업샘플링을 해주세요.
8 |
9 | 오디오 녹음을 텍스트로 바꾸기 위해 🤗 Transformers의 `automatic-speech-recognition` 파이프라인을 이용합니다. 파이프라인을 인스턴스화(instantiate) 해보겠습니다:
10 |
11 | ```py
12 | from transformers import pipeline
13 |
14 | asr = pipeline("automatic-speech-recognition")
15 | ```
16 |
17 | 다음으로, 데이터셋에서 원시 데이터를 불러와 파이프라인에 넘겨봅시다:
18 |
19 | ```py
20 | example = minds[0]
21 | asr(example["audio"]["array"])
22 | ```
23 |
24 | **Output:**
25 | ```out
26 | {"text": "I WOULD LIKE TO PAY MY ELECTRICITY BILL USING MY COD CAN YOU PLEASE ASSIST"}
27 | ```
28 |
29 | 이 출력과 실제값을 비교해보겠습니다:
30 |
31 | ```py
32 | example["english_transcription"]
33 | ```
34 |
35 | **Output:**
36 | ```out
37 | "I would like to pay my electricity bill using my card can you please assist"
38 | ```
39 |
40 | 모델이 오디오를 텍스트로 바꾸는 일을 꽤 잘 해낸것 같습니다! 실제 텍스트와 비교했을때 한 단어("card")만을 틀렸을 뿐입니다. 화자가 호주식 억양인 것을 고려할 때 꽤 괜찮은 결과로 볼 수 있습니다(호주식 억양에선 "r"이 종종 묵음입니다). 그렇긴 하지만, 전기요금을 물고기("cod"는 영어로 대구를 뜻합니다)로 낼 것을 권장하지는 않습니다!
41 |
42 | 기본적으로 이 파이프라인은 영어의 자동 음성 인식을 위해 학습된 모델을 씁니다. 이 예제에서는 괜찮지만 여러분이 만약 MINDS-14의 다른 언어에 대해 텍스트 변환을 시도해보고 싶으시다면 [🤗 Hub](https://huggingface.co/models?pipeline_tag=automatic-speech-recognition&language=fr&sort=downloads)에서 사전학습된 ASR 모델을 찾아보실 수 있습니다.
43 | 모델 리스트에서 작업순으로 필터링을 먼저하고 언어에 대해 필터링을 할 수 있습니다. 마음에 드는 모델을 찾으셨다면, 파이프라인의 `model` 인수(argument)로 넘겨 쓰면 됩니다.
44 |
45 | 이를 이용해 MINDS-14의 독일어 부분을 다뤄 보겠습니다. "de-DE" 부분을 불러봅시다:
46 |
47 | ```py
48 | from datasets import load_dataset
49 | from datasets import Audio
50 |
51 | minds = load_dataset("PolyAI/minds14", name="de-DE", split="train")
52 | minds = minds.cast_column("audio", Audio(sampling_rate=16_000))
53 | ```
54 |
55 | 예제를 하나 선택해 텍스트가 어떻게 나와야하는지 확인해봅시다:
56 |
57 | ```py
58 | example = minds[0]
59 | example["transcription"]
60 | ```
61 |
62 | **Output:**
63 | ```out
64 | "ich möchte gerne Geld auf mein Konto einzahlen"
65 | ```
66 |
67 |
68 | 🤗 Hub에서 독일어를 위해 사전학습된 ASR 모델을 찾아 파이프라인을 인스턴스화한 후 이 예제에 적용시켜봅시다:
69 |
70 | ```py
71 | from transformers import pipeline
72 |
73 | asr = pipeline("automatic-speech-recognition", model="maxidl/wav2vec2-large-xlsr-german")
74 | asr(example["audio"]["array"])
75 | ```
76 |
77 | **Output:**
78 | ```out
79 | {"text": "ich möchte gerne geld auf mein konto einzallen"}
80 | ```
81 |
82 | 역시나, stimmt's!
83 |
84 | 여러분이 작업을 시작할 때, 이번 단원에서 보신것처럼 간단한 파이프라인으로 시작해보는것은 여러 장점이 있습니다:
85 | - 여러분의 문제를 해결할 사전학습된 모델이 이미 있을 수 있습니다. 많은 시간을 아끼실 수 있을겁니다.
86 | - `pipeline()`은 여러분을 위해 전처리 및 후처리를 대신 해줍니다. 따라서 여러분은 데이터 형식을 모델에 맞추는것에 대해 걱정하지 않으셔도 됩니다.
87 | - 결과가 이상적이지 않더라도 하나의 기준점을 빠르게 제시해줍니다.
88 | - 여러분이 커스텀 데이터에 맞춰 모델을 파인튜닝하고 허브에 올린다면 `pipeline()` 메소드를 이용해 모든 커뮤니티가 이를 쉽게 쓸 수 있어 AI를 더욱 사용하기 쉽게 만듭니다.
89 |
--------------------------------------------------------------------------------
/chapters/ko/chapter2/audio_classification_pipeline.mdx:
--------------------------------------------------------------------------------
1 | # 파이프라인을 이용한 오디오 분류[[audio-classification-with-a-pipeline]]
2 |
3 | 오디오 분류는 녹음된 오디오 내용에 기반하여 하나 혹은 여러개의 레이블을 할당하는 작업입니다. 이 레이블은 음악, 음성, 노이즈 같은 카테고리에 해당할 수도 있고, 새소리나 차 엔진 소리처럼 더 구체적인 카테고리일 수도 있습니다.
4 |
5 | 인기 있는 오디오 트랜스포머 모델들이 세부적으로 어떻게 작동하는지, 커스텀 모델을 어떻게 파인튜닝하는지 등을 알아보기 전에 🤗 Transformers를 이용하여 단 몇줄의 코드만으로 사전학습된 모델을 오디오 분류에 쓰는 법을 알아봅시다.
6 |
7 | 이전 단원에서 사용했던 [MINDS-14](https://huggingface.co/datasets/PolyAI/minds14) 데이터셋을 쓰겠습니다. 기억하시다시피, MINDS-14는 사람들이 인터넷뱅킹 시스템에 대해 전화로 여러 언어와 방언으로 묻는 것이 녹음돼있습니다. 각 녹음에는 `intent_class`가 있으며 이를 이용해 녹음들을 전화의 의도에 따라 분류할 수 있습니다.
8 |
9 | 파이프라인을 써보기 위해 이전과 마찬가지로 데이터의 `en-AU` 부분을 가져와 모델이 요구하는 16 kHz 샘플링 속도를 가지도록 업샘플링 해봅시다.
10 |
11 | ```py
12 | from datasets import load_dataset
13 | from datasets import Audio
14 |
15 | minds = load_dataset("PolyAI/minds14", name="en-AU", split="train")
16 | minds = minds.cast_column("audio", Audio(sampling_rate=16_000))
17 | ```
18 |
19 | 🤗 Transformers의 `audio-classification` 파이프라인을 사용하면 녹음된 오디오를 클래스 집합으로 분류할 수 있습니다.
20 | 우리의 경우, MINDS-14 데이터셋의 의도 분류를 위해 파인튜닝된 모델이 필요합니다. 운좋게도, 바로 그럴때 쓰이는 모델이 허브에 있습니다! `pipeline()` 함수를 써서 이를 불러보겠습니다:
21 |
22 | ```py
23 | from transformers import pipeline
24 |
25 | classifier = pipeline(
26 | "audio-classification",
27 | model="anton-l/xtreme_s_xlsr_300m_minds14",
28 | )
29 | ```
30 |
31 | 이 파이프라인은 오디오 데이터로 넘파이 배열을 요구합니다. 원시 오디오 데이터의 모든 전처리는 편리하게도 파이프라인이 해결해줍니다. 한 예를 봅시다:
32 |
33 | ```py
34 | example = minds[0]
35 | ```
36 |
37 | 데이터셋의 구조를 기억하신다면, 원시 오디오 데이터가 `["audio"]["array"]` 아래에 넘파이 배열로 저장돼있는걸 기억하실겁니다. 그대로 `classifier`에 넘겨봅시다:
38 |
39 | ```py
40 | classifier(example["audio"]["array"])
41 | ```
42 |
43 | **Output:**
44 | ```out
45 | [
46 | {"score": 0.9631525278091431, "label": "pay_bill"},
47 | {"score": 0.02819698303937912, "label": "freeze"},
48 | {"score": 0.0032787492964416742, "label": "card_issues"},
49 | {"score": 0.0019414445850998163, "label": "abroad"},
50 | {"score": 0.0008378693601116538, "label": "high_value_payment"},
51 | ]
52 | ```
53 |
54 | 모델은 전화하는 사람이 청구서의 지불 방법에 대해 묻고 있다고 매우 확신하고 있습니다. 실제 레이블은 어떤지 확인해봅시다:
55 |
56 | ```py
57 | id2label = minds.features["intent_class"].int2str
58 | id2label(example["intent_class"])
59 | ```
60 |
61 | **Output:**
62 | ```out
63 | "pay_bill"
64 | ```
65 |
66 | 만세! 예측값이 맞았습니다! 운 좋게도 우리는 필요한 레이블을 정확하게 분류할 수 있는 모델을 찾을 수 있었습니다. 그러나 분류 작업을 다루는 많은 경우에는 사전학습된 모델의 클래스가 우리가 바라는 분류 클래스와 일치하지 않습니다. 이와 같은 경우, 여러분은 사전학습된 모델을 "보정(calibrate)"하여 여러분의 클래스 레이블에 맞출 수 있습니다. 이후 단원에서 이를 어떻게 하는지 배우게 됩니다. 이제 음성 처리에서 매우 일반적인 작업인 _자동 음성 인식_에 대해 살펴봅시다.
67 |
--------------------------------------------------------------------------------
/chapters/ko/chapter2/hands_on.mdx:
--------------------------------------------------------------------------------
1 | # 실습 과제[[hands-on-exercise]]
2 |
3 | 이 과제는 평가의 대상은 아닙니다. 단지 나머지 코스를 위해 여러분이 라이브러리와 툴에 익숙해지는 것을 목적으로 합니다. 구글 코랩, 🤗 Datasets, librosa, 🤗 Transformers에 이미 익숙하시다면 과제를 건너뛰셔도 좋습니다.
4 |
5 | 1. [구글 코랩](https://colab.research.google.com) 노트북을 생성해보세요.
6 | 2. 🤗 Datasets을 이용해 여러분이 원하시는 언어의 [`facebook/voxpopuli` 데이터셋](https://huggingface.co/datasets/facebook/voxpopuli) 학습 데이터를 스트리밍 모드로 불러와보세요.
7 | 3. 데이터셋의 `train` 부분에서 세번째 데이터를 불러와 보세요. 이 데이터의 feature를 고려할 때, 어떤 오디오 작업에 이 데이터셋을 쓸 수 있으실 것 같나요?
8 | 4. 이 데이터의 파형과 스펙트로그램을 그려보세요.
9 | 5. [🤗 허브](https://huggingface.co/models)에서 사전학습된 모델을 둘러보고 여러분이 고른 언어의 자동 음성 인식 모델을 선택해보세요. 그에 맞는 파이프라인을 인스턴스화 하시고 음성 데이터를 텍스트로 바꿔보세요.
10 | 6. 여러분이 파이프라인에서 얻은 출력 텍스트와 실제 데이터의 텍스트를 비교해보세요.
11 |
12 | 과제를 푸는데 어려움이 있다면 [풀이 예시](https://colab.research.google.com/drive/1NGyo5wFpRj8TMfZOIuPaJHqyyXCITftc?usp=sharing)를 살펴보는 것도 좋습니다.
13 | 뭔가 흥미로운 것을 발견하셨나요? 멋진 모델을 찾으셨나요? 아름다운 스펙트로그램을 얻으셨나요? 트위터에 여러분의 작업 결과와 발견들을 공유해보세요!
14 |
15 | 다음 챕터에선 여러 오디오 트랜스포머의 구조에 대해 알아보고 여러분만의 모델을 학습해봅시다!
16 |
--------------------------------------------------------------------------------
/chapters/ko/chapter2/introduction.mdx:
--------------------------------------------------------------------------------
1 | # 2단원. 오디오의 응용에 대한 소개[[unit-2-a-gentle-introduction-to-audio-applications]]
2 |
3 | 허깅페이스 오디오 코스의 두번째 단원에 오신것을 환영합니다! 지금까지는 오디오 데이터의 기본 개념을 살펴보고 🤗 Datasets과 🤗 Transformers 라이브러리를 활용해 오디오 데이터셋을 처리하는 방법을 배웠습니다. 또한 샘플링 속도, 진폭, 비트뎁스, 파형, 스펙트로그램, 사전학습된 모델을 위해 데이터를 전처리하는 방법에 관하여도 살펴봤습니다.
4 |
5 | 이 시점에서 여러분은 🤗 Transformers로 처리할 수 있는 오디오 작업들에 관해 배우고 싶으실 것이며 이에 필요한 기초 지식은 모두 갖추셨을 것입니다. 몇 가지 놀라운 오디오 작업 예제들을 살펴봅시다:
6 |
7 | * **오디오 분류(Audio classification)**: 오디오 클립을 쉽게 다른 카테고리들로 분류합니다. 녹음된 소리가 개가 짖는 소리인지 고양이가 우는 소리인지를 구분한다거나, 노래가 어떤 음악 장르에 속하는지 등을 판별합니다.
8 | * **자동 음성 인식(Automatic speech recognition)**: 오디오 클립에서 자동으로 자막을 만듭니다. "오늘 하루 어때요?"와 같이 누군가가 말하는 녹음 내용을 텍스트로 변환할 수 있습니다. 메모를 할 때 상당히 유용합니다!
9 | * **화자 구분(Speaker diarization)**: 녹음에서 누가 말하고 있는지 궁금했던 적이 있나요? 🤗 Transformers를 사용하면 오디오 클립의 어느 시점에 누가 말하는지를 구분할 수 있습니다. "Alice"와 "Bob" 두 사람의 대화 녹음에서 그들을 구분할 수 있다고 상상해 보세요.
10 | * **텍스트 음성 변환(Text to speech)**: 텍스트의 나레이션을 만들어 오디오북을 만들거나 접근성(accessibility)을 향상시킬 수도 있고 게임의 NPC에게 목소리를 부여할 수도 있습니다. 🤗 Transformers를 사용하면 쉬운 일입니다!
11 |
12 | 이번 단원에서는 🤗 Transformers의 `pipeline()` 함수를 사용하여 이런 작업들에 사전학습된 모델을 쓰는 법을 알아보겠습니다.
13 | 특히, 사전학습된 모델이 오디오 분류와 자동 음성 인식에 어떻게 쓰이는지를 살펴보겠습니다.
14 | 시작해봅시다!
15 |
--------------------------------------------------------------------------------
/chapters/ko/chapter3/classification.mdx:
--------------------------------------------------------------------------------
1 | # 오디오 분류 아키텍처[[audio-classification-architectures]]
2 |
3 | 오디오 분류의 목표는 오디오 입력에 대한 클래스 레이블을 예측하는 것입니다. 모델은 전체 입력 시퀀스를 포괄하는 단일 클래스 레이블을 예측하거나 모든 오디오 프레임(일반적으로 입력 오디오의 20밀리초마다)에 대한 레이블을 예측할 수 있으며, 이 경우 모델의 출력은 클래스 레이블 확률의 시퀀스입니다. 전자의 예로는 어떤 새가 특정 소리를 내는지 감지하는 것을 들 수 있고, 후자의 예로는 특정 순간에 어떤 화자가 말하는지 예측하는 화자 구분(speaker diarization)을 들 수 있습니다.
4 |
5 | ## 스펙트로그램을 사용한 분류[[classification-using-spectrograms]]
6 |
7 | 오디오 분류를 수행하는 가장 쉬운 방법 중 하나는 이미지 분류 문제인 것처럼 가정하는 것입니다!
8 |
9 | 스펙트로그램은 `(주파수, 시퀀스 길이)` 모양의 2차원 텐서라는 것을 기억하세요. [오디오 데이터 챕터](../chapter1/audio_data)에서 이러한 스펙트로그램을 이미지로 그려보았습니다. 여러분 아시나요? 말 그대로 스펙트로그램을 이미지로 취급하고 ResNet과 같은 일반 CNN 분류기 모델에 전달하면 매우 좋은 예측 결과를 얻을 수 있습니다. 더 좋은 방법은 ViT와 같은 이미지 트랜스포머 모델을 사용하는 것입니다.
10 |
11 | 이것이 바로 **오디오 스펙트로그램 트랜스포머**가 하는 일입니다. 이 모델은 ViT 또는 비전 트랜스포머 모델을 사용하며, 일반 이미지 대신 스펙트로그램을 입력으로 전달합니다. 트랜스포머의 셀프 어텐션 레이어 덕분에 이 모델은 CNN보다 글로벌 컨텍스트를 더 잘 포착할 수 있습니다.
12 |
13 | ViT와 마찬가지로 AST(Audio Spectrogram Transformer) 모델은 오디오 스펙트로그램을 16×16픽셀의 부분적으로 겹치는 이미지 패치 시퀀스로 분할합니다. 그런 다음 이 패치 시퀀스는 일련의 임베딩으로 투영되고, 이 임베딩은 평소와 같이 트랜스포머 인코더에 입력으로 제공됩니다. AST는 인코더 전용 트랜스포머 모델이므로 출력은 16×16 입력 패치마다 하나씩 숨겨진 상태 시퀀스입니다. 여기에는 은닉 상태를 분류 확률에 매핑하기 위해 시그모이드 활성화가 포함된 간단한 분류 계층이 있습니다.
14 |
15 |
16 |

17 |
18 |
19 | 논문 [AST: 오디오 스펙트로그램 트랜스포머](https://arxiv.org/pdf/2104.01778.pdf)에서 가져온 이미지
20 |
21 |
22 | 💡 여기서는 스펙트로그램이 이미지와 동일하다고 가정하지만, 중요한 차이점이 있습니다. 예를 들어, 이미지의 내용을 위아래로 이동해도 일반적으로 이미지에 포함된 내용의 의미는 변하지 않습니다. 그러나 스펙트로그램을 위아래로 이동하면 소리에 포함된 주파수가 변경되어 소리의 성격이 완전히 달라집니다. 이미지는 변환 시에도 변하지 않지만 스펙트로그램은 그렇지 않습니다. 스펙트로그램을 이미지로 취급하는 것은 실제로는 매우 잘 작동할 수 있지만 실제로는 같은 것이 아니라는 점을 명심하세요.
23 |
24 |
25 | ## 모든 트랜스포머는 분류기가 될 수 있습니다.[[any-transformer-can-be-a-classifier]]
26 |
27 | [이전 섹션](ctc)에서 CTC가 인코더 전용 트랜스포머를 사용하여 자동 음성 인식을 수행하는 데 효율적인 기술이라는 것을 살펴보았습니다. 이러한 CTC 모델은 이미 토큰화 어휘에서 클래스 레이블에 대한 확률을 예측하는 분류기입니다. 라벨을 변경하고 특수한 CTC 손실 대신 크로스 엔트로피 손실 함수로 훈련하면 CTC 모델을 범용 오디오 분류기로 전환할 수 있습니다.
28 |
29 | 예를 들어, HF 트랜스포머에는 `Wav2Vec2ForCTC` 모델뿐만 아니라 `Wav2Vec2ForSequenceClassification` 및 `Wav2Vec2ForAudioFrameClassification` 모델도 있습니다. 이러한 모델의 아키텍처 간의 유일한 차이점은 분류 계층의 크기와 사용되는 손실 함수입니다.
30 |
31 | 실제로 모든 인코더 전용 오디오 트랜스포머 모델은 은닉 상태 시퀀스 위에 분류 레이어를 추가하여 오디오 분류기로 전환할 수 있습니다. (분류기에는 일반적으로 트랜스포머 디코더가 필요하지 않습니다.)
32 |
33 | 전체 시퀀스에 대한 단일 분류 점수를 예측하기 위해 모델(Wav2Vec2ForSequenceClassification)에서는 숨겨진 상태의 평균을 구하여 분류 레이어에 입력합니다. 출력은 단일 확률 분포입니다.
34 |
35 | 각 오디오 프레임에 대해 별도의 분류를 만들기 위해, 분류기(Wav2Vec2ForAudioFrameClassification)는 은닉 상태의 시퀀스에서 실행되므로 분류기의 출력도 시퀀스입니다.
--------------------------------------------------------------------------------
/chapters/ko/chapter3/quiz.mdx:
--------------------------------------------------------------------------------
1 |
2 |
3 | # 이번 코스에 대한 이해도를 확인해보세요[[check-your-understanding-of-the-course-material]]
4 |
5 | ### 1. 보코더(vocoder)는 무엇일까요?
6 |
7 |
24 |
25 | ### 2. Wav2Vec2는 어떤 항목에 예제일까요?
26 |
27 |
44 |
45 | ### 3. CTC 알고리즘에서 빈 토큰은 어떤 역할을 하나요?
46 |
47 | 토큰과 유사합니다.",
60 | explain: ""
61 | }
62 | ]}
63 | />
64 |
65 | ### 4. 다음 중 CTC 모델에 대한 설명 중 거짓은 무엇입니까?
66 |
67 |
84 |
85 | ### 5. Whisper모델은 어떤 항목의 예제일까요?
86 |
87 |
104 |
105 | ### 6. 오디오 분류를 수행하는 가장 쉬운 방법은 무엇인가요?
106 |
107 |
124 |
125 | ### 7. 참인가요, 거짓인가요? 분류를 위해 스펙트로그램을 이미지로 처리할 때는 항상 이미지 이동, 자르기 또는 크기 조정과 같은 이미지 데이터 증강 기술을 활용할 수 있습니다.
126 |
127 |
140 |
--------------------------------------------------------------------------------
/chapters/ko/chapter3/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # 추가 자료 및 리소스[[supplemental-reading-and-resources]]
2 |
3 | 다양한 트랜스포머 아키텍처에 대해 더 자세히 알아보고 음성 처리 분야의 다양한 애플리케이션에 대해 알아보려면 이 백서를 확인하세요:
4 |
5 | ### 음성 처리를 위한 트랜스포머: 설문 조사[[transformers-in-speech-processing-a-survey]]
6 |
7 | 작성자: Siddique Latif, Aun Zaidi, Heriberto Cuayahuitl, Fahad Shamshad, Moazzam Shoukat, Junaid Qadir
8 |
9 | "자연어 처리 분야에서 트랜스포머의 놀라운 성공은 음성 처리 커뮤니티의 관심을 불러일으켰고, 음성 시퀀스 내에서 장거리 종속성을 모델링할 수 있는 트랜스포머의 잠재력에 대한 탐구로 이어졌습니다. 최근 트랜스포머는 자동 음성 인식, 음성 합성, 음성 번역, 음성 준언어학, 음성 향상, 음성 대화 시스템 및 수많은 멀티모달 애플리케이션을 포함한 다양한 음성 관련 영역에서 각광받고 있습니다. 이 백서에서는 음성 기술 내 다양한 하위 분야의 연구를 연결하는 것을 목표로 하는 포괄적인 설문조사를 제시합니다. 음성 기술 환경 전반의 연구 결과를 통합함으로써, 이 분야를 발전시키기 위해 트랜스포머의 힘을 활용하는 데 관심이 있는 연구자에게 귀중한 리소스를 제공합니다.
10 | 연구자들에게 귀중한 리소스를 제공합니다. 음성 처리에서 랜포머가 직면한 문제를 파악하는 동시에 이러한 문제를 해결할 수 있는 잠재적 솔루션에 대한 통찰력도 제공합니다."
11 |
12 | [arxiv.org/abs/2303.11607](https://arxiv.org/abs/2303.11607)
13 |
--------------------------------------------------------------------------------
/chapters/ko/events/introduction.mdx:
--------------------------------------------------------------------------------
1 | # 라이브 세션과 워크샵[[live-sessions-and-workshops]]
2 |
3 | 새 오디오 트랜스포머 코스: Paige Bailey(DeepMind), 김석환(Amazon Alexa AI), Brian McFee(Librosa)가 함께하는 라이브 런칭 이벤트
4 |
5 |
6 |
--------------------------------------------------------------------------------
/chapters/pt-BR/_toctree.yml:
--------------------------------------------------------------------------------
1 | - title: Unidade 0. Bem vindo ao Curso!
2 | sections:
3 | - local: chapter0/introduction
4 | title: O que esperar deste curso
5 | - local: chapter0/get_ready
6 | title: Prepare-se
7 | - local: chapter0/community
8 | title: Junte-se à comunidade
9 |
10 | - title: Unidade 1. Trabalhando com dados de áudio
11 | sections:
12 | - local: chapter1/introduction
13 | title: O que você vai aprender
14 | - local: chapter1/audio_data
15 | title: Introdução aos dados de áudio
16 | - local: chapter1/load_and_explore
17 | title: Carregue e explore um dataset de áudio
18 | - local: chapter1/preprocessing
19 | title: Pré-processamento do dados de áudio
20 | - local: chapter1/streaming
21 | title: Streaming de dados de áudio
22 | - local: chapter1/quiz
23 | title: Quiz
24 | quiz: 1
25 | - local: chapter1/supplemental_reading
26 | title: Leitura e material adicional
--------------------------------------------------------------------------------
/chapters/pt-BR/chapter0/community.mdx:
--------------------------------------------------------------------------------
1 | # Junte-se à comunidade!
2 |
3 | Convidamos você a [se juntar à nossa comunidade vibrante e solidária no Discord](http://hf.co/join/discord). Você terá a oportunidade de conhecer
4 | alunos com interesses semelhantes, trocar ideias e receber feedback valioso sobre seus exercícios práticos. Você pode fazer perguntas,
5 | compartilhar materiais e colaborar com outros.
6 |
7 | Nossa equipe também está ativa no Discord e está disponível para fornecer suporte e orientação quando você precisar.
8 | Juntar-se à nossa comunidade é uma excelente maneira de se manter motivado, engajado e conectado, e estamos ansiosos para
9 | ver você lá!
10 |
11 | ## O que é Discord?
12 |
13 | Discord é uma plataforma de bate-papo gratuita. Se você já usou o Slack, vai achar bastante semelhante. O servidor do Discord do Hugging Face
14 | é o lar de uma comunidade próspera de 18.000 especialistas em IA, alunos e entusiastas dos quais você pode fazer parte.
15 |
16 | ## Navegando pelo Discord
17 |
18 | Uma vez que você se inscreveu em nosso servidor do Discord, você precisará escolher os tópicos de seu interesse clicando em `#role-assignment`
19 | à esquerda. Você pode escolher quantas categorias diferentes quiser. Para se juntar a outros alunos deste curso, certifique-se de
20 | clicar em "ML for Audio" (#ml-4-audio).
21 | Explore os canais e compartilhe algumas coisas sobre você no canal `#introduce-yourself`.
22 |
23 | ## Canais do curso de áudio
24 |
25 | Há muitos canais focados em vários tópicos em nosso servidor do Discord. Você encontrará pessoas discutindo artigos, organizando
26 | eventos, compartilhando seus projetos e ideias, fazendo brainstorming e muito mais.
27 |
28 | Como um aluno do curso de áudio, você pode achar o seguinte conjunto de canais particularmente relevante:
29 |
30 | * `#audio-announcements`: atualizações sobre o curso, notícias do Hugging Face relacionadas a tudo sobre áudio, anúncios de eventos e mais.
31 | * `#audio-study-group`: um lugar para trocar ideias, fazer perguntas sobre o curso e iniciar discussões.
32 | * `#audio-discuss`: um lugar geral para ter discussões sobre coisas relacionadas ao áudio.
33 |
34 | Além de se juntar ao `#audio-study-group`, sinta-se livre para criar seu próprio grupo de estudos, aprender juntos é sempre mais fácil!
35 |
--------------------------------------------------------------------------------
/chapters/pt-BR/chapter0/get_ready.mdx:
--------------------------------------------------------------------------------
1 | # Prepare-se para iniciar o curso
2 |
3 | Esperamos que você esteja animado para começar o curso, e projetamos esta página para garantir que você tenha tudo o que precisa para vir com tudo!
4 |
5 | ## Passo 1. Inscreva-se
6 |
7 | Para ficar por dentro de todas as atualizações e eventos sociais especiais, inscreva-se no curso.
8 |
9 | [👉 INSCREVA-SE](http://eepurl.com/insvcI)
10 |
11 | ## Passo 2. Crie uma conta no Hugging Face
12 |
13 | Se você ainda não tem uma, crie uma conta no Hugging Face (é grátis). Você precisará dela para completar tarefas práticas, receber seu certificado de conclusão, explorar modelos pré-treinados, acessar datasets e muito mais.
14 |
15 | [👉 CRIE UMA CONTA NO HUGGING FACE](https://huggingface.co/join)
16 |
17 | ## Passo 3. Revise os fundamentos (se necessário)
18 |
19 | Presumimos que você esteja familiarizado com os conceitos básicos de deep learning e o uso de transformers. Se você precisar revisar seu entendimento sobre transformers, veja o nosso [Curso de NLP](https://huggingface.co/course/chapter1/1).
20 |
21 | ## Passo 4. Verifique sua configuração
22 |
23 | Para acompanhar os materiais do curso, você precisará de:
24 | - Um computador com conexão à internet
25 | - [Google Colab](https://colab.research.google.com) para os exercícios práticos. A versão gratuita é suficiente. Se você nunca usou o Google Colab antes, confira este [caderno de introdução oficial](https://colab.research.google.com/notebooks/intro.ipynb?hl=pt-BR).
26 |
27 |
28 |
29 | Como alternativa à versão gratuita do Google Colab, você pode usar seu próprio ambiente local ou o Kaggle. O Kaggle Notebooks oferece um número fixo de horas de GPU e têm funcionalidades semelhantes ao Google Colab, no entanto, existem diferenças quando se trata de compartilhar seus modelos no 🤗 Hub (para completar tarefas, por exemplo). Se você decidir usar o Kaggle como sua ferramenta de escolha, confira o [notebook de exemplo do Kaggle](https://www.kaggle.com/code/michaelshekasta/test-notebook) criado por [@michaelshekasta](https://github.com/michaelshekasta). Este notebook demonstra como você pode treinar e compartilhar seu modelo treinado no 🤗 Hub.
30 |
31 |
32 |
33 | ## Passo 5. Junte-se à comunidade
34 |
35 | Inscreva-se em nosso Discord, o lugar onde você pode trocar ideias com seus colegas de classe e entrar em contato conosco (a equipe do Hugging Face).
36 |
37 | [👉 JUNTE-SE À COMUNIDADE NO DISCORD](http://hf.co/join/discord)
38 |
39 | Para saber mais sobre nossa comunidade no Discord e como aproveitar ao máximo, confira a [próxima página](community).
40 |
--------------------------------------------------------------------------------
/chapters/pt-BR/chapter1/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Unidade 1. Trabalhando com dados de áudio
2 |
3 | ## O que você aprenderá nesta unidade
4 |
5 | Todo processamento de áudio ou fala começa com um arquivo de áudio. Antes de aprofundarmos nestes tarefas de áudio, é importante entender o que esses arquivos realmente contêm e como trabalhar com eles.
6 |
7 | Nesta unidade, você vai entender a terminologia fundamental relacionada a dados de áudio, incluindo aquelas formas de ondas, taxa de amostragem e espectrograma. Você também aprenderá a trabalhar com datasets de áudio, incluindo carregar e pré-processar, e como transmitir, de forma eficiente, grandes quantidades de datasets em tempo real (stream).
8 |
9 | Ao final desta unidade, você terá uma compreensão sólida da terminologia essencial de dados de áudio e estará equipado com as habilidades necessárias para trabalhar datasets de áudio para várias aplicações. O conhecimento que você adquirirá nesta unidade servirá de base para entender o restante do curso.
--------------------------------------------------------------------------------
/chapters/pt-BR/chapter1/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # Aprenda mais
2 |
3 | Esta unidade cobriu muitos conceitos fundamentais relevantes para a compreensão de dados de áudio e como trabalhar com eles.
4 | Quer aprender mais? Aqui você encontrará recursos adicionais que ajudarão a aprofundar seu entendimento dos tópicos e
5 | melhorar sua experiência de estudos.
6 |
7 | No vídeo a seguir (em inglês), Monty Montgomery, da xiph.org, apresenta demonstrações em tempo real de amostragem, quantização,
8 | profundidade de bits e dither em equipamentos de áudio reais usando tanto análise digital moderna quanto equipamentos analógicos antigos, confira:
9 |
10 |
11 |
12 | Se você deseja se aprofundar no processamento de sinal digital, confira o livro gratuito ["Teoria dos Sinais Digitais"](https://brianmcfee.net/dstbook-site/content/intro.html) (em inglês)
13 | escrito por Brian McFee, um Professor Assistente de Tecnologia Musical e Ciência de Dados na Universidade de Nova York e o principal maintainer
14 | do pacote `librosa`.
15 |
--------------------------------------------------------------------------------
/chapters/ru/chapter0/community.mdx:
--------------------------------------------------------------------------------
1 | # Присоединяйтесь к сообществу!
2 |
3 | Мы приглашаем вас [присоединиться к нашему активному и поддерживающему сообществу в Discord](http://hf.co/join/discord). У вас появится
4 | возможность общаться с единомышленниками, обмениваться идеями и получать ценные отзывы о своих практических занятиях. Вы сможете задавать вопросы,
5 | делиться ресурсами и сотрудничать с другими.
6 |
7 | Наша команда также активно работает в Discord и готова оказать поддержку и дать рекомендации, если они вам понадобятся.
8 | Присоединяйтесь к нашему сообществу - это отличный способ поддерживать мотивацию, участие и связь, мы будем рады видеть
9 | вас там!
10 |
11 | ## Что такое Discord?
12 |
13 | Discord - это бесплатная платформа для общения. Если вы пользовались Slack, то найдете его очень похожим. Сервер Hugging Face Discord
14 | является домом для процветающего сообщества из 18 000 экспертов, исследователей и энтузиастов ИИ, частью которого можете стать и вы.
15 |
16 | ## Навигация по Discord
17 |
18 | После регистрации на нашем Discord-сервере вам нужно будет выбрать интересующие вас темы, нажав на кнопку `#role-assignment`
19 | слева. Вы можете выбрать сколько угодно различных категорий. Чтобы присоединиться к другим слушателям этого курса, обязательно
20 | нажмите "ML for Audio and Speech".
21 | Изучите каналы и расскажите немного о себе на канале `#introduce-yourself`.
22 |
23 | ## Каналы аудиокурса
24 |
25 | На нашем сервере Discord существует множество каналов, посвященных различным темам. Здесь можно найти людей, обсуждающих статьи, организующих
26 | мероприятия, делящихся своими проектами и идеями, проводящих мозговые штурмы и многое другое.
27 |
28 | Для слушателей аудиокурсов особенно актуальным может оказаться следующий набор каналов:
29 |
30 | * `#audio-announcements`: обновления курса, новости из Hugging Face, связанные со всем тем, что касается работы с аудио, анонсы мероприятий и многое другое.
31 | * `#audio-study-group`: место, где можно обменяться идеями, задать вопросы по курсу и начать дискуссию.
32 | * `#audio-discuss`: общее место для обсуждения вопросов, связанных с аудио.
33 |
34 | Помимо присоединения к `#audio-study-group`, не стесняйтесь создавать свою собственную учебную группу - учиться вместе всегда легче!
35 |
--------------------------------------------------------------------------------
/chapters/ru/chapter0/get_ready.mdx:
--------------------------------------------------------------------------------
1 | # Подготовьтесь к прохождению курса
2 |
3 | Мы надеемся, что вам не терпится приступить к изучению курса, и мы создали эту страницу, чтобы у вас было
4 | все необходимое для того, чтобы вы могли сразу же приступить к работе!
5 |
6 | ## Шаг 1. Зарегистрируйтесь
7 |
8 | Чтобы быть в курсе всех обновлений и специальных социальных мероприятий, подпишитесь на курс.
9 |
10 | [👉 ПОДПИСАТЬСЯ](http://eepurl.com/insvcI)
11 |
12 | ## Шаг 2. Получите учетную запись Hugging Face
13 |
14 | Если у вас ее еще нет, создайте учетную запись Hugging Face (это бесплатно). Она понадобится вам для выполнения практических заданий, для
15 | получения сертификата о прохождении курса, для изучения предварительно обученных моделей, для доступа к наборам данных и многого другого.
16 |
17 | [👉 СОЗДАТЬ АККАУНТ HUGGING FACE](https://huggingface.co/join)
18 |
19 | ## Шаг 3. Освежите в памяти основы (если это необходимо)
20 |
21 | Мы предполагаем, что вы знакомы с основами глубокого обучения и имеете общее представление о трансформерах. Если вам необходимо
22 | подтянуть свои знания о трансформерах, обратитесь к нашему [курсу по NLP](https://huggingface.co/course/chapter1/1).
23 |
24 | ## Шаг 4. Проверьте ваши настройки
25 |
26 | Для изучения материалов курса вам понадобятся:
27 | - Компьютер с подключением к Интернет
28 | - [Google Colab](https://colab.research.google.com) для практических занятий. Достаточно бесплатной версии.
29 |
30 | Если вы еще никогда не использовали Google Colab, ознакомьтесь с этим [официальным ознакомительным блокнотом](https://colab.research.google.com/notebooks/intro.ipynb).
31 |
32 | ## Шаг 5. Присоединяйтесь к сообществу
33 |
34 | Зарегистрируйтесь на нашем сервере Discord - месте, где вы можете обмениваться идеями с однокурсниками и обращаться к нам (команде Hugging Face).
35 |
36 | [👉 ПРИСОЕДИНЯЙТЕСЬ К СООБЩЕСТВУ В DISCORD](http://hf.co/join/discord)
37 |
38 | Чтобы узнать больше о нашем сообществе в Discord и о том, как извлечь из него максимум пользы, посетите [следующую страницу](community).
39 |
--------------------------------------------------------------------------------
/chapters/ru/chapter1/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Раздел 1. Работа с аудио данными
2 |
3 | ## Что вы узнаете в этом разделе
4 |
5 | Любая аудио или голосовая задача начинается с аудиофайла. Прежде чем приступить к решению этих задач, необходимо
6 | понять, что на самом деле содержат эти файлы и как с ними работать.
7 |
8 | В этом разделе вы получите представление о фундаментальной терминологии, связанной с аудиоданными, включая форму волны,
9 | частоту дискретизации и спектрограмму. Вы также узнаете, как работать с наборами аудиоданных, включая загрузку и препроцессинг
10 | аудиоданных, и как эффективно передавать большие наборы данных.
11 |
12 | К концу этого раздела вы будете хорошо разбираться в основной терминологии аудиоданных и овладеете навыками,
13 | необходимыми для работы с аудио наборами данных в различных приложениях. Знания, которые вы получите в этом разделе,
14 | заложат основу для понимания остальной части курса.
--------------------------------------------------------------------------------
/chapters/ru/chapter1/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # Как узнать больше
2 |
3 | В данном разделе рассмотрены многие фундаментальные понятия, имеющие отношение к пониманию аудиоданных и работе с ними.
4 | Хотите узнать больше? Здесь вы найдете дополнительные ресурсы, которые помогут вам углубить понимание тем и
5 | повысить эффективность обучения.
6 |
7 | В следующем видео Монти Монтгомери из xiph.org демонстрирует в реальном времени дискретизацию, квантование,
8 | битовую глубину и дизеринг на реальном аудиооборудовании с использованием как современного цифрового анализа, так и винтажного аналогового стендового оборудования, посмотрите его:
9 |
10 |
11 |
12 | Если вы хотите глубже погрузиться в тему цифровой обработки сигналов, обратите внимание на бесплатную книгу ["Теория цифровых сигналов"](https://brianmcfee.net/dstbook-site/content/intro.html), автором которой является Брайан Макфи, доцент кафедры музыкальных технологий и науки о данных Нью-Йоркского университета и главный сопровождающий
13 | пакета `librosa`.
14 |
--------------------------------------------------------------------------------
/chapters/ru/chapter2/hands_on.mdx:
--------------------------------------------------------------------------------
1 | # Практическое занятие
2 |
3 | Это упражнение не оценивается и предназначено для ознакомления с инструментами и библиотеками, которые вы будете использовать на протяжении всего курса.
4 | Если вы уже имеете опыт работы с Google Colab, 🤗 Datasets, librosa и 🤗 Transformers, вы можете пропустить это упражнение.
5 |
6 | 1. Создайте блокнот [Google Colab](https://colab.research.google.com).
7 | 2. Используйте 🤗 Datasets для загрузки train split набора данных
8 | [`facebook/voxpopuli`](https://huggingface.co/datasets/facebook/voxpopuli) на выбранном вами языке в потоковом режиме.
9 | 3. Получите третий пример из части `train` набора данных и исследуйте его. Учитывая особенности этого примера, для
10 | решения каких аудиозадач можно использовать этот набор данных?
11 | 4. Постройте осциллограмму и спектрограмму этого примера.
12 | 5. Перейдите на сайт [🤗 Hugging Face Hub](https://huggingface.co/models), изучите предварительно обученные модели и найдите ту,
13 | которая может быть использована для автоматического распознавания речи на выбранном ранее языке. Инстанцируйте соответствующий конвейер
14 | с найденной моделью и транскрибируйте пример.
15 |
16 | Если вы затрудняетесь с выполнением этого упражнения, не стесняйтесь заглянуть в [пример решения](https://colab.research.google.com/drive/1NGyo5wFpRj8TMfZOIuPaJHqyyXCITftc?usp=sharing).
17 | Открыли для себя что-то интересное? Нашли классную модель? Получили красивую спектрограмму? Не стесняйтесь делиться своими работами и открытиями в Twitter!
18 |
19 | В следующих главах вы узнаете больше о различных архитектурах аудиотрансформеров и создадите свою собственную модель!
20 |
--------------------------------------------------------------------------------
/chapters/ru/chapter2/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Раздел 2. Краткое введение в аудиоприложения
2 |
3 | Добро пожаловать во второй раздел аудиокурса от Hugging Face! Ранее мы рассмотрели основы аудиоданных
4 | и научились работать с наборами аудиоданных с помощью библиотек 🤗 Datasets и 🤗 Transformers. Мы обсудили различные
5 | понятия, такие как частота дискретизации, амплитуда, битовая глубина, форма волны и спектрограммы, а также рассмотрели
6 | способы предварительной обработки данных для подготовки их к использованию в предварительно обученной модели.
7 |
8 | К этому моменту вы, возможно, уже хотите узнать о том, с какими аудиозадачами могут справиться 🤗 Transformers, и
9 | у вас есть все необходимые базовые знания, необходимые для дальнейшего погружения! Давайте рассмотрим некоторые из
10 | примеров умопомрачительных аудиозадач:
11 |
12 | * **Аудио классификация**: простая классификация аудиоклипов по различным категориям. Вы можете определить, лает ли
13 | на записи собака или мяукает кошка, или к какому музыкальному жанру относится та или иная композиция.
14 | * **Автоматическое распознавание речи**: преобразование аудиоклипов в текст путем их автоматической транскрибации.
15 | Вы можете получить текстовое представление записи разговора, например, "Как дела?". Очень полезно для ведения заметок!
16 | * **Диаризация диктора**: Вы когда-нибудь задумывались, кто говорит в записи? С помощью 🤗 Transformers вы сможете определить,
17 | кто из дикторов говорит в тот или иной момент времени в аудиоклипе. Представьте себе, что вы можете различить Алису и Боба
18 | в записи их разговора.
19 | * **Перевод текста в речь**: создать дикторскую версию текста, которая может быть использована для создания аудиокниги,
20 | помочь в обеспечении доступности (для людей с ограниченными возможностями) или дать голос NPC в игре. С 🤗 Transformers
21 | вы легко сможете это сделать!
22 |
23 | В этом разделе вы узнаете, как использовать предварительно обученные модели для решения некоторых из этих задач с помощью
24 | функции `pipeline()` из 🤗 Transformers. В частности, мы увидим, как предварительно обученные модели могут быть использованы
25 | для классификации звука и автоматического распознавания речи.
26 | Давайте начнем!
27 |
--------------------------------------------------------------------------------
/chapters/ru/chapter3/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # Дополнительные материалы и ресурсы
2 |
3 | Если вы хотите более подробно изучить различные архитектуры трансформеров и узнать об их применении в обработке речи, обратитесь к этой свежей статье:
4 |
5 | ### Трансформеры в обработке речи: Обзор
6 |
7 | Сиддик Латиф, Аун Заиди, Хериберто Куаяуитль, Фахад Шамшад, Моаззам Шукат, Джунаид Кадир
8 |
9 | "Значительный успех трансформеров в области обработки естественного языка вызвал интерес сообщества специалистов по
10 | обработке речи, что привело к изучению их возможностей для моделирования длительных зависимостей в речевых
11 | последовательностях. В последнее время трансформеры получили широкое распространение в различных областях, связанных
12 | с речью, включая автоматическое распознавание речи, синтез речи, перевод речи, паралингвистику речи, улучшение речи,
13 | системы разговорного диалога и многочисленных мультимодальных приложениях. В данной статье мы представляем комплексный обзор,
14 | цель которого - объединить исследования, проводимые в различных областях речевых технологий. Консолидируя результаты, полученные
15 | в области речевых технологий, мы предоставляем ценный ресурс для исследователей, заинтересованных в использовании возможностей
16 | трансформеров для развития этой области. Мы идентифицируем проблемы, с которыми сталкиваются трансформеры при обработке речи,
17 | а также предлагаем потенциальные решения для их устранения".
18 |
19 | [arxiv.org/abs/2303.11607](https://arxiv.org/abs/2303.11607)
20 |
--------------------------------------------------------------------------------
/chapters/ru/chapter4/demo.mdx:
--------------------------------------------------------------------------------
1 | # Создание демонтрационного образца с Gradio
2 |
3 | В этом заключительном разделе, посвященном классификации звука, мы построим демонстрационный пример [Gradio](https://gradio.app) чтобы
4 | продемонстрировать модель классификации музыки, которую мы только что обучили на наборе данных [GTZAN](https://huggingface.co/datasets/marsyas/gtzan).
5 | Первое, что необходимо сделать, это загрузить контрольную точку дообученной модели с помощью класса `pipeline()` - это уже хорошо знакомо по разделу
6 | [Предварительно обученные модели и наборы данных для классификации звука](classification_models). Вы можете изменить `model_id` на пространство имен
7 | вашей дообученной модели на Hugging Face Hub:
8 |
9 | ```python
10 | from transformers import pipeline
11 |
12 | model_id = "sanchit-gandhi/distilhubert-finetuned-gtzan"
13 | pipe = pipeline("audio-classification", model=model_id)
14 | ```
15 |
16 | Во-вторых, мы определим функцию, которая принимает путь к файлу для входного аудиосигнала и пропускает его через конвейер. Здесь конвейер автоматически
17 | позаботится о том, чтобы загрузить аудиофайл, передискретизировать его до нужной частоты дискретизации и выполнить вывод с помощью модели. Мы берем
18 | предсказания модели `preds` и оформляем их в виде словаря для отображения на выходе:
19 |
20 | ```python
21 | def classify_audio(filepath):
22 | preds = pipe(filepath)
23 | outputs = {}
24 | for p in preds:
25 | outputs[p["label"]] = p["score"]
26 | return outputs
27 | ```
28 |
29 | Наконец, мы запускаем демонстрационную программу Gradio с помощью функции, которую мы только что определили:
30 |
31 | ```python
32 | import gradio as gr
33 |
34 | demo = gr.Interface(
35 | fn=classify_audio, inputs=gr.Audio(type="filepath"), outputs=gr.outputs.Label()
36 | )
37 | demo.launch(debug=True)
38 | ```
39 |
40 | В результате будет запущена демонстрация Gradio, аналогичная той, что работает на Hugging Face Space:
41 |
42 |
--------------------------------------------------------------------------------
/chapters/ru/chapter4/hands_on.mdx:
--------------------------------------------------------------------------------
1 | # Практическое занятие
2 |
3 | Настало время взять в руки несколько Аудио моделей и применить на практике то, чему вы научились.
4 | Это упражнение является одним из четырех практических упражнений, необходимых для получения сертификата об окончании курса.
5 |
6 | Вот инструкции.
7 | В этом блоке мы продемонстрировали дообучение модели Hubert на наборе данных `marsyas/gtzan` для классификации музыки. Accuracy нашего примера составила 83%.
8 | Ваша задача - улучшить этот показатель.
9 |
10 | Вы можете выбрать любую модель на [🤗 Hugging Face Hub](https://huggingface.co/models), которая, по вашему мнению, подходит для классификации аудио, и использовать
11 | точно такой же набор данных [`marsyas/gtzan`](https://huggingface.co/datasets/marsyas/gtzan) для построения собственного классификатора.
12 |
13 | Ваша цель - достичь accuracy 87% на этом наборе данных с помощью вашего классификатора. Вы можете выбрать точно такую же модель, поиграть с гиперпараметрами обучения
14 | или выбрать совершенно другую модель - все зависит от вас!
15 |
16 | Чтобы ваш результат был засчитан в сертификат, не забудьте в конце обучения вывести модель на Hub, как это было показано в данном блоке,
17 | со следующими `**kwargs`:
18 |
19 | ```python
20 | kwargs = {
21 | "dataset_tags": "marsyas/gtzan",
22 | "dataset": "GTZAN",
23 | "model_name": f"{model_name}-finetuned-gtzan",
24 | "finetuned_from": model_id,
25 | "tasks": "audio-classification",
26 | }
27 |
28 | trainer.push_to_hub(**kwargs)
29 | ```
30 |
31 | Вот некоторые дополнительные ресурсы, которые могут оказаться полезными при работе над этим упражнением:
32 | * [Руководство по решению задач классификации звука в документации Transformers](https://huggingface.co/docs/transformers/tasks/audio_classification)
33 | * [Документация по модели Hubert](https://huggingface.co/docs/transformers/model_doc/hubert)
34 | * [Документация по модели M-CTC-T](https://huggingface.co/docs/transformers/model_doc/mctct)
35 | * [Документация Audio Spectrogram Transformer](https://huggingface.co/docs/transformers/model_doc/audio-spectrogram-transformer)
36 | * [Документация Wav2Vec2](https://huggingface.co/docs/transformers/model_doc/wav2vec2)
37 |
38 | Не стесняйтесь создавать демо-версию своей модели и делиться ею в Discord! Если у вас есть вопросы, задавайте их в канале #audio-study-group.
--------------------------------------------------------------------------------
/chapters/ru/chapter4/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Раздел 4. Разработка классификатора музыкальных жанров
2 |
3 | ## Чему вы научитесь и что вы сможете создать
4 |
5 | Классификация звука - одно из наиболее распространенных применений трансформеров в обработке звука и речи. Как и другие
6 | задачи классификации в машинном обучении, эта задача предполагает присвоение одной или нескольких меток аудиозаписи на основе
7 | ее содержания. Например, в случае с речью мы можем захотеть обнаружить, когда произносится фраза-пробуждение вроде "Привет, Siri",
8 | или определить ключевое слово вроде "температура" из произнесенного запроса "Какая сегодня погода?". Другим примером могут служить
9 | звуки окружающей среды, когда мы хотим автоматически различать такие звуки, как "автомобильный гудок", "сирена", "лай собаки" и т.д.
10 |
11 | В этом разделе мы рассмотрим, как предварительно обученные звуковые трансформеры могут применяться в различных задачах классификации звука.
12 | Затем мы произведем дообучение модели-трансформера на задаче классификации музыки, классифицируя песни по жанрам, таким как "поп" и "рок".
13 | Это важная составляющая таких музыкальных стриминговых сервисов, как [Spotify](https://en.wikipedia.org/wiki/Spotify), которые
14 | рекомендуют песни, похожие на те, что слушает пользователь.
15 |
16 | К концу этого раздела вы узнаете, как:
17 |
18 | * Найти подходящие предварительно обученные модели для задачи классификации звука
19 | * Использовать библиотеку 🤗 Datasets и Hugging Face Hub для выбора наборов данных для классификации звука
20 | * Производить дообучение предварительно обученной модели для классификации песен по жанрам
21 | * Создание демо-версии Gradio, позволяющей классифицировать собственные песни
--------------------------------------------------------------------------------
/chapters/ru/chapter5/hands_on.mdx:
--------------------------------------------------------------------------------
1 | # Практическое занятие
2 |
3 | В этом разделе мы изучили сложности дообучения моделей ASR, признавая необходимость времени и ресурсов для дообучения модели, такой как Whisper
4 | (даже с небольшой контрольной точкой), на новом языке. Чтобы предоставить вам практический опыт, мы разработали упражнение, которое поможет вам пройти
5 | через процесс дообучения модели ASR с использованием небольшого набора данных. Основная цель этого упражнения - больше помочь вам ознакомиться с процессом
6 | дообучения, чем стремиться к результатам на уровне продакшн-решений. Мы специально установили низкий показатель метрики, чтобы даже при ограниченных
7 | ресурсах вы могли успешно его достичь.
8 |
9 | Инструкции:
10 |
11 | * Дообучите модель `”openai/whisper-tiny”`, используя американский английский ("en-US") поднабор набора данных `”PolyAI/minds14”`.
12 | * Используйте первые **450 примеров для обучения**, остальные для оценки. Убедитесь, что вы установили `num_proc=1` при предварительной обработке набора данных с использованием метода `.map` (это обеспечит правильную отправку вашей модели для оценки).
13 | * Для оценки модели используйте метрики `wer` и `wer_ortho`, как описано в данном уроке. Однако *не* преобразуйте метрику в проценты, умножая на 100 (например, если WER равен 42%, мы ожидаем увидеть значение 0.42 в этом упражнении).
14 |
15 | После того как вы проведете тонкую настройку модели, убедитесь, что загрузили ее на 🤗 Hugging Face Hub с использованием следующих параметров (`kwargs`):
16 | ```
17 | kwargs = {
18 | "dataset_tags": "PolyAI/minds14",
19 | "finetuned_from": "openai/whisper-tiny",
20 | "tasks": "automatic-speech-recognition",
21 | }
22 | ```
23 | Вы успешно завершите это задание, если показатель WER (`wer`) вашей нормализованный вашей будет ниже **0.37**.
24 |
25 | Не стесняйтесь создать демо вашей модели и поделиться ею в Discord! Если у вас возникнут вопросы, задайте их в канале #audio-study-group.
--------------------------------------------------------------------------------
/chapters/ru/chapter5/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Чему вы научитесь и что создадите
2 |
3 | В этом разделе мы рассмотрим, как трансформеры могут быть использованы для преобразования устной речи в текст - задача, известная как _распознавание речи_ (_speech recognition_).
4 |
5 |
6 |

7 |
8 |
9 | Распознавание речи, известное также как автоматическое распознавание речи (automatic speech recognition - ASR) или преобразование речи в текст
10 | (speech-to-text - STT), является одной из наиболее популярных и интересных задач обработки устной речи. Она используется в широком спектре приложений,
11 | включая диктовку, голосовые помощники, субтитры к видео и транскрибацию переговоров / совещаний.
12 |
13 | Возможно, вы уже не раз пользовались системой распознавания речи, даже не подозревая об этом! Возьмем, к примеру, цифрового ассистента в вашем смартфоне
14 | (Siri, Google Assistant, Alexa). Когда вы пользуетесь такими помощниками, первое, что они делают, - это транскрибируют вашу устную речь в письменный
15 | текст, готовый к использованию для решения последующих задач (например, для поиска прогноза погоды 🌤️).
16 |
17 | Попробуйте воспользоваться демонстрацией распознавания речи, приведенной ниже. Вы можете записать себя с помощью микрофона или перетащить в окно образец
18 | звука для расшифровки:
19 |
20 |
21 |
22 | Распознавание речи является сложной задачей, поскольку требует совместного знания в области звука и текста. Входной звук может содержать много фоновых
23 | шумов и произноситься дикторами с разным акцентом, что затрудняет выделение произносимой речи. В письменном тексте могут присутствовать символы, не
24 | имеющие акустического звучания, например, знаки препинания, которые трудно определить только по звуку. Все это - препятствия, которые нам приходится
25 | преодолевать при создании эффективных систем распознавания речи!
26 |
27 | Теперь, когда мы определились с задачей, можно приступить к более детальному изучению распознавания речи. К концу этого раздела вы будете иметь хорошее
28 | фундаментальное представление о различных доступных предварительно обученных моделях распознавания речи и о том, как использовать их с библиотекой
29 | 🤗 Transformers. Вы также узнаете о процедуре тонкой настройки ASR-модели на выбранный домен или язык, что позволит вам построить производительную
30 | систему для решения любой задачи. Вы сможете продемонстрировать свою модель друзьям и близким, создав "живую" демонстрацию, которая воспринимает любую
31 | устную речь и преобразует ее в текст!
32 |
33 | В частности, мы рассмотрим:
34 |
35 | * [Предварительно обученные модели для распознавания речи](asr_models)
36 | * [Выбор набора данных](choosing_dataset)
37 | * [Оценка и метрики для распознавания речи](evaluation)
38 | * [Как дообучить ASR-систему с помощью Trainer API](fine-tuning)
39 | * [Создание демо](demo)
40 | * [Практическое занятие](hands_on)
--------------------------------------------------------------------------------
/chapters/ru/chapter5/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # Дополнительные материалы и ресурсы
2 |
3 | Этот раздел предоставил практическое введение в распознавание речи, одну из самых популярных задач в области аудио.
4 | Хотите узнать больше? Здесь вы найдете дополнительные ресурсы, которые помогут вам углубить свое понимание темы и повысить качество обучения.
5 |
6 | * [Whisper Talk](https://www.youtube.com/live/fZMiD8sDzzg?feature=share) by Jong Wook Kim: презентация о модели Whisper, в которой объясняются мотивация, архитектура, обучение и результаты, представленные автором Whisper - Джонг Вук Кимом.
7 | * [End-to-End Speech Benchmark (ESB)](https://arxiv.org/abs/2210.13352): научная статья, в которой обосновывается использование орфографического WER вместо нормализованного WER для оценки систем распознавания речи и представляется соответствующий бенчмарк.
8 | * [Fine-Tuning Whisper for Multilingual ASR](https://huggingface.co/blog/fine-tune-whisper): подробный блог-пост, который объясняет, как работает модель Whisper, и подробно описывает пред- и пост-обработку с использованием извлекателя призников и токенизатора.
9 | * [Fine-tuning MMS Adapter Models for Multi-Lingual ASR](https://huggingface.co/blog/mms_adapters): полное руководство по дообучению новых многоязычных моделей распознавания речи Meta AI [MMS](https://ai.facebook.com/blog/multilingual-model-speech-recognition/), при этом замораживая веса базовой модели и обучая только небольшое количество *адаптерных* слоев.
10 | * [Boosting Wav2Vec2 with n-grams in 🤗 Transformers](https://huggingface.co/blog/wav2vec2-with-ngram): блог-пост о сочетании моделей CTC с внешними языковыми моделями (LM) для борьбы со смысловыми и пунктуационными ошибками.
--------------------------------------------------------------------------------
/chapters/ru/chapter6/evaluation.mdx:
--------------------------------------------------------------------------------
1 | # Оценка моделей text-to-speech
2 |
3 | В процессе обучения модели преобразования текста в речь оптимизируются по среднеквадратичной ошибке (mean-square error, MSE) (или средней абсолютной ошибке (mean absolute error, MAE)) между
4 | спрогнозированными значениями спектрограмм и сгенерированными. Как MSE, так и MAE способствуют минимизации разности
5 | между прогнозируемой и целевой спектрограммами. Однако, поскольку TTS - это проблема отображения "один ко многим", т.е. выходная спектрограмма для данного текста может быть представлена множеством
6 | различных способов, оценка полученных моделей преобразования текста в речь (TTS) значительно сложнее.
7 |
8 | В отличие от многих других вычислительных задач, которые могут быть объективно измерены с помощью количественных показателей,
9 | таких как accuracy или precision, оценка TTS в значительной степени зависит от субъективного человеческого анализа.
10 |
11 | Одним из наиболее часто используемых методов оценки систем TTS является качественная оценка с использованием cредней экспертной оценки (Mean Opinion Scores, MOS).
12 | MOS - это субъективная система оценки, которая позволяет людям оценить качество синтезированной речи [NL] по шкале от 1 до 5.
13 | Эти оценки обычно собираются с помощью тестов на прослушивание, в которых участники-люди [NL] прослушивают и оценивают синтезированные образцы речи.
14 |
15 | Одной из основных причин, по которой трудно разработать объективные метрики для оценки TTS, является субъективный характер восприятия
16 | речи. Слушатели имеют различные предпочтения и чувствительность к различным аспектам речи, включая произношение, интонацию, естественность и ясность.
17 | Учесть все эти нюансы восприятия с помощью одного числового значения - сложная задача.
18 | В то же время субъективность человеческой оценки затрудняет сравнение и сопоставление различных систем TTS.
19 |
20 | Кроме того, при такой оценке могут быть упущены некоторые важные аспекты синтеза речи, такие как естественность, выразительность и эмоциональное воздействие.
21 | Эти качества трудно поддаются объективной количественной оценке, но очень важны в приложениях, где синтезированная речь должна передавать человекоподобные качества и вызывать соответствующие эмоциональные реакции.
22 |
23 | В итоге, можно сказать, что оценка моделей преобразования текста в речь является сложной задачей из-за отсутствия единой действительно объективной метрики. Наиболее распространенный метод оценки,
24 | средняя экспертная оценка (MOS), опирается на субъективный человеческий анализ. Хотя MOS дает ценные сведения о качестве синтезированной речи, она также вносит вариативность и субъективность.
25 |
--------------------------------------------------------------------------------
/chapters/ru/chapter6/hands_on.mdx:
--------------------------------------------------------------------------------
1 | # Практическое занятие
2 |
3 | В этом разделе мы рассмотрели аудиозадачу преобразования текста в речь, рассказали о существующих наборах данных, предварительно обученных
4 | моделях и нюансах дообучения SpeechT5 для нового языка.
5 |
6 | Как вы убедились, дообучение моделей для задач преобразования текста в речь может быть сложной задачей в условиях ограниченных ресурсов. В то же время
7 | оценивать модели преобразования текста в речь также нелегко.
8 |
9 | По этим причинам данное практическое занятие будет направлено на отработку навыков, а не на достижение определенного значения метрики.
10 |
11 | Ваша задача - провести дообучение SpeechT5 на выбранном вами наборе данных. Вы можете выбрать
12 | другой язык из того же набора данных `voxpopuli`, либо выбрать любой другой набор данных, приведенный в этом разделе.
13 |
14 | Помните о размере обучающих данных! Для обучения на GPU бесплатного уровня в Google Colab мы рекомендуем ограничить объем обучающих
15 | данных примерно до 10-15 часов.
16 |
17 | После завершения процесса дообучения поделитесь своей моделью, загрузив ее в Hub. Обязательно пометьте модель
18 | как модель `text-to-speech` либо соответствующими параметрами kwargs, либо через графический интерфейс Hub.
19 |
20 | Помните, что основная цель этого упражнения - предоставить вам обширную практику, которая позволит вам отточить свои навыки и
21 | получить более глубокое представление об аудиозадачах преобразования текста в речь.
22 |
--------------------------------------------------------------------------------
/chapters/ru/chapter6/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Раздел 6. От текста к речи
2 |
3 | В предыдущем разделе вы узнали, как использовать трансформеры для преобразования устной речи в текст. Теперь давайте перевернем сценарий
4 | и посмотрим, как можно преобразовать заданный входной текст в аудио вывод, звучащий как человеческая речь.
5 |
6 | Задача, которую мы будем изучать в этом блоке, называется "Преобразование текста в речь " (Text-to-speech, TTS). Модели, способные преобразовывать текст в слышимую
7 | человеческую речь, имеют широкий спектр потенциальных применений:
8 |
9 | * Вспомогательные приложения: подумайте об инструментах, которые могут использовать эти модели для обеспечения доступа людей с ослабленным зрением к цифровому контенту с помощью звука.
10 | * Озвучивание аудиокниг: перевод письменных книг в аудиоформат делает литературу более доступной для тех, кто предпочитает слушать или испытывает трудности с чтением.
11 | * Виртуальные помощники: TTS-модели являются фундаментальным компонентом виртуальных помощников, таких как Siri, Google Assistant или Amazon Alexa. После того как они с помощью классификационной модели поймали слово "пробуждение" и использовали ASR-модель для обработки запроса, они могут использовать TTS-модель для ответа на ваш запрос.
12 | * Развлечения, игры и изучение языков: озвучивайте персонажей NPC, рассказывайте об игровых событиях или помогайте изучающим язык примерами правильного произношения и интонации слов и фраз.
13 |
14 | Это лишь некоторые примеры, и я уверен, что вы можете придумать множество других! Однако с такой мощью приходит и ответственность
15 | ,важно подчеркнуть, что модели TTS потенциально могут быть использованы в злонамеренных целях.
16 | Например, имея достаточное количество образцов голоса, злоумышленники могут создавать убедительные поддельные аудиозаписи, что приводит к
17 | несанкционированному использованию голоса человека в мошеннических целях или для манипуляций. Если вы планируете собирать данные для дообучения
18 | собственных систем, тщательно продумайте вопросы конфиденциальности и информационного согласия. Получение голосовых данных должно осуществляться с явного согласия
19 | людей, при этом они должны понимать цель, объем и потенциальные риски, связанные с использованием их голоса
20 | в системе TTS. Пожалуйста, используйте преобразование текста в речь ответственно.
21 |
22 | ## Чему вы научитесь и что создадите
23 |
24 | В этом разделе мы поговорим о:
25 |
26 | * [Наборах данных, пригодных для обучения Text-to-speech](tts_datasets)
27 | * [Предварительно обученных моделях для преобразования текста в речь](pre-trained_models)
28 | * [Дообучение SpeechT5 на новом языке](fine-tuning)
29 | * [Оценке моделей TTS](evaluation)
30 |
--------------------------------------------------------------------------------
/chapters/ru/chapter6/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # Дополнительные материалы и ресурсы
2 |
3 | В этом разделе была представлена задача преобразования текста в речь.
4 | Хотите узнать больше? Здесь вы найдете дополнительные ресурсы, которые помогут вам углубить понимание рассматриваемых тем
5 | и повысить эффективность обучения.
6 |
7 | * [HiFi-GAN: генеративные состязательные сети для эффективного и высококачественного синтеза речи](https://arxiv.org/pdf/2010.05646.pdf): статья, в которой представлена HiFi-GAN для синтеза речи.
8 | * [Х-Векторы: Надежные DNN-Эмбединги для распознавания дикторов](https://www.danielpovey.com/files/2018_icassp_xvectors.pdf): статья, в которой представлен метод Х-Векторов для эмбеддингов дикторов.
9 | * [FastSpeech 2: быстрое и высококачественное преобразование текста в речь](https://arxiv.org/pdf/2006.04558.pdf): статья, в которой представлена FastSpeech 2 - еще одна популярная модель преобразования текста в речь, использующая неавторегрессионный TTS метод.
10 | * [Векторно-квантованный подход для синтеза текста в речь на основе спонтанной речи в реальном мире](https://arxiv.org/pdf/2302.04215v1.pdf): статья, посвященная MQTTS - авторегрессионной системе TTS, в которой мел-спектрограммы заменены квантованным дискретным представлением.
11 |
--------------------------------------------------------------------------------
/chapters/ru/chapter7/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Раздел 7. Собираем все воедино 🪢
2 |
3 | Молодцы, что добрались до 7-го раздела 7 🥳 Вы находитесь всего в нескольких шагах от завершения курса и приобретения нескольких последних
4 | навыков, необходимых для работы в области Аудио ML. Что касается понимания, то вы уже знаете все, что нужно знать!
5 | Вместе мы всесторонне рассмотрели основные темы, составляющие аудио домен, и сопутствующую им теорию
6 | (аудио данные, классификацию аудиоданных, распознавание речи и преобразование текста в речь). Целью данного раздела является создание основы
7 | для **сочетания всего этого вместе**: теперь, когда вы знаете, как работает каждая из этих задач в отдельности, мы рассмотрим, как
8 | вы можете объединить их вместе для создания некоторых реальных приложений.
9 |
10 | ## Чему вы научитесь и что создадите
11 |
12 | В этом разделе мы рассмотрим следующие три темы:
13 |
14 | * [Перевод речи в речь](speech-to-speech): перевод речи с одного языка в речь на другом языке
15 | * [Создание голосового ассистента](voice-assistant): создание собственного голосового помощника, работающего аналогично Alexa или Siri
16 | * [Транскрибирование встреч](transcribe-meeting): транскрибация встречи и маркировка транскрипции с указанием того, кто когда выступал
17 |
--------------------------------------------------------------------------------
/chapters/ru/chapter7/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # Дополнительные материалы и ресурсы
2 |
3 | В этом разделе объединены многие компоненты из предыдущих разделов, представлены задачи перевода речи в речь,
4 | голосовые помощники и диаризация диктора. Для удобства чтения дополнительный материал разбит на эти три новые задачи:
5 |
6 | Перевод речи в речь:
7 | * [STST с дискретными блоками](https://ai.facebook.com/blog/advancing-direct-speech-to-speech-modeling-with-discrete-units/) от Meta AI: прямой подход к STST через модели энкодер-декодер
8 | * [Hokkien прямой перевод речи в речь](https://ai.facebook.com/blog/ai-translation-hokkien/) от Meta AI: прямой подход к STST с использованием моделей энкодер-декодер с двухступенчатым декодером
9 | * [Использование неконтролируемых и слабоконтролируемых данных для улучшения прямой STST](https://arxiv.org/abs/2203.13339) от Google: предлагает новые подходы к использованию неконтролируемых (unsupervised) и слабоконтролируемых (weakly supervised) данных для обучения прямых STST-моделей и небольшие изменения в архитектуре Transformer
10 | * [Translatotron-2](https://google-research.github.io/lingvo-lab/translatotron2/) от Google: система, способная сохранять характеристики диктора в переведенной речи
11 |
12 | Голосовой ассистент:
13 | * [Точное обнаружение пробуждающих слов (wakeword)](https://www.amazon.science/publications/accurate-detection-of-wake-word-start-and-end-using-a-cnn) от Amazon: подход с низкой задержкой для обнаружения пробуждающих слов (wakeword) для приложений на устройствах
14 | * [RNN-Transducer Архитектура](https://arxiv.org/pdf/1811.06621.pdf) от Google: модификация архитектуры CTC для потокового ASR на устройствах
15 |
16 | Транскрипция встреч:
17 | * [pyannote.audio Технический отчет](https://huggingface.co/pyannote/speaker-diarization/blob/main/technical_report_2.1.pdf) Эрве Бредин: в этом докладе описываются основные принципы, лежащие в основе конвейера диаризации дикторов `pyannote.audio
18 | * [Whisper X](https://arxiv.org/pdf/2303.00747.pdf) by Max Bain et al.: усовершенствованный подход к вычислению временных меток на уровне слов с использованием модели Whisper
--------------------------------------------------------------------------------
/chapters/ru/chapter8/certification.mdx:
--------------------------------------------------------------------------------
1 | # Получение сертификата о прохождении курса
2 |
3 | Процесс сертификации является полностью бесплатным.
4 | * Для получения сертификата об окончании курса необходимо сдать 3 из 4 практических заданий до 1 сентября 2023 года.
5 | * Для получения сертификата с отличием об окончании курса необходимо сдать 4 из 4 практических заданий до 1 сентября 2023 года.
6 |
7 | Требования к каждому заданию приведены в соответствующих разделах:
8 | * [Раздел 4 Практическое занятие](../chapter4/hands_on)
9 | * [Раздел 5 Практическое занятие](../chapter5/hands_on)
10 | * [Раздел 6 Практическое занятие](../chapter6/hands_on)
11 | * [Раздел 7 Практическое занятие](../chapter7/hands_on)
12 |
13 | Для заданий, требующих обучения модели, убедитесь, что ваша модель, удовлетворяющая требованиям, выложена на HuggingFace хабе с соответствующими `kwargs`.
14 | Для демонстрационного задания в Главе 7 убедитесь, что ваша демонстрация является `public`.
15 |
16 | Для самооценки и для того, чтобы увидеть, какие разделы вы сдали/не сдали, вы можете использовать следующее пространство:
17 | [Check My Progress - Audio Course](https://huggingface.co/spaces/MariaK/Check-my-progress-Audio-Course)
18 |
19 | После того как вы сможете получить сертификат, перейдите в пространство [Audio Course Certification](https://huggingface.co/spaces/MariaK/Audio-Course-Certification).
20 | В этом пространстве осуществляются дополнительные проверки на соответствие представленных материалов критериям оценки.
21 |
22 | Введите свое имя пользователя Hugging Face, имя, фамилию в текстовые поля и нажмите на кнопку "Check if I pass and get the certificate".
23 |
24 | Если вы сдали 3 из 4 практических заданий, то получите сертификат о прохождении курса.
25 | Если вы сдали 4 из 4 практических заданий, вы получите сертификат о прохождении курса с отличием.
26 |
27 | Вы можете скачать свой сертификат в формате pdf и png. Не стесняйтесь делиться своим сертификатом в Twitter
28 | (тэгните меня @mariakhalusova и @huggingface) и на LinkedIn.
29 |
30 | Если вы не соответствуете критериям сертификации, не отчаивайтесь! Вернитесь к пространству
31 | [Check My Progress - Audio Course](https://huggingface.co/spaces/MariaK/Check-my-progress-Audio-Course), чтобы увидеть
32 | какие блоки необходимо выполнить еще раз для получения сертификата. Если у вас возникнут какие-либо проблемы с любым из этих пространств,
33 | сообщите нам об этом!
34 |
--------------------------------------------------------------------------------
/chapters/ru/chapter8/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Поздравляем!
2 |
3 | Вы много работали, чтобы достичь этого момента, и мы хотели бы поздравить Вас с окончанием этого курса по обработке аудиоданных!
4 |
5 | В ходе данного курса вы получили базовое представление об аудиоданных, изучили новые концепции и приобрели
6 | практические навыки работы с аудио трансформерами.
7 |
8 | Начиная с основ работы с аудиоданными и предварительно обученными контрольными точками моделей с помощью конвейеров и заканчивая созданием реальных
9 | аудиоприложений, вы узнали, как можно создавать системы, способные не только понимать звук, но и создавать его.
10 |
11 | Поскольку эта область является динамичной и постоянно развивающейся, мы призываем вас не терять любопытства и постоянно изучать новые модели, достижения в области исследований
12 | и новые приложения. Создавая свои новые и интересные аудиоприложения, не забывайте об этических аспектах
13 | и тщательно анализируйте потенциальное воздействие на человека и общество в целом.
14 |
15 | Благодарим Вас за то, что Вы присоединились к этому курсу, мы надеемся, что Вы получили огромное удовольствие от этого образовательного процесса,
16 | так же как и мы от его создания. Ваши отзывы и предложения приветствуются в
17 | [репозитории курса на GitHub](https://github.com/huggingface/audio-transformers-course).
18 |
19 | Чтобы узнать, как можно получить заслуженный сертификат об окончании курса, если вы успешно справились с практическими заданиями,
20 | вы узнаете на [следующей странице](certification).
21 |
22 | Наконец, чтобы оставаться на связи с командой курса по аудио, вы можете связаться с нами в Twitter:
23 |
24 | * Мария Халусова: [@mariakhalusova](https://twitter.com/mariaKhalusova)
25 | * Санчит Ганди: [@sanchitgandhi99](https://twitter.com/sanchitgandhi99)
26 | * Матиас Холлеманс: [@mhollemans](https://twitter.com/mhollemans)
27 | * Вайбхав Шривастав: [@reach_vb](https://twitter.com/reach_vb)
28 |
29 | Оставайтесь любопытными и тренируйте трансформеров! :)
30 |
--------------------------------------------------------------------------------
/chapters/ru/events/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Живые занятия и семинары
2 |
3 | Новый курс "Аудиотрансформеры": Прямой эфир с Пейдж Бейли (DeepMind), Сеохван Ким (Amazon Alexa AI) и Брайаном Макфи (Librosa)
4 |
5 |
6 |
7 | Запись Live AMA с командой аудиокурса Hugging Face:
8 |
9 |
10 |
--------------------------------------------------------------------------------
/chapters/tr/chapter0/community.mdx:
--------------------------------------------------------------------------------
1 | # Topluluğa katılın!
2 |
3 | Sizi [canlı ve destekleyici Discord topluluğumuza katılmaya davet ediyoruz](http://hf.co/join/discord). Burada benzer düşünen öğrenenlerle bağlantı kurma, fikir alışverişi yapma ve uygulamalı çalışmalarınıza değerli geri bildirimler alabilme fırsatınız olacak. Sorular sorabilir, kaynaklar paylaşabilir ve diğerleriyle işbirliği yapabilirsiniz.
4 |
5 |
6 | Bizim ekibimiz de Discord'da aktif ve ihtiyacınız olduğunda destek ve rehberlik sağlamak için hazır bulunuyorlar. Topluluğumuza katılmak, motivasyonunuzu yüksek tutmak, katılımınızı sürdürmek ve bağlantı kurmak için mükemmel bir yol. Sizi orada görmeyi dört gözle bekliyoruz!
7 |
8 | ## Discord Nedir?
9 |
10 | Discord, ücretsiz bir sohbet platformudur. Eğer Slack kullanmışsanız, oldukça benzer bulacaksınız. Hugging Face Discord sunucusu, 18.000'den fazla yapay zeka uzmanı, öğrenci ve meraklısının aktif olduğu canlı bir topluluğun evi, ve siz de bu topluluğun bir parçası olabilirsiniz.
11 |
12 | ## Discord'da Gezinme
13 |
14 | Discord sunucumuza kaydolduktan sonra, ilgilendiğiniz konuları seçmek için sola tıklayarak #role-assignment üzerine tıklamanız gerekecektir. İstediğiniz kadar farklı kategori seçebilirsiniz. Bu kursun diğer öğrencilerine katılmak için, "ML for Audio and Speech"i tıklamayı unutmayın. Kanalları keşfedin ve kendinizle ilgili birkaç şeyi #introduce-yourself kanalında paylaşın.
15 |
16 | ## Sesli Kurs Kanalları
17 |
18 |
19 | Discord sunucumuzda çeşitli konulara odaklanmış birçok kanal bulunmaktadır. İnsanların makaleleri tartıştığını, etkinlikler düzenlediğini, projelerini ve fikirlerini paylaştığını, beyin fırtınası yaptığını ve daha birçok şeyi bulacaksınız.
20 |
21 | Ses kursu öğrencisi olarak, aşağıdaki kanal setini özellikle ilginç bulabilirsiniz:
22 |
23 | * `#audio-announcements`: Kursla ilgili güncellemeler, Hugging Face ile ilgili sesle ilgili her şeyden haberler, etkinlik duyuruları ve daha fazlası için şunlar gibi kanalları bulabilirsiniz.
24 | * `#audio-study-group`: Fikir alışverişi yapmak, kurs hakkında sorular sormak ve tartışmalara başlamak için bir yer.
25 | * `#audio-discuss`: Sesle ilgili konular hakkında genel tartışmalar yapmak için bir yer.
26 |
27 | #audio-study-group kanalına katılmak dışında, kendi çalışma grubunuzu oluşturmanızdan çekinmeyin; birlikte öğrenmek her zaman daha kolaydır!
--------------------------------------------------------------------------------
/chapters/tr/chapter0/get_ready.mdx:
--------------------------------------------------------------------------------
1 | # Kursa katılmaya hazırlanın
2 |
3 | Kursa başlamak için heyecanlı olduğunuzu umuyoruz ve bu sayfayı, hemen başlamak için gereken her şeye sahip olduğunuzdan emin olmak için tasarladık!
4 |
5 | ## 1.Adım Kayıt Ol
6 |
7 | Tüm güncellemelerden ve özel sosyal etkinliklerden haberdar olmak için kursa kaydolun.
8 |
9 | [👉 KAYIT OL](http://eepurl.com/insvcI)
10 |
11 | ## 2.Adım Hugging Face hesabı oluşturun
12 |
13 | Henüz bir Hugging Face hesabınız yoksa (ücretsizdir), bir tane oluşturun. Hemen yapılması gereken görevleri tamamlamak, tamamlama sertifikanızı almak, önceden eğitilmiş modelleri keşfetmek, veri kümeslerine erişmek ve daha fazlasını yapmak için ihtiyacınız olacak.
14 |
15 | [👉 HUGGING FACE HESABI OLUŞTUR](https://huggingface.co/join)
16 |
17 | ## 3.Adım Temel bilgilerinizi gözden geçirin (gerekliyse)
18 |
19 | Derin öğrenme temellerine aşina olduğunuzu ve transformer'lar hakkında genel bir bilgiye sahip olduğunuzu varsayıyoruz. Eğer transformer'lar konusundaki anlayışınızı tazelemeye ihtiyacınız varsa, [NLP Kursumuza](https://huggingface.co/course/chapter1/1) göz atabilirsiniz.
20 |
21 | ## 4.Adım Kurulumununuzu kontrol edin
22 |
23 | Kurs materyallerini incelemek için ihtiyacınız olanlar şunlardır:
24 | - İnternet bağlantısı olan bir bilgisayar.
25 | - Uygulamalı eğitim egzersizleri için [Google Colab](https://colab.research.google.com) gereklidir. Ücretsiz sürüm yeterlidir. Daha önce Google Colab kullanmadıysanız, bu [resmi tanıtım not defterini](https://colab.research.google.com/notebooks/intro.ipynb) inceleyebilirsiniz.
26 |
27 |
28 |
29 | Ücretsiz Google Colab seçeneği yerine, kendi yerel kurulumunuzu veya Kaggle Notebook'larını kullanabilirsiniz. Kaggle Notebook'lar, sabit bir GPU saat sayısı sunar ve Google Colab ile benzer işlevselliğe sahiptir, ancak 🤗 Hub'da modellerinizi paylaşma konusunda farklılıklar bulunmaktadır (örneğin, görevleri tamamlamak için). Kaggle Notebook'larınızı tercih etmeye karar verirseniz, [@michaelshekasta](https://github.com/michaelshekasta) tarafından oluşturulan bu [örnek Kaggle not defterine](https://www.kaggle.com/code/michaelshekasta/test-notebook) göz atabilirsiniz. Bu not defteri, nasıl model eğitebileceğinizi ve eğitilmiş modelinizi 🤗 Hub'da nasıl paylaşabileceğinizi göstermektedir.
30 |
31 |
32 |
33 | ## 5.Adım Topluluğa katılın!
34 |
35 | Discord sunucumuza kaydolun; sınıf arkadaşlarınızla fikir alışverişi yapabilir ve bizimle (Hugging Face ekibiyle) iletişime geçebileceğiniz yerdir.
36 |
37 | [👉 DISCORD'DAKİ TOPLULUĞA KATILIN](http://hf.co/join/discord)
38 |
39 | Discord üzerindeki topluluğumuz hakkında daha fazla bilgi edinmek ve en iyi şekilde nasıl faydalanabileceğinizi öğrenmek için [sonraki sayfayı](community) inceleyin.
40 |
--------------------------------------------------------------------------------
/chapters/tr/chapter1/introduction.mdx:
--------------------------------------------------------------------------------
1 | # 1.Ünite Ses verileriyle çalışma
2 |
3 | ## Bu üniteden ne öğreceneksiniz.
4 |
5 | Her ses veya konuşma görevi bir ses dosyasıyla başlar. Bu görevleri çözmeye dalmadan önce, bu dosyaların aslında neler içerdiğini anlamak ve onlarla nasıl çalışılacağını öğrenmek önemlidir.
6 |
7 | Bu ünitede, ses verileri ile ilgili temel terimleri, dalga formu, örnekleme hızı ve spektrogram gibi, anlayacaksınız. Ayrıca, ses veri kümesi ile çalışmayı, ses verilerini yükleme ve önişleme işlemlerini ve büyük veri kümelerini verimli bir şekilde akıtarak nasıl çalışılacağını öğreneceksiniz.
8 |
9 | Bu ünitenin sonunda, temel ses verisi terimlerini sağlam bir şekilde kavrayacak ve çeşitli uygulamalar için ses veri kümesi ile çalışmak için gereken becerilere sahip olacaksınız. Bu ünitede edineceğiniz bilgi, kursun geri kalanını anlamak için bir temel oluşturacak.
--------------------------------------------------------------------------------
/chapters/tr/chapter1/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # Daha fazla öğren
2 |
3 | Bu ünite, ses verisinin anlaşılması ve üzerinde çalışılması ile ilgili birçok temel kavramı kapsadı. Daha fazla öğrenmek mi istiyorsunuz? İşte konuları daha derinlemesine anlamanıza ve öğrenme deneyiminizi geliştirmenize yardımcı olacak ek kaynaklar bulabileceğiniz yer.
4 |
5 |
6 | Aşağıdaki videoda, xiph.org'dan Monty Montgomery, gerçek ses ekipmanı kullanarak örnekleme, nicemleme, bit derinliği ve dither konularında modern dijital analiz ve eski analog laboratuvar ekipmanı kullanarak gerçek zamanlı gösterimler sunuyor. İzlemek isterseniz aşağıdaki bağlantıya tıklayabilirsiniz:
7 |
8 |
9 |
10 | Dijital sinyal işleme konusunda daha derinlemesine bilgi edinmek isterseniz, New York Üniversitesi Müzik Teknolojisi ve Veri Bilimi Yardımcı Profesörü ve librosa paketinin başlıca sürdürücüsü olan Brian McFee tarafından yazılmış ücretsiz [Digital Signals Theory](https://brianmcfee.net/dstbook-site/content/intro.html) kitabını incelemenizi öneririm.
11 |
--------------------------------------------------------------------------------
/chapters/tr/chapter2/hands_on.mdx:
--------------------------------------------------------------------------------
1 | # Uygulamalı eğitim egzersizleri
2 |
3 | Bu egzersiz notlandırılmamıştır ve amacı, kursun geri kalanında kullanacağınız araçlar ve kütüphaneler hakkında bilgi sahibi olmanıza yardımcı olmaktır. Eğer Google Colab, 🤗 Datasets, librosa ve 🤗 Transformers gibi araçları kullanmada zaten deneyimliyseniz, bu egzersizi atlamayı seçebilirsiniz.
4 |
5 | 1. Bir [Google Colab](https://colab.research.google.com) not defteri oluşturun.
6 | 2. Akış modunda seçtiğiniz dilde [`facebook/voxpopuli` veri kümesinin](https://huggingface.co/datasets/facebook/voxpopuli) tren bölümünü yüklemek için 🤗 Veri Kümeleri'ni kullanın.
7 | 3. Veri kümesinin "eğitim" kısmından üçüncü örneği alın ve inceleyin. Bu örneğin sahip olduğu özellikler göz önüne alındığında, bu veri kümesini ne tür ses görevleri için kullanabilirsiniz?
8 | 4. Bu örneğin dalga formunu ve spektrogramını çizin.
9 | 5. [🤗 Hub'a](https://huggingface.co/models) gidin, önceden eğitilmiş modelleri keşfedin ve daha önce seçtiğiniz dil için otomatik konuşma tanıma için kullanılabilecek bir model bulun. Bulduğunuz modelle karşılık gelen bir ardışık düzeni örnekleyin ve örneği yazıya dökün.
10 | 6. İşlem hattından aldığınız transkripsiyonu örnekte verilen transkripsiyonla karşılaştırın.
11 |
12 | Bu alıştırmada zorlanıyorsanız [örnek çözüme](https://colab.research.google.com/drive/1NGyo5wFpRj8TMfZOIuPaJHqyyXCITftc?usp=sharing) göz atmaktan çekinmeyin.
13 | İlginç bir şey mi keşfettiniz? Harika bir model mi buldunuz? Güzel bir spektrogramınız mı var? Çalışmalarınızı ve keşiflerinizi Twitter'da paylaşmaktan çekinmeyin!
14 |
15 | Sonraki bölümlerde çeşitli ses dönüştürücü mimarileri hakkında daha fazla bilgi edinecek ve kendi modelinizi eğiteceksiniz!
16 |
17 |
--------------------------------------------------------------------------------
/chapters/tr/chapter2/introduction.mdx:
--------------------------------------------------------------------------------
1 | # Ünite 2. Ses uygulamalarına nazik bir giriş
2 |
3 | Hugging Face ses kursunun ikinci ünitesine hoş geldiniz! Daha önce, ses verilerinin temellerini keşfettik ve 🤗 Datasets ve 🤗 Transformers kütüphanelerini kullanarak ses veri kümesiyle nasıl çalışılacağını öğrendik. Örnekleme hızı, genlik, bit derinliği, dalga formu ve spektrogram gibi çeşitli kavramları tartıştık ve veriyi önceden eğitilmiş bir model için hazırlamak için nasıl işleyeceğimizi gördük.
4 |
5 | Bu noktada, Transformers'ın gerçekleştirebileceği ses görevleri hakkında bilgi edinmek için istekli olabilirsiniz ve dalmak için gerekli tüm temel bilgilere sahipsiniz! Akıllara durgunluk veren bazı sesli görev örneklerine bir göz atalım:
6 |
7 | * **Ses sınıflandırması**: Ses kliplerini kolayca farklı kategorilere ayırın. Bir kaydın havlayan bir köpek mi yoksa miyavlayan bir kedi mi olduğunu ya da şarkının hangi müzik türüne ait olduğunu belirleyebilirsiniz.
8 | * **Otomatik konuşma tanıma**: Ses kliplerini otomatik olarak yazıya dönüştürerek metne dönüştürün. "Bugün nasılsın?" gibi konuşan birinin kaydının metin temsilini alabilirsiniz. Not almak için oldukça faydalı!
9 | * **Konuşmacı günlüğü**: Kayıtta kimin konuştuğunu hiç merak ettiniz mi? 🤗 Transformers ile herhangi bir anda hangi konuşmacının konuştuğunu bir ses klibinde belirleyebilirsiniz. Bir konuşma kaydında "Alice" ve "Bob"u ayırt edebildiğinizi hayal edin.
10 | * **Metinden konuşmaya**: sesli kitap oluşturmak, erişilebilirliğe yardımcı olmak veya bir oyundaki bir NPC'ye ses vermek için kullanılabilecek bir metnin anlatımlı bir versiyonunu oluşturun. 🤗 Transformers ile bunu kolayca yapabilirsiniz!
11 |
12 | Bu ünite içinde, 🤗 Transformers'ın pipeline() işlevini kullanarak bazı görevler için önceden eğitilmiş modelleri nasıl kullanacağınızı öğreneceksiniz. Özellikle, önceden eğitilmiş modellerin nasıl ses sınıflandırması, otomatik konuşma tanıma ve ses üretme için kullanılabileceğini göreceğiz. Şimdi başlayalım!
13 |
14 |
--------------------------------------------------------------------------------
/chapters/unpublished/chapter9/audioldm.mdx:
--------------------------------------------------------------------------------
1 | # AudioLDM
--------------------------------------------------------------------------------
/chapters/unpublished/chapter9/dance_diffusion.mdx:
--------------------------------------------------------------------------------
1 | # Dance diffusion
--------------------------------------------------------------------------------
/chapters/unpublished/chapter9/introduction.mdx:
--------------------------------------------------------------------------------
1 | # TODO
2 |
--------------------------------------------------------------------------------
/chapters/unpublished/chapter9/music_generation.mdx:
--------------------------------------------------------------------------------
1 | # Music generation
--------------------------------------------------------------------------------
/chapters/unpublished/chapter9/riffusion.mdx:
--------------------------------------------------------------------------------
1 | # Riffusion
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter0/community.mdx:
--------------------------------------------------------------------------------
1 | # 加入社区!
2 |
3 | 我们邀请你 [加入我们充满活力和乐于助人的Discord社区(仅英文)](http://hf.co/join/discord)。在这里,你将有机会认识同温层的同学、与他们交流想法,并且获得关于实战练习的宝贵反馈。你可以在这里提问、分享资源、与他人合作。
4 |
5 | 我们的团队也会在Discord中和大家交流,并且为大家提供支持和指引。加入社区可以帮助你保持学习动力、增加参与感、加强练习。我们欢迎你成为社区的一员!
6 |
7 | ## Discord是什么?
8 |
9 | Discord是一个免费的聊天平台。如果你使用过Slack,那么Discord也与之类似。我们的Hugging Face Discord频道已经有超过18000名用户,包括了AI专家、AI学习者和AI爱好者。我们邀请你参与到讨论中来!
10 |
11 | ## 使用Discord
12 |
13 | 在你注册并加入我们的Discord服务器之后,你可以在界面左侧点击`#role-assignment`来添加你感兴趣的话题。你可以选择任意数量的话题。想要加入本课程的讨论组,请点击"ML for Audio and Speech"标签。我们也欢迎你在`#introduce-yourself`标签中分享关于你自己的内容。
14 |
15 | ## 音频课程频道
16 |
17 | 我们的Discord服务器中有针对许多不同方向的频道。大家可以在不同的频道中讨论论文、组织活动、分享自己的项目的调子、头脑风暴、等等。作为音频课程的同学,你可以关注以下频道的相关内容:
18 |
19 | * `#audio-announcements`: 课程内容的更新、Hugging Face所有音频相关内容的新闻、活动通知等。
20 | * `#audio-study-group`: 交流想法、提问和交流课程相关内容的频道。
21 | * `#audio-discuss`: 任何音频相关内容的讨论。
22 |
23 | 除了加入`#audio-study-group`频道之外,你也可以创建自己的学习小组。一起学习总是更加轻松!
24 |
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter0/get_ready.mdx:
--------------------------------------------------------------------------------
1 | # 课程准备工作
2 |
3 | 希望你已经做好准备开始学习了!这一节中我们会确保你做好了所有开始学习前的准备工作。
4 |
5 | ## 第1步:注册课程
6 |
7 | 注册课程以获取内容更新和特殊活动的通知:
8 |
9 | [👉 注册课程(仅英文)](http://eepurl.com/insvcI)
10 |
11 | ## 第2步:创建Hugging Face 账号
12 |
13 | 如果你还没有Hugging Face 账号,我们推荐你现在进行免费注册。实战练习需要使用你的个人Hugging Face 账号来探索预训练模型、获取数据集和更多资源。
14 |
15 | [👉 创建Hugging Face 账号(仅英文)](https://huggingface.co/join)
16 |
17 | ## 第3步:复习基础内容(如需要)
18 |
19 | 本课程针对熟悉深度学习基础知识并对Transformer架构有一定了解的同学而设计。如果你需要复习Transformer架构的基础内容,可以参考我们的[自然语言处理课程](https://huggingface.co/learn/nlp-course/chapter0/1)。
20 |
21 | ## 第4步:检查你的环境
22 |
23 | 学习本课程需要以下资源:
24 | - 一台联网的电脑
25 | - 使用[Google Colab](https://colab.research.google.com)进行实战练习。免费版本即可。
26 |
27 | 如果你没有使用过Google Colab,可以参考这个[官方介绍笔记本(仅英文)](https://colab.research.google.com/notebooks/intro.ipynb).
28 |
29 | ## 第5步:加入社区
30 |
31 | 加入我们的Discord频道,与同学们和Hugging Face 团队交流你的想法。
32 |
33 | [👉 加入DISCORD社区(仅英文)](http://hf.co/join/discord)
34 |
35 | 想了解更多关于社区的内容并更好地利用它,请参考[下一小节](community).
36 |
37 |
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter0/introduction.mdx:
--------------------------------------------------------------------------------
1 | # 欢迎来到Hugging Face 音频课程!
2 |
3 | 屏幕前的同学,
4 |
5 | 欢迎来到本课!我们将为你介绍Transformer模型在音频领域的应用。Transformer模型已经多次证明了自己是最强大、多功能的深度学习模型之一,并在自然语言处理(Natural Language Processing, NLP)、机器视觉(Computer Vision, CV)、和最近的音频处理等等任务上取得了最佳成绩。
6 |
7 | 在本课中,我们会学习如何将Trasnfromer结构应用到音频数据上。你会学到如何使用Transformer解决各种各样与音频有关的任务。无论你是对自动语音识别(Automatic Speech Recognition, ASR)、音频分类(Audio CLassification)、或是由文字生成语音(Text-to-Speech synthesis, TTS)感兴趣,本课和Transformer都会成为你的得力助手。
8 |
9 | 让我们直观地感受一下这些模型的威力吧!在下面的demo里随便说些什么,然后看看我们的模型是如何实时地将语音记录成文字的(仅支持英语):
10 |
11 |
17 |
18 | 在本课中,你会学习到针对音频数据的特殊处理方法、各种不同的Transformer架构、以及使用强大的预训练模型来训练你自己的音频Transformer。
19 |
20 | 本课是为有一定深度学习基础,并对Transformer有一些初步了解的同学而设计。你不需要对音频数据处理有任何经验。如果你需要加强自己对Transformer结构的基础了解,请参考我们的[自然语言处理课程](https://huggingface.co/learn/nlp-course/zh-CN/chapter1/1)。这门课程包含了Transformer结构的基础知识和更多细节。
21 |
22 | ## 关于作者
23 |
24 | **Sanchit Gandhi, Hugging Face机器学习科研工程师**
25 |
26 | 嗨! 我是Sanchit,来自Hugging Face🤗开源组的的音频机器学习研发工程师。我的主要方向是自动语音识别和(automatic speech recognition,ASR)和自动语音翻译。我现在的工作方向是构建更快、更轻、更易用的语音模型。
27 |
28 | **Matthijs Hollemans, Hugging Face机器学习工程师**
29 |
30 | 我是Matthijs, Hugging Face开源组的音频机器学习工程师。我也是《how to write sound synthesizers》(如何编写音频合成器)一书的作者。我喜欢在业余时间编写音频插件。
31 |
32 | **Maria Khalusova, Hugging Face文档和课程经理**
33 |
34 | 我是Maria,我的主要工作是制作教学内容和文档,使我们的Transformers库和其他开源工具更加易用。我会解构复杂的技术概念,并且帮助大家从零开始理解最前沿的技术。
35 |
36 | **Vaibhav Srivastav, Hugging Face机器学习开发者大使**
37 |
38 | 我是Vaibhav (VB),Hugging Face开源组的开发者大使(Developer Advocate)。我的研究方向是低资源TTS以及尖端语音研究的大众化推进。
39 |
40 | ## 课程结构
41 |
42 | 本课程被分为多个单元,涵盖了众多方向的深度议题:
43 |
44 | * 第1单元:学习音频数据的特殊性,包括音频信号处理技巧和数据预处理。
45 | * 第2单元:了解音频机器学习的应用,使用🤗Transformers pipelines实现不同任务,包括音频分类(Audio classification)和语音识别(speech recognition)。
46 | * 第3单元:探索各种音频Transformer架构,了解他们的区别和各自的优势任务。
47 | * 第4单元:学习如何构建你自己的音乐风格分类器(music genre classifier)
48 | * 第5单元:深入学习语音识别(speech recognition),搭建一个会议转录模型。
49 | * 第6单元:学习如何从文字生成语音。
50 | * 第7单元:学习利用Transformer进行音频到音频转换(audio to audio)。
51 |
52 | 每个单元都包含了理论部分,对模型背后的概念和技巧做了深入的极少。本课程的各个章节都包含了课后习题,用来测试和强化你的学习成果。部分单元还包含了实战练习。
53 |
54 | 完成本课程的学习后,你会在Transformer和音频数据上拥有一个扎实的基础,并且会学习到针对多种音频相关任务的工具,帮助你快速开发应用。
55 |
56 | 本课程的各个单元会按照如下的时间表发布:(译注:此表为英文版课程发布时间)
57 |
58 | | 单元 | 发布日期 |
59 | |---|-----------------|
60 | | 第0、1、2单元 | 2023年6月14日 |
61 | | 第3、4单元 | 2023年6月21日 |
62 | | 第5单元 | 2023年6月28日 |
63 | | 第6单元 | 2023年7月5日 |
64 | | 第7、8单元 | 2023年7月12日 |
65 |
66 | [//]: # (| 额外单元 | 未定 |)
67 |
68 | ## 学习方法和证书
69 |
70 | 你可以用任何方式来利用这门课程。本课程的所有内容均为100%免费、公开且开源。你可以按照自己喜欢的节奏来学习本课程,不过我们建议按照顺序来阅读各个单元。
71 |
72 | 如果你想要获取结课证明,我们提供两种不同的选项:
73 |
74 | | 证书类别 | 要求 |
75 | |---|------------------------------------------------------------------------------------------------|
76 | | 结课证书 | 在2023年7月底前,根据指引完成80%的实战练习内容。 |
77 | | 荣誉证书 | 在2023年7月底前,根据指引完成100%的实战练习内容。 |
78 |
79 | 每个单元的实战练习内容均有各自的完成标准。当你完成了任意类别的证书要求后,请按照最后一个单元的指引来获取你的结课证明。祝你好运!
80 |
81 | ## 注册本课程
82 |
83 | 本课程的不同单元会在数周内逐渐更新。我们建议你注册课程更新通知,以防错过新内容的更新。注册课程的同学还能第一时间了解到我们举办的特殊活动。
84 |
85 | [注册链接(仅英文)](http://eepurl.com/insvcI)
86 |
87 | 祝你学习愉快!
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter1/introduction.mdx:
--------------------------------------------------------------------------------
1 | # 第1单元:音频数据处理
2 |
3 | ## 单元简介
4 |
5 | 所有音频或语音相关的任务都需要使用音频文件。在我们深入了解这些任务之前,我们需要了解音频文件的实际内容以及如何利用音频文件。
6 |
7 | 本单元将为你介绍与音频数据相关的基本概念,包括波形、采样率和频谱图。你会学习到如何使用音频数据集,包括音频数据加载、音频数据预处理,以及高效加载大规模音频数据集的流式加载方法。
8 |
9 | 完成本单元的学习后,你会掌握基础的音频相关术语,并且掌握针对不同应用的音频数据处理工具。本单元的知识会成为后面章节的基础。
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter1/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # 附加内容
2 |
3 | 本小节涵盖了许多处理音频数据的基础概念。想学习更多?我们在这里提供了额外的内容,帮助你加深理解、增强学习体验。
4 |
5 | 在接下来的这段视频中,来自xiph.org的Monty Montgomery为我们实时演示了采样、量化、位深度的概念,并且展示了现代的数字分析方法和复古的模拟测量仪器:
6 |
7 |
8 |
9 | 如果你想了解更多关于数字信号处理的知识,可以参考免费的["Digital Signals Theory"一书](https://brianmcfee.net/dstbook-site/content/intro.html)(仅英语)。本书的作者是Brian McFee,来自New York University的音乐技术和数据科学副教授,同时也是`librosa`库的主要维护者。
10 |
11 |
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter2/asr_pipeline.mdx:
--------------------------------------------------------------------------------
1 | # 利用pipeline进行自动语音识别
2 |
3 | 自动语音识别(Automatic Speech Recognition, ASR)是一个将录音转录为文字的任务。该任务有许多非常实用的应用,包括生成视频字幕、语音助手(Siri、Alexa等)的语音指令功能等等。
4 |
5 | 本小节中,我们将使用`automatic-speech-recognition` pipeline来转录MINDS-14数据集中一段用户询问账单信息的录音。
6 |
7 | 首先,我们根据[利用pipeline进行音频分类](audio_classification_pipeline.mdx)一节的方法加载数据并上采样至16千赫兹。
8 |
9 | 接下来,我们利用🤗 Transformers中的`automatic-speech-recognition` pipeline来构建自动语音识别的任务:
10 |
11 | ```py
12 | from transformers import pipeline
13 |
14 | asr = pipeline("automatic-speech-recognition")
15 | ```
16 |
17 | 下面,我们从数据集中选取一个样本,并将该样本的原始音频数据传递给pipeline:
18 |
19 | ```py
20 | example = minds[0]
21 | asr(example["audio"]["array"])
22 | ```
23 |
24 | **输出**
25 | ```out
26 | {"text": "I WOULD LIKE TO PAY MY ELECTRICITY BILL USING MY COD CAN YOU PLEASE ASSIST"}
27 | ```
28 |
29 | 我们可以将模型转录的结果和该样本标签中真实的转录文字进行对比:
30 |
31 | ```py
32 | example["english_transcription"]
33 | ```
34 |
35 | **输出:**
36 | ```out
37 | "I would like to pay my electricity bill using my card can you please assist"
38 | ```
39 |
40 | 看起来模型在文字转录上的效果还不错!和原始转录相比,仅有一个词(card)转录错误。考虑到用户使用的澳大利亚方言中“r”通常不发音,这个结果已经很不错了。 不过我并不推荐用一条鱼来支付你的下一张电费账单就是了!(译注:cod为鳕鱼)
41 |
42 | 在默认条件下,该pipeline使用的是一个针对英语语言的自动语音识别模型,这在本例中是可以的。如果你想尝试转录MINDS-14数据集中其他语言的子集,你可以在[🤗 Hub](https://huggingface.co/models?pipeline_tag=automatic-speech-recognition&language=fr&sort=downloads)上找到一个预训练的ASR模型。你可以首先按任务过滤模型列表,然后再按语言过滤。一旦你找到了喜欢的模型,将其名称作为`model`参数传递给pipeline即可。
43 |
44 | 让我们尝试一下MINDS-14数据集中德语子集的转录。首先加载`de-DE`子集:
45 |
46 | ```py
47 | from datasets import load_dataset
48 | from datasets import Audio
49 |
50 | minds = load_dataset("PolyAI/minds14", name="de-DE", split="train")
51 | minds = minds.cast_column("audio", Audio(sampling_rate=16_000))
52 | ```
53 |
54 | 接下来,我们获取一个样本并查看其转录:
55 |
56 | ```py
57 | example = minds[0]
58 | example["transcription"]
59 | ```
60 |
61 | **输出**
62 | ```out
63 | "ich möchte gerne Geld auf mein Konto einzahlen"
64 | ```
65 |
66 | 接下来,我们在🤗 Hub上找到一个针对德语语言的预训练ASR模型,然后将其名称传递给pipeline,并对样本进行转录:
67 |
68 | ```py
69 | from transformers import pipeline
70 |
71 | asr = pipeline("automatic-speech-recognition", model="maxidl/wav2vec2-large-xlsr-german")
72 | asr(example["audio"]["array"])
73 | ```
74 |
75 | **输出**
76 | ```out
77 | {"text": "ich möchte gerne geld auf mein konto einzallen"}
78 | ```
79 |
80 | 德语也没问题!
81 |
82 | 当你在解决自己的任务时,从本单元中展示的简单pipeline开始是一个非常有价值的工具,它有以下几个好处:
83 | - 预训练模型可能已经能够很好地解决你的任务,从而节省了大量时间
84 | - `pipeline()`会为你进行所有的预处理和后处理操作,因此你不必再花时间将数据转换为模型正确的格式
85 | - 如果结果不理想,pipeline仍然可以为你提供一个快速实现的基线,以便在未来对其进行微调
86 | - 如果你在自己的数据集上微调了一个模型并将其分享到Hub上,整个社区都可以通过`pipeline()`方法快速轻松地使用它,从而使AI更加易于使用。
87 |
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter2/audio_classification_pipeline.mdx:
--------------------------------------------------------------------------------
1 | # 利用pipeline进行音频分类
2 |
3 | 音频分类任务需要根据音频的内容对其进行单个和多个标签的识别。这些标签可以代表不同的声音类别,如音乐、语音或噪音,也可以代表更细分的分类,如鸟叫声和引擎声等。
4 |
5 | 在深入了解音频Transformer的细节和微调(fine-tuning)之前,我们先来看看如何使用🤗 Transformers和现成的预训练模型,在几行代码中构建一个音频分类器。
6 |
7 | 我们使用和前几个单元相同的[MINDS-14](https://huggingface.co/datasets/PolyAI/minds14) 数据集。回忆一下,MINDS-14数据集的内容是许多不同语言和方言的使用者向一个网银系统提问的录音。其标签包含了`intent_class`,记录了该次对话的目的。dataset that you have explored
8 |
9 | 和之前一样,我们先加载`en-AU`子集来测试我们的pipeline,将其上采样至音频模型常见的16千赫兹采样率。
10 |
11 | ```py
12 | from datasets import load_dataset
13 | from datasets import Audio
14 |
15 | minds = load_dataset("PolyAI/minds14", name="en-AU", split="train")
16 | minds = minds.cast_column("audio", Audio(sampling_rate=16_000))
17 | ```
18 |
19 | 我们可以使用🤗 Transformers中的`audio-classification` pipeline来构建一个将音频分入一个类别集的任务。在我们的设定下,我们需要一个已经针对音频的目的分类在MINDS-14数据集上微调过的模型。运气好的是,在🤗 Hub中已经有了一个这样的模型!让我们使用`pipeline()`函数来加载该模型:
20 |
21 | ```py
22 | from transformers import pipeline
23 |
24 | classifier = pipeline(
25 | "audio-classification",
26 | model="anton-l/xtreme_s_xlsr_300m_minds14",
27 | )
28 | ```
29 |
30 | 这个pipeline需要以NumPy数组形式输入的音频数据。对于原始音频数据的预处理操作则已经包含在了该pipeline中。让我们拿一个样本来测试一下:
31 |
32 | ```py
33 | example = minds[0]
34 | ```
35 |
36 | 回忆一下数据集的结构,我们的原始音频数据是以NumPy数组的形式存储在`["audio"]["array"]`中的。我们将其直接传递给`classifier`:
37 |
38 | ```py
39 | classifier(example["audio"]["array"])
40 | ```
41 |
42 | **输出:**
43 | ```out
44 | [
45 | {"score": 0.9631525278091431, "label": "pay_bill"},
46 | {"score": 0.02819698303937912, "label": "freeze"},
47 | {"score": 0.0032787492964416742, "label": "card_issues"},
48 | {"score": 0.0019414445850998163, "label": "abroad"},
49 | {"score": 0.0008378693601116538, "label": "high_value_payment"},
50 | ]
51 | ```
52 |
53 | 模型非常确信,在这个样本中,顾客的目的是了解关于账单的信息。让我们来看看该样本的真实标签:
54 |
55 | ```py
56 | id2label = minds.features["intent_class"].int2str
57 | id2label(example["intent_class"])
58 | ```
59 |
60 | **输出**
61 | ```out
62 | "pay_bill"
63 | ```
64 |
65 | 好耶!模型预测正确!我们很幸运地找到了一个预测标签和我们需要的标签完全相同的预训练模型。很多时候,我们所找的预训练模型可以预测的标签集和我们所需要的标签集不会完全相同。这种情况下,我们需要对该预训练模型进行微调(fine-tuning),来将其“校准”到我们需要的标签集上。我们在接下来的单元中会学到微调相关的知识。现在,我们来看看另一个语音处理中常见的任务,_自动语音识别_。
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter2/hands_on.mdx:
--------------------------------------------------------------------------------
1 | # 实战练习
2 |
3 | 本节的练习不计入课程成绩,旨在帮助你熟悉本课程中将要使用的工具和库。如果你已经熟悉使用 Google Colab、🤗 Datasets、librosa 和 🤗 Transformers,你可以选择跳过本节练习。
4 |
5 | 1. 创建一个 [Google Colab](https://colab.research.google.com) 笔记本。
6 | 2. 使用 🤗 Datasets 加载 [`facebook/voxpopuli` 数据集](https://huggingface.co/datasets/facebook/voxpopuli) 的训练集,语言任选,使用流式加载模式。
7 | 3. 获取数据集`train`部分的第三个样本并探索它。根据这个样本所拥有的特征,你可以用这个数据集做哪些音频任务?
8 | 4. 绘制这个样本的波形图和频谱图。
9 | 5. 前往 [🤗 Hub](https://huggingface.co/models),探索预训练模型并找到一个可以用于你之前选择的语言的自动语音识别的模型。使用你找到的模型实例化一个对应的 pipeline,并转录这个样本。
10 | 6. 将你从 pipeline 得到的转录与样本的真实转录文字进行比较。
11 |
12 | 如果你在这个练习中遇到了问题,可以参考[示例解决方案](https://colab.research.google.com/drive/1NGyo5wFpRj8TMfZOIuPaJHqyyXCITftc?usp=sharing)。你发现了什么有趣的东西?找到了一个很酷的模型?得到了一个漂亮的频谱图?欢迎在 Twitter 上分享你的工作和发现!
13 |
14 | 在接下来的章节中,你会学习到更多关于各种音频Transformer架构的知识,并训练你自己的模型!
15 |
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter2/introduction.mdx:
--------------------------------------------------------------------------------
1 | # 第2单元:音频应用的入门介绍
2 |
3 | 欢迎来到Hugging Face音频课程的第二单元!我们已经掌握了音频数据的基础,以及使用🤗 Datasets和 🤗 Transformers加载音频数据的方法。我们已经了解了许多音频相关的概念,例如采样率、位深度、波形、时频谱等等。我们也已经了解到如何对数据进行预处理,并为模型的预训练准备数据。
4 |
5 | 现在,你也许会想了解🤗 Transformers能处理怎样的任务,并且你已经掌握了所有相关的基础知识!我们来看看这些令人震惊的音频应用吧:
6 |
7 | * **声音分类**(Audio classification):将音频片段分入不同的类别。我们可以认出该音频是汪汪的狗叫声、喵喵的猫叫声,或者某个特定的音乐风格。
8 | * **自动语音识别**(Automatic speech recognition, ASR):将语音片段自动转录成文字。你可以将一段对话自动转化为文字稿,例如一段“你今天怎么样?”的录音。对于做笔记会很有用!
9 | * **说话人识别**(Speaker diarization):想知道录音里在说话的人是谁吗?我们可以利用🤗 Transformers来识别出一段录音中正在说话的人的身份,例如在一段对话的录音中识别出Alice和Bob各自说话的部分。
10 | * **由文字生成语音**(Text to speech, TTS):由一段文字合成其对应的语音,例如生成一本有声书,语音助手,或者给游戏中的NPC配音。利用🤗 Transformers,你可以轻松地做到!
11 |
12 | 在本单元中,你会学到如何使用🤗 Transformers的`pipeline()`函数加载预训练模型来完成上述的一些任务。我们将重点介绍如何使用预训练模型完成声音分类和自动语音识别任务。让我们开始吧!
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter3/classification.mdx:
--------------------------------------------------------------------------------
1 | # 音频分类结构
2 |
3 | 音频分类任务的目标是预测音频输出的分类标签。分类模型可以为整个输入序列预测一个标签,也可以为每一帧预测一个不同的标签。在分帧预测时,模型通常为每20毫秒的输入音频预测一个标签,并生成一个由分类标签概率分布组成的序列。预测单一标签的例子如预测音频中发出声音的鸟的种类;预测分帧标签的例子如说话人识别,每帧都可能由不同的说话人在发出声音。
4 |
5 | ## 使用时频谱进行分类
6 |
7 | 最简单的音频分类方法之一是将其视为一个图像分类问题!
8 |
9 | 回想一下,时频谱是一个形状为`(频率,序列长度)`的二维张量。在[音频数据章节](chapter1/audio_data)中,我们学习过将这些时频谱绘制为图像。没错,我们可以直接将时频谱视为图像,并将其传递给一个常见的CNN分类器模型,如ResNet,并获得非常好的预测结果。更好的是,也可以使用图像Transformer模型,如ViT。
10 |
11 | 这就是**AST**(Audio Spectrogram Transformer)的作用。它使用ViT(即Vision Transformer)模型,并使用时频谱而非常规图像作为输入。由于Transformer的自注意层,该模型能够比CNN更好地捕获全局上下文。
12 |
13 | 与ViT一样,AST模型将音频时频谱分成16×16像素的部分重叠的图像块(image patch)序列。然后,我们将此序列中的块投影到嵌入序列中,并像往常一样将其作为输入传递给Transformer编码器。AST是一个仅含编码器的Transformer模型,因此输出是一个隐藏状态序列,每个16×16输入块对应一个隐藏状态。最后是一个含有sigmoid激活函数的简单分类层,将隐藏状态映射为分类概率。
14 |
15 |
16 |

17 |
18 |
19 | 图像来自论文[AST: Audio Spectrogram Transformer](https://arxiv.org/pdf/2104.01778.pdf)
20 |
21 |
22 | 💡 尽管在这里我们假装时频谱与图像相同,但它们之间其实有重要的区别。例如,将图像的内容上下平移通常不会改变图像中的内容的含义。然而,将时频谱上下平移将改变声音中的频率,并完全改变其特性。图像具有一定的上下和左右平移不变性(shift-invariance),但时频谱仅具有一定的左右平移不变性,而几乎完全不具有上下平移不变性。尽管在实践中,将时频谱视为图像可以得到很好的效果,但请记住它们在原理上完全不同。
23 |
24 |
25 | ## 任何Transformer都可以是分类器
26 |
27 | 在[CTC](ctc)一节中,我们了解到CTC是一种使用仅含编码器的Transformer来执行自动语音识别的有效技术。CTC模型实际上已经可以被视为分类器,因为其预测的是词汇表中每个词素的概率。我们可以通过更改标签并使用常规的交叉熵损失函数代替特殊的CTC损失来将CTC模型转换为通用的音频分类器。
28 |
29 | 举个例子,HF Transformers库中包含了`Wav2Vec2ForCTC`模型,但提供了`Wav2Vec2ForSequenceClassification`和`Wav2Vec2ForAudioFrameClassification`。这些模型之间的唯一区别是分类层的大小和所使用的损失函数。
30 |
31 | 实际上,任何仅含编码器的音频Transformer模型都可以通过在隐藏状态序列之上添加分类层来转换为音频分类器。分类任务通常不需要Transformer解码器。
32 |
33 | 如果需要对整个序列输出一个单独的分类标签(`Wav2Vec2ForSequenceClassification`),模型会对隐藏状态序列沿其长度取平均值,并将其输送到分类层。这样我们就可以对整个序列输出一个概率分布,而不是输出序列中每个元素的概率分布。
34 |
35 | 如果需要对每一帧输出一个分类标签(`Wav2Vec2ForAudioFrameClassification`),我们就让分类器对隐藏状态序列中的每个元素都输出一个概率分布,这样我们的输出会成为一个具有同样长度的概率分布序列。
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter3/quiz.mdx:
--------------------------------------------------------------------------------
1 |
2 |
3 | # 测测你对课程内容的理解
4 |
5 | ### 1. 什么是声码器(vocoder)?
6 |
7 |
24 |
25 | ### 2. Wav2Vec2模型采用了什么结构?
26 |
27 |
44 |
45 | ### 3. CTC算法中的空白标记(blank token)有什么作用?
46 |
47 | 。",
60 | explain: ""
61 | }
62 | ]}
63 | />
64 |
65 | ### 4. 下列关于CTC模型的选项中哪一项是**错误**的?
66 |
67 |
84 |
85 | ### 5. Whisper模型使用了什么结构?
86 |
87 |
104 |
105 | ### 6. 解决音频分类任务的最简单方法是?
106 |
107 |
124 |
125 | ### 7. 以下陈述是否正确:当我们在时频谱上应用图像分类技巧时,我们可以使用常见的图像数据增强(Image data augmentation)方法,例如图像平移、裁切或改变大小,来提高模型的性能。
126 |
127 |
140 |
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter3/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # 补充阅读和资源
2 |
3 | 如果你想进一步了解不同的Transformer结构并学习它们在语音处理中的各种应用,请查看这篇最近的论文:
4 |
5 | ### Transformers in Speech Processing: A Survey
6 |
7 | 作者:Siddique Latif, Aun Zaidi, Heriberto Cuayahuitl, Fahad Shamshad, Moazzam Shoukat, Junaid Qadir
8 |
9 | "Transformer在自然语言处理领域的显著成功引起了语音处理界的兴趣,从而探索了它们在语音序列中建模长距离依赖性的潜力。最近,Transformer在各种与语音相关的领域中获得了突出的地位,包括自动语音识别、语音合成、语音翻译、语音语言学、语音增强、口语对话系统和众多多模态应用。在本文中,我们提出了一份综合调查报告,旨在桥接语音技术中不同子领域的研究成果。通过整合语音技术领域的研究成果,我们为那些有兴趣利用Transformer的力量推动该领域发展的研究人员提供了宝贵的资源。我们指出了Transformer在语音处理中遇到的挑战,同时也提供了解决这些问题的潜在解决方案。"
10 |
11 | [arxiv.org/abs/2303.11607](https://arxiv.org/abs/2303.11607)
12 |
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter5/demo.mdx:
--------------------------------------------------------------------------------
1 | # 用 Gradio 创建 demo
2 |
3 | 现在我们已经对迪维希语语音识别微调了 Whisper 模型,让我们继续前进,构建一个 [Gradio](https://gradio.app) demo 来向社区展示它!
4 |
5 | 首先,我们需要使用 `pipeline()` 类加载微调后的检查点——这一点我们从 [预训练模型](asr_models) 章节开始就非常熟悉了。
6 | 您可以更改 `model_id` 为您在 Hugging Face Hub 上微调模型的命名空间,或者使用预训练的 [Whisper 模型](https://huggingface.co/models?sort=downloads&search=openai%2Fwhisper-) 来进行零样本语音识别:
7 |
8 | ```python
9 | from transformers import pipeline
10 |
11 | model_id = "sanchit-gandhi/whisper-small-dv" # 改为您的模型 id
12 | pipe = pipeline("automatic-speech-recognition", model=model_id)
13 | ```
14 |
15 | 其次,我们将定义一个函数,该函数接收输入音频的文件路径并将其输入 pipeline。在这里,pipeline 会自动加载音频文件,
16 | 将其重采样到正确的采样率,并使用模型运行推理。然后我们可以简单地返回转写文本作为函数的输出。
17 | 为了确保我们的模型可以处理任意长度的音频输入,我们将启用 *分块*,正如 [预训练模型](asr_models) 章节所描述的:
18 |
19 | ```python
20 | def transcribe_speech(filepath):
21 | output = pipe(
22 | filepath,
23 | max_new_tokens=256,
24 | generate_kwargs={
25 | "task": "transcribe",
26 | "language": "sinhalese",
27 | }, # 修改成您微调过的语言
28 | chunk_length_s=30,
29 | batch_size=8,
30 | )
31 | return output["text"]
32 | ```
33 |
34 | 我们将使用 Gradio 的 [blocks](https://gradio.app/docs/#blocks) 功能在我们的 demo 中启动两个标签页:一个用于麦克风转写,另一个用于文件上传。
35 |
36 | ```python
37 | import gradio as gr
38 |
39 | demo = gr.Blocks()
40 |
41 | mic_transcribe = gr.Interface(
42 | fn=transcribe_speech,
43 | inputs=gr.Audio(sources="microphone", type="filepath"),
44 | outputs=gr.outputs.Textbox(),
45 | )
46 |
47 | file_transcribe = gr.Interface(
48 | fn=transcribe_speech,
49 | inputs=gr.Audio(sources="upload", type="filepath"),
50 | outputs=gr.outputs.Textbox(),
51 | )
52 | ```
53 |
54 | 最后,我们使用刚刚定义的两个 blocks 启动 Gradio demo:
55 |
56 | ```python
57 | with demo:
58 | gr.TabbedInterface(
59 | [mic_transcribe, file_transcribe],
60 | ["Transcribe Microphone", "Transcribe Audio File"],
61 | )
62 |
63 | demo.launch(debug=True)
64 | ```
65 |
66 | 这将启动一个类似于在 Hugging Face Space 上运行的 Gradio demo:
67 |
68 |
69 |
70 | 如果您希望在 Hugging Face Hub 上托管您的 demo,您可以使用这个 Space 作为您微调的模型的模板。
71 |
72 | 点击链接将模板 demo 复制到您的账户:https://huggingface.co/spaces/course-demos/whisper-small?duplicate=true
73 |
74 | 我们建议将您的 Space 命名为与您的微调模型类似的名称(例如 whisper-small-dv-demo)并将可见性设置为“公开”。
75 |
76 | 将 Space 复制到您的账户后,请点击“Files and versions”->“app.py”->“edit”,然后更改模型标识符为您的微调模型(第6行)。滚动到页面底部并点击
77 | “Commit changes to main”,demo 将重启,这次使用的是您的微调模型。您可以与您的朋友和家人分享这个 demo,以便他们可以使用您训练的模型!
78 |
79 | 查看我们的视频教程,以更好地了解如何复制 Space 👉️ [YouTube 视频](https://www.youtube.com/watch?v=VQYuvl6-9VE)
80 |
81 | 我们期待在 Hub 上看到您的 demos!
82 |
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter5/hands_on.mdx:
--------------------------------------------------------------------------------
1 | # 实战练习
2 |
3 | 在本单元中,我们探讨了微调 ASR 模型的挑战,验证了在新语言上微调像 Whisper(即使是小型检查点)模型需要不少时间和资源。
4 | 为了提供实践经验,我们设计了一个练习,让您能够在使用较小数据集的情况下,体验微调 ASR 模型的过程。
5 | 这个练习的主要目的是让您熟悉过程,而不是取得生产级别的结果。我们故意设置了一个低指标,以确保即使在资源有限的情况下,您也应该能够达到它。
6 |
7 | 以下是指导说明:
8 |
9 | * 使用 `"PolyAI/minds14"` 数据集的美式英语("en-US")子集,微调 `"openai/whisper-tiny"` 模型。
10 | * 使用 **前450 个样本**进行训练,其余的用于评估。确保在使用 `.map` 方法预处理数据集时设置 `num_proc=1`(这将确保您的模型正确提交以进行评估)。
11 | * 评估模型时,使用本单元描述的 `wer` 和 `wer_ortho` 指标。但是,*不要* 通过乘以 100 将指标转换为百分比(例如,如果 WER 是 42%,我们将期望在此练习中看到 0.42 的值)。
12 |
13 | 您微调了一个模型后,请使用以下 `kwargs` 将其上传到 🤗 Hub:
14 |
15 | ```
16 | kwargs = {
17 | "dataset_tags": "PolyAI/minds14",
18 | "finetuned_from": "openai/whisper-tiny",
19 | "tasks": "automatic-speech-recognition",
20 | }
21 | ```
22 |
23 | 如果您的模型的标准化 WER(`wer`)低于 **0.37**,您将通过这个任务。
24 |
25 | 请随意构建您的模型 demo,并在 Discord 上分享!如果您有任何问题,欢迎在 #audio-study-group 频道发布。
26 |
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter5/introduction.mdx:
--------------------------------------------------------------------------------
1 | # 单元简介
2 |
3 | 在本节中,我们将探讨如何使用 Transformers 将语音转换为文本,这一任务被称为 _语音识别_。
4 |
5 |
6 |

7 |
8 |
9 | 语音识别,也称为自动语音识别(ASR)或语音转文本(STT),是最受欢迎和令人兴奋的语音处理任务之一。
10 | 它广泛应用于包括口述、语音助手、视频字幕和会议记录在内的多种应用中。
11 |
12 | 您可能在不知不觉中多次使用过语音识别系统,比如说您智能手机中的数字助手(Siri、Google Assistant、Alexa)!
13 | 当您使用这些助手时,它们首先要做的就是将您的语音转写为书面文本,准备用于各种下游任务(比如为您查询天气预报 🌤️)。
14 |
15 | 试试下面的语音识别 demo。您可以使用麦克风录制自己的声音,或拖放音频样本文件进行转写:
16 |
17 |
18 |
19 | 语音识别是一项具有挑战性的任务,它需要对音频和文本都有所了解。输入的音频可能有很多背景噪音,并且可能由具有各种口音的说话人发出,这使得从中识别出语音变得困难。
20 | 书面文本可能包含无声音的字符,如标点符号,这些信息仅从音频中推断很困难。这些都是我们在构建有效的语音识别系统时必须克服的障碍!
21 |
22 | 现在我们已经定义了我们的任务,我们可以开始更详细地研究语音识别。通过本单元的学习,您将对各种可用的预训练语音识别模型有一个良好的基本理解,并了解如何通过 🤗 Transformers 库使用它们。
23 | 您还将了解对一个领域或某种特定语言微调 ASR 模型的过程,使您能够为遇到的任何任务构建一个高效的系统。您将能够向您的亲朋好友现场演示您的模型,一个能够将任何语音转换为文本的模型!
24 |
25 | 具体而言,我们将介绍:
26 |
27 | * [语音识别的预训练模型](asr_models)
28 | * [选择数据集](choosing_dataset)
29 | * [语音识别的评价指标](evaluation)
30 | * [微调语音识别模型](fine-tuning)
31 | * [创建 demo](demo)
32 | * [实战练习](hands_on)
33 |
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter5/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # Supplemental reading and resources
2 |
3 | 本单元介绍了语音识别的实践,语音识别是音频领域最受欢迎的任务之一。
4 | 想了解更多吗?在这里,您可以找到更多资源,加深您对这个主题的理解,提升学习体验。
5 |
6 | * [Whisper Talk](https://www.youtube.com/live/fZMiD8sDzzg?feature=share) by Jong Wook Kim: a presentation on the Whisper model, explaining the motivation, architecture, training and results, delivered by Whisper author Jong Wook Kim
7 | * [End-to-End Speech Benchmark (ESB)](https://arxiv.org/abs/2210.13352): a paper that comprehensively argues for using the orthographic WER as opposed to the normalised WER for evaluating ASR systems and presents an accompanying benchmark
8 | * [Fine-Tuning Whisper for Multilingual ASR](https://huggingface.co/blog/fine-tune-whisper): an in-depth blog post that explains how the Whisper model works in more detail, and the pre- and post-processing steps involved with the feature extractor and tokenizer
9 | * [Fine-tuning MMS Adapter Models for Multi-Lingual ASR](https://huggingface.co/blog/mms_adapters): an end-to-end guide for fine-tuning Meta AI's new [MMS](https://ai.facebook.com/blog/multilingual-model-speech-recognition/) speech recognition models, freezing the base model weights and only fine-tuning a small number of *adapter* layers
10 | * [Boosting Wav2Vec2 with n-grams in 🤗 Transformers](https://huggingface.co/blog/wav2vec2-with-ngram): a blog post for combining CTC models with external language models (LMs) to combat spelling and punctuation errors
11 |
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter6/evaluation.mdx:
--------------------------------------------------------------------------------
1 | # 评估语音合成模型
2 |
3 | 在训练期间,语音合成模型旨在优化平均平方误差损失(mean-square error loss,简称 MSE)或平均绝对误差(mean absolute error,简称 MAE),
4 | 这两者衡量的是预测的频谱图和真正的频谱图之间的差异。MSE 和 MAE 都鼓励模型最小化预测和目标频谱图之间的差异。然而,由于 TTS 是一种一对多映射问题,
5 | 即给定文本的输出频谱图有多种可能性,所以评估语音合成模型要比预想的困难得多。
6 |
7 | 与许多其他可以使用定量指标(如准确率、精确度)客观衡量的计算任务不同,评估 TTS 主要依赖于主观的人类分析。
8 |
9 | 评估 TTS 系统最常用方法之一是通过平均意见得分(Mean Opinion Scores,简称 MOS)进行定性评估。MOS 是一种主观评分系统,
10 | 允许人类评估者对合成语音的感知质量进行评分,评分范围从 1 到 5。这些得分通常通过听力测试收集,参与者听取并评价合成语音样本。
11 |
12 | 对于 TTS 评估来说,设置客观指标困难的主要原因之一是语音感知的主观性。不同的人类听众对语音的不同方面,包括发音、语调、自然度和清晰度,
13 | 有着各自的偏好和敏感度。用单一的数值捕捉这些感知细微差别是一项艰巨的任务。同时,人类评估的主观性使得比较和基准测试不同的 TTS 系统变得困难。
14 |
15 | 此外,这种评估可能会忽视语音合成的某些重要方面,如自然度、表达力和情感影响。这些质量难以客观量化,但在需要合成语音达到类人的品质和引发适当情感反应的应用中至关重要。
16 |
17 | 总之,由于缺乏一个真正客观的指标,评估语音合成模型是一项复杂的任务。最常用的评估方法,即平均意见得分(MOS),依赖于主观的人类分析。
18 | 尽管 MOS 提供了对合成语音质量的宝贵意见,但它也引入了不确定性和主观性。
19 |
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter6/hands_on.mdx:
--------------------------------------------------------------------------------
1 | # 实战练习
2 |
3 | 在这个单元中,我们探讨了语音合成的音频任务,讨论了现有的 Datasets、预训练模型以及为新语言微调 SpeechT5 的细节。
4 |
5 | 正如您所见,为语音合成任务微调模型在资源较少的情况下可能比较有挑战性。同时,评估语音合成模型也不是一件容易的事。
6 |
7 | 因此,这个实践练习将侧重于练习技能,而不是达到特定的指标。
8 |
9 | 您在这个任务中的目标是在您选择的数据集上微调 SpeechT5。您可以从相同的 `voxpopuli` 数据集中选择另一种语言,或者选择本单元中列出的任何其他数据集。
10 |
11 | 注意训练数据的大小!如果在 Google Colab 免费版的 GPU 上训练,我们推荐将训练数据限制在大约 10-15 小时。
12 |
13 | 微调完成后,请上传到 Hub 来分享您的模型,并加上 `text-to-speech` 模型标签,可以通过 kwargs 或者在 Hub UI 中设置。
14 |
15 | 请记得,这个练习的主要目的是为您提供充分的实践,让您锻炼学到的技能并深入理解语音合成的音频任务。
16 |
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter6/introduction.mdx:
--------------------------------------------------------------------------------
1 | # 第六单元:从文本到语音
2 |
3 | 在上一个单元中,您学习了如何使用 Transformers 将语音转换成文本。现在,让我们换一个方向,看看该如何将输入的文本转换成听起来像人类语音的音频输出。
4 |
5 | 我们在这个单元将学习的任务称为“语音合成”(Text-to-Speech,简称 TTS),要将文本转换为可听的人类语音。这样的模型具有广泛的潜在应用:
6 |
7 | * 辅助 app:可以利用这些模型帮助视觉障碍人士通过声音媒介访问数字内容。
8 | * 有声读物朗读:将文本的书籍转换成音频形式,使比起读喜欢听的或阅读有困难的人们能更容易地欣赏文学作品。
9 | * 虚拟助手:TTS 模型是 Siri、Google Assistant 或 Amazon Alexa 等虚拟助手的基本组成部分。它们使用分类模型捕捉到唤醒词,并使用 ASR(语音识别)模型处理了您的请求之后,就可以使用 TTS 模型来回应您的问题。
10 | * 娱乐、游戏和语言学习:为您的 NPC(非玩家角色)赋予声音,叙述游戏事件,或帮助语言学习者了解单词和短语的正确发音和语调。
11 |
12 | 这些只是一些例子,我相信您还可以想象出更多!然而,能力越大责任越大,需要强调 TTS 模型有可能被用于恶意目的。例如,有了足够的声音样本,
13 | 不法分子可能会合成出足以以假乱真的假语音,未经授权使用他人的声音,甚至用于诈骗。如果想要收集数据以微调自己的系统,请仔细考虑隐私和知情同意。
14 | 获取声音数据应获得个人的明确同意,确保他们理解声音在 TTS 系统中使用的目的、范围和潜在风险。请负责任地使用语音合成技术。
15 |
16 | 在这一章中,我们将介绍:
17 |
18 | * [适合训练语音合成模型的数据集](tts_datasets)
19 | * [语音合成的预训练模型](pre-trained_models)
20 | * [在一门新语言上微调 SpeechT5](fine-tuning)
21 | * [评估语音识别模型的性能](evaluation)
22 |
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter6/supplemental_reading.mdx:
--------------------------------------------------------------------------------
1 | # 补充阅读
2 |
3 | 本单元介绍了语音合成任务,包含了很多内容。想要了解更多吗?在这里,您将找到额外的资源,帮助您深入理解这些主题并提升您的学习体验。
4 |
5 | * [HiFi-GAN: 用于高效和高保真语音合成的生成对抗网络](https://arxiv.org/pdf/2010.05646.pdf):介绍语音合成中的声码器 HiFi-GAN 的论文。
6 | * [X-Vectors: 用于说话人识别的鲁棒 DNN 嵌入](https://www.danielpovey.com/files/2018_icassp_xvectors.pdf):介绍说话人嵌入的 X-Vector 方法的论文。
7 | * [FastSpeech 2: 快速且高质量的端到端语音合成](https://arxiv.org/pdf/2006.04558.pdf):介绍 FastSpeech 2 的论文,这是另一个流行的语音合成模型,它使用了一种非自回归的 TTS 方法。
8 | * [文本到语音合成的一种基于真实自发语音的向量量化方法](https://arxiv.org/pdf/2302.04215v1.pdf):介绍 MQTTS 的论文,这是一个自回归的 TTS 系统,它用量化的离散表示替换了梅尔谱。
9 |
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter6/tts_datasets.mdx:
--------------------------------------------------------------------------------
1 | # 语音合成数据集
2 |
3 | 语音合成任务(也称为 _文本转语音_,Text-to-Speech)面临许多挑战。
4 |
5 | 首先,就像之前讨论的语音识别(ASR)一样,文本和语音之间的对齐可能很棘手。然而,与 ASR 不同的是,TTS 是一个**一对多**映射问题,
6 | 即同一文本可以以多种不同方式合成。想想您每天听到的语音中声音和说话风格的多样性——每个人说同一句话的方式都不同,但它们都是有效且正确的!
7 | TTS 模型的不同输出,频谱图或音频波形,可能对应同一个真实结果(ground truth)。模型必须学会为每个音素、单词或句子生成正确的持续时间和时序,
8 | 这可能会很有挑战性,特别是对于长且复杂的句子。
9 |
10 | 其次,TTS 中存在长距离依赖问题:语言具有时间维度,理解句子的意义通常需要考虑包含了周围词汇的上下文。确保 TTS 模型能捕获并保留长序列中的上下文信息对于生成连贯自然的语音至关重要。
11 |
12 | 最后,训练 TTS 模型通常需要文本和相应的语音录音配对,且为保证模型能够为不同说话人和说话风格生成自然的语音,数据应包含来自多个说话人的多样、有代表性的语音样本。
13 | 收集此类数据既昂贵又耗时,并且对于某些语言来说并不可行。您可能会想,为什么不直接采用为 ASR 设计的数据集来训练 TTS 模型呢?不幸的是,
14 | ASR 数据集并不是最佳选择。它们对于 ASR 有益的特性,如过多的背景噪音,在 TTS 中通常是不好的。能够在嘈杂街道的录音中辨别出语音是很棒的,
15 | 但如果您的语音助手回答您时背景有汽车喇叭声和建筑施工声就不那么理想了。尽管如此,有时可以用一些 ASR 数据集来微调,因为寻找高质量、多语言、多说话人的 TTS 数据集可能相当困难。
16 |
17 | 让我们来探索一些 🤗 Hub 上适用于 TTS 的数据集吧。
18 |
19 | ## LJSpeech
20 |
21 | [LJSpeech](https://huggingface.co/datasets/lj_speech) 是一个包含 13,100 个英语音频片段及其对应转写的大型数据集,
22 | 内容为一位说话人朗读 7 本纪实类英语书籍的录音。由于其音质高,语言内容多样,LJSpeech 经常被用作评估 TTS 模型的基准。
23 |
24 | ## Multilingual LibriSpeech
25 |
26 | [Multilingual LibriSpeech](https://huggingface.co/datasets/facebook/multilingual_librispeech) 是 LibriSpeech 数据集的多语言扩展版。
27 | 后者只包含英语有声读物,而 Multilingual LibriSpeech 还包括了额外的语言,如德语、荷兰语、西班牙语、法语、意大利语、葡萄牙语和波兰语。
28 | 它提供了每种语言的音频录音以及与之对齐的转写。这个数据集为开发多语言 TTS 系统和探索跨语言语音合成技术提供了宝贵的资源。
29 |
30 | ## VCTK (Voice Cloning Toolkit)
31 |
32 | [VCTK](https://huggingface.co/datasets/vctk) 是专为语音合成研究和开发设计的数据集。它包含了 110 位不同口音的人说英语的录音,每位说话人读约 400 个句子,
33 | 这些句子选自报纸、the rainbow passage 和旨在识别说话者口音的引出段落(elicitation paragraph)。VCTK 为训练具有多样化声音和口音的 TTS 模型提供了宝贵资源,使语音合成更加自然和多样化。
34 |
35 | ## Libri-TTS / LibriTTS-R
36 |
37 | [Libri-TTS / LibriTTS-R](https://huggingface.co/datasets/cdminix/libritts-r-aligned) 是一个由约 585 小时的英语朗读语音组成的多说话人英语语料库,
38 | 采样率 24kHz,由 Heiga Zen 在 Google Speech 和 Google Brain 团队成员的协助下搭建。LibriTTS 语料库专为 TTS 研究而设计,它源自 LibriSpeech 语料库的原始材料
39 | (LibriVox 的 mp3 音频文件和 Project Gutenberg 的文本文件)。它与 LibriSpeech 语料库的主要区别如下:
40 |
41 | * 音频文件是 24kHz 采样率。
42 | * 每条语音数据在句子与句子间断开。
43 | * 包括原始和规范化的文本。
44 | * 可以提取上下文信息(例如相邻句子)。
45 | * 排除了具有显著背景噪音的语音数据。
46 |
47 | 组建一个适用于 TTS 的优秀数据集并非易事,因为这样的数据集需要具备几个关键特性:
48 |
49 | * 高质量和多样化的录音,涵盖广泛的语音模式、口音、语言和情感。录音应清晰、无背景噪音,并展现自然的语音特征。
50 | * 转写:每个音频录音应有其相应的文本转写。
51 | * 语言内容的多样性:数据集应包含语言多样化的内容,包括不同类型的句子、短语和单词。它应涵盖各种主题、体裁和领域,以确保模型能够处理不同的语言环境。
52 |
53 | 好消息是,您很可能不需要从头开始训练一个 TTS 模型。在下一节中,我们将探讨在 🤗 Hub 上可用的预训练模型。
54 |
55 |
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter8/certification.mdx:
--------------------------------------------------------------------------------
1 | # 获取您的完成证书
2 |
3 | 认证的过程是完全免费的。
4 |
5 | - 要获得完成证书:您需要通过4项实践作业的其中3项。
6 | - 要获得卓越证书:您需要通过全部的4项实践作业。
7 |
8 | 每项实践作业的要求都在其对应的单元中列出:
9 |
10 | - [第4单元实践](../chapter4/hands_on)
11 | - [第5单元实践](../chapter5/hands_on)
12 | - [第6单元实践](../chapter6/hands_on)
13 | - [第7单元实践](../chapter7/hands_on)
14 |
15 | 对于涉及到训练模型的作业,请确保您将符合要求的模型推送到 `Hub` 并附带相关的 `kwargs`。
16 |
17 | 对于第7单元的演示作业,请确保您的演示 `demo` 被设置为公开可见。
18 |
19 | 如果要以自我评估的形式查看您通过或未通过的单元,您可以使用以下 `HuggingFace` 空间:
20 | [查看我的进度 - 音频课程](https://huggingface.co/spaces/MariaK/Check-my-progress-Audio-Course)
21 |
22 | 一旦您达到了获得证书的资格,请前往 [音频课程认证](https://huggingface.co/spaces/MariaK/Audio-Course-Certification) 空间。
23 |
24 | 该空间中存在额外的检查,以确保您的提交符合评估标准。
25 |
26 | 在文本字段中输入您的 `HuggingFace` 用户名、名字和姓氏,然后单击“检查我是否通过并获得证书”按钮。
27 |
28 | 如果您通过了4个实践作业的其中3个,您将获得完成证书。
29 |
30 | 如果您通过了4个实践作业,您将获得卓越证书。
31 |
32 | 您可以通过 `pdf` 和 `png` 格式下载您的证书。请自豪地在 `X` 和 `LinkedIn ` 上分享您的证书(可以加上 `tag` 我 @mariakhalusova 和 `HuggingFace` @huggingface)。
33 |
34 | 如果您不符合认证标准,也请不要气馁!
35 |
36 | 返回 [查看我的进度 - 音频课程](https://huggingface.co/spaces/MariaK/Check-my-progress-Audio-Course) 空间,查看您需要重新完成哪些单元才能获得您的证书。如果您在这些认证相关的空间中遇到任何问题,请联系我们!
--------------------------------------------------------------------------------
/chapters/zh-CN/chapter8/introduction.mdx:
--------------------------------------------------------------------------------
1 | # 祝贺!
2 |
3 | 您的不懈努力让您抵达了这里,我们想祝贺您完成了这个音频课程!
4 |
5 | 回顾整个课程,您获得了音频数据的基础理解,探索了一些新概念,并掌握了与音频 `Transformers` 相关的实用技能。
6 |
7 | 从通过 `pipeline` 处理音频数据和预训练 `checkpoints` 的基础知识,到构建真实世界的音频应用程序,您学会了如何构建不仅能理解声音,还能创造声音的系统。
8 |
9 | 由于这一领域充满活力、不断发展更新,因此我们鼓励您保持好奇心,不断探索更新的模型、最新的研究进展和应用。在开发您自己的新颖音频应用程序时,请确保始终牢记道德准则,并仔细考虑您的应用对个人和整个社会的潜在影响。
10 |
11 | 感谢您参加本次音频课程,希望您能像我们当时乐此不疲地制作课程时一样,充分享受这一学习经历。欢迎您在[课程的 GitHub 仓库](https://github.com/huggingface/audio-transformers-course)中提供反馈和贡献。
12 |
13 | 如果您顺利完成了实践作业,并想要了解如何获得课程完成证书,请查看[下一页](certification)。
14 |
15 | 最后,您可以在 `X` 上关注我们的音频课程团队并和我们保持联系:
16 |
17 | - Maria Khalusova:[@mariakhalusova](https://twitter.com/mariaKhalusova)
18 | - Sanchit Gandhi:[@sanchitgandhi99](https://twitter.com/sanchitgandhi99)
19 | - Matthijs Hollemans:[@mhollemans](https://twitter.com/mhollemans)
20 | - Vaibhav (VB) Srivastav:[@reach_vb](https://twitter.com/reach_vb)
21 |
22 | 保持好奇心,训练 `Transformers` ! :)
23 |
24 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | nbformat>=5.1.3
2 | PyYAML>=5.4.1
3 | black>=22.3.0
--------------------------------------------------------------------------------
/utils/carbon-config.json:
--------------------------------------------------------------------------------
1 | {"paddingVertical":"1px","paddingHorizontal":"1px","backgroundImage":null,"backgroundImageSelection":null,"backgroundMode":"color","backgroundColor":"rgba(255,255,255,1)","dropShadow":false,"dropShadowOffsetY":"20px","dropShadowBlurRadius":"68px","theme":"one-light","windowTheme":"none","language":"python","fontFamily":"Fira Code","fontSize":"14px","lineHeight":"152%","windowControls":false,"widthAdjustment":true,"lineNumbers":false,"firstLineNumber":1,"exportSize":"2x","watermark":false,"squaredImage":false,"hiddenCharacters":false,"name":"","width":680,"highlights":{"keyword":"rgba(139,92,246,1)","variable":"rgba(236,72,153,1)","number":"rgba(180,83,9,1)","string":"rgba(80,161,79,1)"}}
--------------------------------------------------------------------------------
/utils/validate_translation.py:
--------------------------------------------------------------------------------
1 | import argparse
2 | import os
3 | import yaml
4 |
5 | from pathlib import Path
6 |
7 | PATH_TO_COURSE = Path("chapters/")
8 |
9 | def load_sections(language: str):
10 | toc = yaml.safe_load(
11 | open(os.path.join(PATH_TO_COURSE / language, "_toctree.yml"), "r")
12 | )
13 | sections = []
14 | for chapter in toc:
15 | for section in chapter["sections"]:
16 | sections.append(section["local"])
17 | return set(sorted(sections))
18 |
19 |
20 | if __name__ == "__main__":
21 | parser = argparse.ArgumentParser()
22 | parser.add_argument("--language", type=str, help="Translation language to validate")
23 | args = parser.parse_args()
24 |
25 | english_sections = load_sections("en")
26 | translation_sections = load_sections(args.language)
27 | missing_sections = english_sections.difference(translation_sections)
28 |
29 | if len(missing_sections) > 0:
30 | print("Missing sections:")
31 | for section in missing_sections:
32 | print(section)
33 | else:
34 | print("✅ No missing sections - translation complete!")
--------------------------------------------------------------------------------