CAGE-TB is a diagnostic evaluation study that assesses a TB cough audio signature's potential to be used in a smartphone application to detect potential TB from a cough sound to screen (triage) TB. The purpose of CAGE-TB is to promote the adoption of mobile health (mHealth) based cough audio triage testing for active pulmonary TB in health facilities located in high burden settings. The study is funded by the EDCTP2 programme supported by the European Union and involves four international partners. The study participants, older than 12 years, include participants who have a cough for a duration exceeding two weeks that present to healthcare clinics where the investigators have clinical recruitment infrastructure and permissions to conduct TB research. In this two-phase observational, cross-sectional study, each participant will be seen once only, at diagnosis, and no intervention is planned. In the first phase, the investigators will collect data from a discovery cohort, which will be used to train a machine learning algorithm. During the second phase, data will be collected from a validation cohort, comprising a larger number of participants from two geographically distinct study sites, which will be used to evaluate the performance of the algorithm. The aims of this study are to: (1) generate and separately validate a cough audio classifier that meets WHO triage test TPP sensitivity and specificity criteria. This aim lays the foundation for CAGE-TB by generating a classifier and a common public resource (cough sounds database) for potential later use in other studies. (2) Produce data on potential cost savings of cough audio app for triage by collecting primary data to demonstrate potential cost savings estimated using state-of-the-art methods to satisfy a key TPP criterion (\<USD 2 per patient). This aim will support the further independent evaluation of the classifier, including in clinical trials focused on patient endpoints. (3) Package the technology into an easy-to-use smartphone app. Many TB tests offer improvements in accuracy and cost, but are not widely adopted. This aim is designed to mitigate this risk with the cough classifier and by using the advantages of mHealth, a product may be delivered that is readily usable by nurses, trusted by patients, and capitalised upon by healthcare providers. Accomplishing this requires incorporating important features into the mobile application, such as connectivity, automated reporting, build-in guidance, and quality control, which are important but often neglected components of the WHO triage test TPP profile. (4) Form a foundation for subsequent studies where the app will be evaluated to measure its impact on patient care, to build evidence for global policy change and adoption. The objectives of CAGE-TB include: (1.1) sampling (cough audio, sputum microbiology) all patients with a prolonged cough entering primary health facilities irrespective of reason for presentation (n=473 in Cape Town discovery cohort); (1.2) use machine learning to develop a cough audio classifier to differentiate between TB and non-TB coughs; (1.3) evaluation of the classifier for sensitivity and specificity in new validation cohorts (n=511 in Cape Town, n=767 in Kampala); (2) in both settings, the investigators will use validated tools to calculate potential provider costs averted and conduct mixed methods research to identify barriers and facilitators to inform development of the mHealth solution (smartphone app) intended for use by minimally trained health workers with the final product ideally functioning offline without necessarily needed to sync to an online server for processing done at Stichting-Amsterdam Institute for Global Health and Development (AIGHD); (3) the app will be further refined and made user-friendly, simple and visually intuitive based on study feedback towards a more final product which is free for any person to use; and (4) this mHealth solution packaged into a smartphone app will be sent for review to large international stakeholders such as the Foundation for Innovation and Diagnostics (FIND) and the World Health Organization (WHO) and lead by colleagues at AIGHD with Stellenbosch University and Makerere University input to make this TB triage application relevant for use in African settings and populations.