← AI-Built Software Voice workflowGiọng nói trong workflow

Voice input and approval must work inside the real workflowVoice input và approval phải chạy trong workflow thật

Voice is useful only when it works where people actually make requests and decisions. This demo puts speech-to-text and text-to-speech inside a live Leave Request → Manager Approval flow.

Voice chỉ hữu ích khi nó hoạt động đúng nơi con người tạo yêu cầu và ra quyết định. Demo này đặt speech-to-text và text-to-speech vào luồng thật Leave Request → Manager Approval.

Video demo: dictate a leave reason, listen to it during approval, dictate manager notes, and approve the same record.

Video demo: đọc lý do nghỉ phép, nghe lại khi duyệt, đọc ghi chú quản lý và duyệt đúng hồ sơ đó.

English

What customer need does this solve?

Forms are not always convenient. A field technician, factory supervisor, warehouse worker, or manager on the move may know exactly what to say, but typing long explanations or approval notes on a small screen slows the process down.

The customer need is not a standalone voice toy. It is voice inside the workflow fields that already matter: the reason for a request, the note from an approver, and the spoken context that helps a manager decide faster.

What the solution should solve

The solution should support both directions. Employees can speak into a field and have speech-to-text land in the actual textarea. Managers can listen to the request through text-to-speech, dictate their approval notes, and complete the decision on the same record.

The demo proves this on a real Leave Request flow. The employee logs in, opens the leave form, clicks the microphone, dictates the reason, and submits. The manager then opens the approval form for that exact record, listens to the request, dictates an approval comment, and approves it.

Trade-offs and alternatives

The benefit is lower friction for field-heavy or mobile-heavy workflows. The trade-off is that voice features must be tested at the system boundary, not mocked inside the UI. Microphone capture, PCM conversion, transcription, field update, form submit, workflow transition, and database persistence all have to work together.

That testing surfaced a real bug: while recording, the mic button title changed to "Stop recording", making the active button hard to re-locate reliably by title or accessibility tooling. The fix was to add stable test IDs at both call sites, voice-mic-reason and voice-mic-notes. The automated test then used generated Vietnamese WAV samples as fake microphone input in Chromium, exercising the real getUserMedia to /api/transcribe pipeline.

Alternatives include plain typing, mobile dictation outside the app, or a chatbot-style interface. Those can help in narrow cases, but they often detach the spoken content from the workflow record and approval audit trail.

Conclusion

Voice belongs inside operational software when it reduces friction without weakening traceability. In this case, the final database row confirmed the approved status and preserved both the employee reason and manager notes that came from voice input.

Tiếng Việt

Nhu cầu khách hàng là gì?

Form không phải lúc nào cũng tiện. Kỹ thuật viên hiện trường, quản đốc nhà máy, nhân viên kho hoặc manager đang di chuyển có thể biết rõ cần nói gì, nhưng gõ giải thích dài hoặc ghi chú phê duyệt trên màn hình nhỏ làm quy trình chậm lại.

Nhu cầu của khách hàng không phải là một tính năng voice đứng riêng. Nhu cầu là voice nằm trong các field workflow vốn đã quan trọng: lý do yêu cầu, ghi chú người duyệt và bối cảnh được nói ra giúp manager quyết định nhanh hơn.

Giải pháp cần giải quyết gì?

Giải pháp cần hỗ trợ cả hai chiều. Nhân viên có thể nói vào field và speech-to-text điền vào textarea thật. Manager có thể nghe lại yêu cầu bằng text-to-speech, đọc ghi chú phê duyệt và hoàn tất quyết định trên cùng record.

Demo chứng minh điều này trên luồng Leave Request thật. Nhân viên đăng nhập, mở form nghỉ phép, bấm microphone, đọc lý do và submit. Manager sau đó mở form duyệt của đúng record đó, nghe nội dung yêu cầu, đọc ghi chú phê duyệt và approve.

Các yếu tố được và mất, các hướng khác có thể cân nhắc

Cái được là giảm ma sát cho các workflow nhiều hiện trường hoặc dùng mobile nhiều. Cái mất là tính năng voice phải được test ở ranh giới hệ thống, không mock bên trong UI. Microphone capture, PCM conversion, transcription, field update, form submit, workflow transition và database persistence đều phải chạy cùng nhau.

Việc test đó phát hiện một bug thật: khi đang recording, title của nút mic đổi thành "Stop recording", khiến nút đang active khó được tìm lại ổn định bằng title hoặc accessibility tooling. Cách sửa là thêm test ID ổn định ở cả hai nơi dùng, voice-mic-reason và voice-mic-notes. Automated test sau đó dùng WAV tiếng Việt được sinh sẵn làm fake microphone input trong Chromium, chạy qua pipeline thật từ getUserMedia đến /api/transcribe.

Các hướng khác gồm gõ tay, dùng dictation ngoài app trên mobile hoặc giao diện chatbot. Những cách đó có thể hữu ích trong phạm vi hẹp, nhưng thường tách nội dung đã nói khỏi workflow record và audit trail phê duyệt.

Kết luận

Voice nên nằm trong phần mềm vận hành khi nó giảm ma sát mà không làm yếu truy vết. Ở demo này, dòng dữ liệu cuối trong database xác nhận trạng thái Approved và giữ cả lý do của nhân viên lẫn ghi chú manager được nhập bằng giọng nói.